Commit 2382705f authored by zijun_hu's avatar zijun_hu Committed by Linus Torvalds

mm/nobootmem.c: remove duplicate macro ARCH_LOW_ADDRESS_LIMIT statements

Fix the following bugs:

 - the same ARCH_LOW_ADDRESS_LIMIT statements are duplicated between
   header and relevant source

 - don't ensure ARCH_LOW_ADDRESS_LIMIT perhaps defined by ARCH in
   asm/processor.h is preferred over default in linux/bootmem.h
   completely since the former header isn't included by the latter

Link: http://lkml.kernel.org/r/e046aeaa-e160-6d9e-dc1b-e084c2fd999f@zoho.comSigned-off-by: default avatarzijun_hu <zijun_hu@htc.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1e76609c
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/mmzone.h> #include <linux/mmzone.h>
#include <linux/mm_types.h> #include <linux/mm_types.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/processor.h>
/* /*
* simple boot-time physical memory area allocator. * simple boot-time physical memory area allocator.
...@@ -119,6 +120,10 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, ...@@ -119,6 +120,10 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
#define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS) #define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
#endif #endif
#ifndef ARCH_LOW_ADDRESS_LIMIT
#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
#endif
#define alloc_bootmem(x) \ #define alloc_bootmem(x) \
__alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT) __alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
#define alloc_bootmem_align(x, align) \ #define alloc_bootmem_align(x, align) \
...@@ -180,10 +185,6 @@ static inline void * __init memblock_virt_alloc_nopanic( ...@@ -180,10 +185,6 @@ static inline void * __init memblock_virt_alloc_nopanic(
NUMA_NO_NODE); NUMA_NO_NODE);
} }
#ifndef ARCH_LOW_ADDRESS_LIMIT
#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
#endif
static inline void * __init memblock_virt_alloc_low( static inline void * __init memblock_virt_alloc_low(
phys_addr_t size, phys_addr_t align) phys_addr_t size, phys_addr_t align)
{ {
......
...@@ -11,18 +11,21 @@ ...@@ -11,18 +11,21 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/pfn.h> #include <linux/pfn.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/bootmem.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/kmemleak.h> #include <linux/kmemleak.h>
#include <linux/range.h> #include <linux/range.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/bootmem.h>
#include <asm/bug.h> #include <asm/bug.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/processor.h>
#include "internal.h" #include "internal.h"
#ifndef CONFIG_HAVE_MEMBLOCK
#error CONFIG_HAVE_MEMBLOCK not defined
#endif
#ifndef CONFIG_NEED_MULTIPLE_NODES #ifndef CONFIG_NEED_MULTIPLE_NODES
struct pglist_data __refdata contig_page_data; struct pglist_data __refdata contig_page_data;
EXPORT_SYMBOL(contig_page_data); EXPORT_SYMBOL(contig_page_data);
...@@ -395,9 +398,6 @@ void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size, ...@@ -395,9 +398,6 @@ void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size,
return __alloc_bootmem_node(pgdat, size, align, goal); return __alloc_bootmem_node(pgdat, size, align, goal);
} }
#ifndef ARCH_LOW_ADDRESS_LIMIT
#define ARCH_LOW_ADDRESS_LIMIT 0xffffffffUL
#endif
/** /**
* __alloc_bootmem_low - allocate low boot memory * __alloc_bootmem_low - allocate low boot memory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment