aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/events.c
diff options
context:
space:
mode:
authorChristophe Saout <christophe@saout.de>2009-01-11 14:46:23 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-12 03:50:34 -0500
commit28e08861b9afab4168b758fb7b95aa7a4da0f668 (patch)
tree63e7ecdc2f47dab32ff5c4caabbf2bbbe0e24087 /drivers/xen/events.c
parent92296c6d6e908c35fca287a21af27be814af9c75 (diff)
xen: fix too early kmalloc call
Impact: fix bootup crash on xen guests SLAB is not yet up, with earlyprintk it is giving me an Oops in __kmalloc. Replace call to kmalloc() with alloc_bootmem(). Reported-by: Christophe Saout <christophe@saout.de> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen/events.c')
-rw-r--r--drivers/xen/events.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index ed7527b3745a..3141e149d595 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -26,6 +26,7 @@
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/string.h> 28#include <linux/string.h>
29#include <linux/bootmem.h>
29 30
30#include <asm/ptrace.h> 31#include <asm/ptrace.h>
31#include <asm/irq.h> 32#include <asm/irq.h>
@@ -831,8 +832,8 @@ void __init xen_init_IRQ(void)
831 int i; 832 int i;
832 size_t size = nr_cpu_ids * sizeof(struct cpu_evtchn_s); 833 size_t size = nr_cpu_ids * sizeof(struct cpu_evtchn_s);
833 834
834 cpu_evtchn_mask_p = kmalloc(size, GFP_KERNEL); 835 cpu_evtchn_mask_p = alloc_bootmem(size);
835 BUG_ON(cpu_evtchn_mask == NULL); 836 BUG_ON(cpu_evtchn_mask_p == NULL);
836 837
837 init_evtchn_cpu_bindings(); 838 init_evtchn_cpu_bindings();
838 839