summaryrefslogtreecommitdiff
path: root/drivers/xen
diff options
context:
space:
mode:
authorChristophe Saout <christophe@saout.de>2009-01-11 11:46:23 -0800
committerIngo Molnar <mingo@elte.hu>2009-01-12 09:50:34 +0100
commit28e08861b9afab4168b758fb7b95aa7a4da0f668 (patch)
tree63e7ecdc2f47dab32ff5c4caabbf2bbbe0e24087 /drivers/xen
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')
-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 @@
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/string.h>
+#include <linux/bootmem.h>
#include <asm/ptrace.h>
#include <asm/irq.h>
@@ -831,8 +832,8 @@ void __init xen_init_IRQ(void)
int i;
size_t size = nr_cpu_ids * sizeof(struct cpu_evtchn_s);
- cpu_evtchn_mask_p = kmalloc(size, GFP_KERNEL);
- BUG_ON(cpu_evtchn_mask == NULL);
+ cpu_evtchn_mask_p = alloc_bootmem(size);
+ BUG_ON(cpu_evtchn_mask_p == NULL);
init_evtchn_cpu_bindings();