summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-08-13 12:50:37 -0700
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2010-10-18 10:41:44 -0400
commit3b32f574a032bb5c93957317bd4ce5c3397d5a7b (patch)
tree91cfba0cb671b7bf02a956303da87629ed239225 /drivers/xen
parent1a60d05f40882303dad13f8f0e077e2e49ea8996 (diff)
downloadop-kernel-dev-3b32f574a032bb5c93957317bd4ce5c3397d5a7b.zip
op-kernel-dev-3b32f574a032bb5c93957317bd4ce5c3397d5a7b.tar.gz
xen: statically initialize cpu_evtchn_mask_p
Sometimes cpu_evtchn_mask_p can get used early, before it has been allocated. Statically initialize it with an initdata version to catch any early references. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 0fcfb4a..1e39908 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -104,7 +104,12 @@ static int *evtchn_to_irq;
struct cpu_evtchn_s {
unsigned long bits[NR_EVENT_CHANNELS/BITS_PER_LONG];
};
-static struct cpu_evtchn_s *cpu_evtchn_mask_p;
+
+static __initdata struct cpu_evtchn_s init_evtchn_mask = {
+ .bits[0 ... (NR_EVENT_CHANNELS/BITS_PER_LONG)-1] = ~0ul,
+};
+static struct cpu_evtchn_s *cpu_evtchn_mask_p = &init_evtchn_mask;
+
static inline unsigned long *cpu_evtchn_mask(int cpu)
{
return cpu_evtchn_mask_p[cpu].bits;
OpenPOWER on IntegriCloud