diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2008-06-30 21:30:06 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-07-03 02:58:07 -0400 |
commit | db7f37de2c8346c33cf9279fa9d8e8316e8d821c (patch) | |
tree | 0a49c9aeb1c5c071d5766fca1fbfc6c5f2c3d0ff /include/asm-powerpc/sparsemem.h | |
parent | f3e909c2750eb20536bacacc867dc9047b70546a (diff) |
powerpc: Fix building of arch/powerpc/mm/mem.o when MEMORY_HOTPLUG=y and SPARSEMEM=n
Currently the kernel fails to build with the above config options with:
CC arch/powerpc/mm/mem.o
arch/powerpc/mm/mem.c: In function 'arch_add_memory':
arch/powerpc/mm/mem.c:130: error: implicit declaration of function 'create_section_mapping'
This explicitly includes asm/sparsemem.h in arch/powerpc/mm/mem.c and
moves the guards in include/asm-powerpc/sparsemem.h to protect the
SPARSEMEM specific portions only.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/sparsemem.h')
-rw-r--r-- | include/asm-powerpc/sparsemem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h index 9aea8e9f0bd1..54a47ea2c3aa 100644 --- a/include/asm-powerpc/sparsemem.h +++ b/include/asm-powerpc/sparsemem.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #define MAX_PHYSADDR_BITS 44 | 13 | #define MAX_PHYSADDR_BITS 44 |
14 | #define MAX_PHYSMEM_BITS 44 | 14 | #define MAX_PHYSMEM_BITS 44 |
15 | 15 | ||
16 | #endif /* CONFIG_SPARSEMEM */ | ||
17 | |||
16 | #ifdef CONFIG_MEMORY_HOTPLUG | 18 | #ifdef CONFIG_MEMORY_HOTPLUG |
17 | extern void create_section_mapping(unsigned long start, unsigned long end); | 19 | extern void create_section_mapping(unsigned long start, unsigned long end); |
18 | extern int remove_section_mapping(unsigned long start, unsigned long end); | 20 | extern int remove_section_mapping(unsigned long start, unsigned long end); |
@@ -26,7 +28,5 @@ static inline int hot_add_scn_to_nid(unsigned long scn_addr) | |||
26 | #endif /* CONFIG_NUMA */ | 28 | #endif /* CONFIG_NUMA */ |
27 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 29 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
28 | 30 | ||
29 | #endif /* CONFIG_SPARSEMEM */ | ||
30 | |||
31 | #endif /* __KERNEL__ */ | 31 | #endif /* __KERNEL__ */ |
32 | #endif /* _ASM_POWERPC_SPARSEMEM_H */ | 32 | #endif /* _ASM_POWERPC_SPARSEMEM_H */ |