powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M

Previous thread: powerpc/32: Allow __ioremap on RAM addresses for kdump kernel by Linux Kernel Mailing List on Sunday, December 28, 2008 - 6:05 pm. (1 message)

Next thread: powerpc/32: Wire up the trampoline code for kdump by Linux Kernel Mailing List on Sunday, December 28, 2008 - 6:05 pm. (1 message)
From: Linux Kernel Mailing List
Date: Sunday, December 28, 2008 - 6:05 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ccdcef...
Commit:     ccdcef72c249c289898b164eada89a61855b9287
Parent:     01695a9687e5a8d78589605037cc7828a5b67ac9
Author:     Dale Farnsworth <dale@farnsworth.org>
AuthorDate: Wed Dec 17 10:09:13 2008 +0000
Committer:  Paul Mackerras <paulus@samba.org>
CommitDate: Tue Dec 23 15:13:29 2008 +1100

    powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M
    
    Add the ability for a classic ppc kernel to be loaded at an address
    of 32MB.  This done by fixing a few places that assume we are loaded
    at address 0, and by changing several uses of KERNELBASE to use
    PAGE_OFFSET, instead.
    
    Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
    Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/include/asm/ppc_asm.h |    4 ++--
 arch/powerpc/kernel/head_32.S      |   11 ++++++-----
 arch/powerpc/mm/init_32.c          |    2 +-
 arch/powerpc/mm/pgtable_32.c       |    4 ++--
 arch/powerpc/mm/ppc_mmu_32.c       |    8 ++++----
 5 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index c4a029c..1a0d628 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -425,14 +425,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
 #define fromreal(rd)	tovirt(rd,rd)
 
 #define tophys(rd,rs)				\
-0:	addis	rd,rs,-KERNELBASE@h;		\
+0:	addis	rd,rs,-PAGE_OFFSET@h;		\
 	.section ".vtop_fixup","aw";		\
 	.align  1;				\
 	.long   0b;				\
 	.previous
 
 #define tovirt(rd,rs)				\
-0:	addis	rd,rs,KERNELBASE@h;		\
+0:	addis	rd,rs,PAGE_OFFSET@h;		\
 	.section ".ptov_fixup","aw";		\
 	.align  1;				\
 	.long   0b;				\
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 2660619..a1c4cfd 100644
--- ...
Previous thread: powerpc/32: Allow __ioremap on RAM addresses for kdump kernel by Linux Kernel Mailing List on Sunday, December 28, 2008 - 6:05 pm. (1 message)

Next thread: powerpc/32: Wire up the trampoline code for kdump by Linux Kernel Mailing List on Sunday, December 28, 2008 - 6:05 pm. (1 message)