|
@@ -704,6 +704,7 @@ static void * __init ___alloc_bootmem_node(bootmem_data_t *bdata,
|
|
{
|
|
{
|
|
void *ptr;
|
|
void *ptr;
|
|
|
|
|
|
|
|
+again:
|
|
ptr = alloc_arch_preferred_bootmem(bdata, size, align, goal, limit);
|
|
ptr = alloc_arch_preferred_bootmem(bdata, size, align, goal, limit);
|
|
if (ptr)
|
|
if (ptr)
|
|
return ptr;
|
|
return ptr;
|
|
@@ -712,7 +713,18 @@ static void * __init ___alloc_bootmem_node(bootmem_data_t *bdata,
|
|
if (ptr)
|
|
if (ptr)
|
|
return ptr;
|
|
return ptr;
|
|
|
|
|
|
- return ___alloc_bootmem(size, align, goal, limit);
|
|
|
|
|
|
+ ptr = alloc_bootmem_core(size, align, goal, limit);
|
|
|
|
+ if (ptr)
|
|
|
|
+ return ptr;
|
|
|
|
+
|
|
|
|
+ if (goal) {
|
|
|
|
+ goal = 0;
|
|
|
|
+ goto again;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
|
|
|
|
+ panic("Out of memory");
|
|
|
|
+ return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|