aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bootmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r--include/linux/bootmem.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 266ab9291232..ab344a521105 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -19,10 +19,6 @@ extern unsigned long min_low_pfn;
19 */ 19 */
20extern unsigned long max_pfn; 20extern unsigned long max_pfn;
21 21
22#ifdef CONFIG_CRASH_DUMP
23extern unsigned long saved_max_pfn;
24#endif
25
26#ifndef CONFIG_NO_BOOTMEM 22#ifndef CONFIG_NO_BOOTMEM
27/* 23/*
28 * node_bootmem_map is a map pointer - the bits represent all physical 24 * node_bootmem_map is a map pointer - the bits represent all physical
@@ -103,20 +99,31 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
103 unsigned long align, 99 unsigned long align,
104 unsigned long goal); 100 unsigned long goal);
105 101
102#ifdef CONFIG_NO_BOOTMEM
103/* We are using top down, so it is safe to use 0 here */
104#define BOOTMEM_LOW_LIMIT 0
105#else
106#define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
107#endif
108
106#define alloc_bootmem(x) \ 109#define alloc_bootmem(x) \
107 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 110 __alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
111#define alloc_bootmem_align(x, align) \
112 __alloc_bootmem(x, align, BOOTMEM_LOW_LIMIT)
108#define alloc_bootmem_nopanic(x) \ 113#define alloc_bootmem_nopanic(x) \
109 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 114 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
110#define alloc_bootmem_pages(x) \ 115#define alloc_bootmem_pages(x) \
111 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 116 __alloc_bootmem(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
112#define alloc_bootmem_pages_nopanic(x) \ 117#define alloc_bootmem_pages_nopanic(x) \
113 __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 118 __alloc_bootmem_nopanic(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
114#define alloc_bootmem_node(pgdat, x) \ 119#define alloc_bootmem_node(pgdat, x) \
115 __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 120 __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
121#define alloc_bootmem_node_nopanic(pgdat, x) \
122 __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
116#define alloc_bootmem_pages_node(pgdat, x) \ 123#define alloc_bootmem_pages_node(pgdat, x) \
117 __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 124 __alloc_bootmem_node(pgdat, x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
118#define alloc_bootmem_pages_node_nopanic(pgdat, x) \ 125#define alloc_bootmem_pages_node_nopanic(pgdat, x) \
119 __alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 126 __alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
120 127
121#define alloc_bootmem_low(x) \ 128#define alloc_bootmem_low(x) \
122 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) 129 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)