aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/bootmem.h4
-rw-r--r--mm/bootmem.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index dd8fee6c46d9..f352c5f125b4 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -89,6 +89,10 @@ extern void *__alloc_bootmem_node(pg_data_t *pgdat,
89 unsigned long size, 89 unsigned long size,
90 unsigned long align, 90 unsigned long align,
91 unsigned long goal); 91 unsigned long goal);
92extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat,
93 unsigned long size,
94 unsigned long align,
95 unsigned long goal);
92extern unsigned long init_bootmem_node(pg_data_t *pgdat, 96extern unsigned long init_bootmem_node(pg_data_t *pgdat,
93 unsigned long freepfn, 97 unsigned long freepfn,
94 unsigned long startpfn, 98 unsigned long startpfn,
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 4bc6ae2fbaa3..9ac972535fff 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -578,6 +578,18 @@ void * __init alloc_bootmem_section(unsigned long size,
578} 578}
579#endif 579#endif
580 580
581void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
582 unsigned long align, unsigned long goal)
583{
584 void *ptr;
585
586 ptr = alloc_bootmem_core(pgdat->bdata, size, align, goal, 0);
587 if (ptr)
588 return ptr;
589
590 return __alloc_bootmem_nopanic(size, align, goal);
591}
592
581#ifndef ARCH_LOW_ADDRESS_LIMIT 593#ifndef ARCH_LOW_ADDRESS_LIMIT
582#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL 594#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
583#endif 595#endif