Commit 3b32f574 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Konrad Rzeszutek Wilk

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 1a60d05f
...@@ -104,7 +104,12 @@ static int *evtchn_to_irq; ...@@ -104,7 +104,12 @@ static int *evtchn_to_irq;
struct cpu_evtchn_s { struct cpu_evtchn_s {
unsigned long bits[NR_EVENT_CHANNELS/BITS_PER_LONG]; 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) static inline unsigned long *cpu_evtchn_mask(int cpu)
{ {
return cpu_evtchn_mask_p[cpu].bits; return cpu_evtchn_mask_p[cpu].bits;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment