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.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 01eca1794e14..ab344a521105 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -99,24 +99,31 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
99 unsigned long align, 99 unsigned long align,
100 unsigned long goal); 100 unsigned long goal);
101 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
102#define alloc_bootmem(x) \ 109#define alloc_bootmem(x) \
103 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 110 __alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
104#define alloc_bootmem_align(x, align) \ 111#define alloc_bootmem_align(x, align) \
105 __alloc_bootmem(x, align, __pa(MAX_DMA_ADDRESS)) 112 __alloc_bootmem(x, align, BOOTMEM_LOW_LIMIT)
106#define alloc_bootmem_nopanic(x) \ 113#define alloc_bootmem_nopanic(x) \
107 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 114 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
108#define alloc_bootmem_pages(x) \ 115#define alloc_bootmem_pages(x) \
109 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 116 __alloc_bootmem(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
110#define alloc_bootmem_pages_nopanic(x) \ 117#define alloc_bootmem_pages_nopanic(x) \
111 __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 118 __alloc_bootmem_nopanic(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
112#define alloc_bootmem_node(pgdat, x) \ 119#define alloc_bootmem_node(pgdat, x) \
113 __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 120 __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
114#define alloc_bootmem_node_nopanic(pgdat, x) \ 121#define alloc_bootmem_node_nopanic(pgdat, x) \
115 __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 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)