[PATCH] powerpc: Don't use KERNELBASE in add_memory(), and don't introduce a compiler warning
Michael Ellerman
michael at ellerman.id.au
Tue Jan 10 11:36:30 EST 2006
In add_memory() we should be using __va() to get a virtual address.
Spotted by Mike Kravetz.
Signed-off-by: Michael Ellerman <michael at ellerman.id.au>
---
arch/powerpc/mm/mem.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: linux/arch/powerpc/mm/mem.c
===================================================================
--- linux.orig/arch/powerpc/mm/mem.c
+++ linux/arch/powerpc/mm/mem.c
@@ -125,7 +125,7 @@ int __devinit add_memory(u64 start, u64
nid = hot_add_scn_to_nid(start);
pgdata = NODE_DATA(nid);
- start += KERNELBASE;
+ start = (unsigned long)__va(start);
create_section_mapping(start, start + size);
/* this should work for most non-highmem platforms */
More information about the Linuxppc64-dev
mailing list