diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-21 01:34:33 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:51 -0500 |
commit | 36763b22bee56713057762bb0756e8075b5bb918 (patch) | |
tree | 102bf357b56efd2299991b22a13c54467491ff7a | |
parent | 6deb6f9129591a2386f5c125d54a22ab78fc8b61 (diff) |
sh: Switch SH-5 to use CONFIG_PAGE_OFFSET.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh5/entry.S | 22 | ||||
-rw-r--r-- | arch/sh/kernel/head_64.S | 8 | ||||
-rw-r--r-- | arch/sh/kernel/vmlinux_64.lds.S | 4 | ||||
-rw-r--r-- | arch/sh/mm/Kconfig | 3 |
5 files changed, 20 insertions, 19 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 15161f1851a5..e08d4d27d8d6 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -85,7 +85,7 @@ KBUILD_IMAGE := arch/sh/boot/zImage | |||
85 | ifdef CONFIG_SUPERH32 | 85 | ifdef CONFIG_SUPERH32 |
86 | LDFLAGS_vmlinux += -e _stext | 86 | LDFLAGS_vmlinux += -e _stext |
87 | else | 87 | else |
88 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \ | 88 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ |
89 | --defsym phys_stext_shmedia=phys_stext+1 \ | 89 | --defsym phys_stext_shmedia=phys_stext+1 \ |
90 | -e phys_stext_shmedia | 90 | -e phys_stext_shmedia |
91 | endif | 91 | endif |
diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S index 81010b9308b2..0f65bb4372da 100644 --- a/arch/sh/kernel/cpu/sh5/entry.S +++ b/arch/sh/kernel/cpu/sh5/entry.S | |||
@@ -432,7 +432,7 @@ reset_or_panic: | |||
432 | synco /* TAKum03020 (but probably a good idea anyway.) */ | 432 | synco /* TAKum03020 (but probably a good idea anyway.) */ |
433 | putcon SP, DCR | 433 | putcon SP, DCR |
434 | /* First save r0-1 and tr0, as we need to use these */ | 434 | /* First save r0-1 and tr0, as we need to use these */ |
435 | movi resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP | 435 | movi resvec_save_area-CONFIG_PAGE_OFFSET, SP |
436 | st.q SP, 0, r0 | 436 | st.q SP, 0, r0 |
437 | st.q SP, 8, r1 | 437 | st.q SP, 8, r1 |
438 | gettr tr0, r0 | 438 | gettr tr0, r0 |
@@ -442,7 +442,7 @@ reset_or_panic: | |||
442 | getcon EXPEVT, r0 | 442 | getcon EXPEVT, r0 |
443 | movi RESET_CAUSE, r1 | 443 | movi RESET_CAUSE, r1 |
444 | sub r1, r0, r1 /* r1=0 if reset */ | 444 | sub r1, r0, r1 /* r1=0 if reset */ |
445 | movi _stext-CONFIG_CACHED_MEMORY_OFFSET, r0 | 445 | movi _stext-CONFIG_PAGE_OFFSET, r0 |
446 | ori r0, 1, r0 | 446 | ori r0, 1, r0 |
447 | ptabs r0, tr0 | 447 | ptabs r0, tr0 |
448 | beqi r1, 0, tr0 /* Jump to start address if reset */ | 448 | beqi r1, 0, tr0 /* Jump to start address if reset */ |
@@ -454,7 +454,7 @@ reset_or_panic: | |||
454 | beqi r1, 0, tr0 /* jump if single step */ | 454 | beqi r1, 0, tr0 /* jump if single step */ |
455 | 455 | ||
456 | /* Now jump to where we save the registers. */ | 456 | /* Now jump to where we save the registers. */ |
457 | movi panic_stash_regs-CONFIG_CACHED_MEMORY_OFFSET, r1 | 457 | movi panic_stash_regs-CONFIG_PAGE_OFFSET, r1 |
458 | ptabs r1, tr0 | 458 | ptabs r1, tr0 |
459 | blink tr0, r63 | 459 | blink tr0, r63 |
460 | 460 | ||
@@ -490,7 +490,7 @@ debug_exception: | |||
490 | */ | 490 | */ |
491 | putcon SP, DCR | 491 | putcon SP, DCR |
492 | /* Save SSR & SPC, together with R0 & R1, as we need to use 2 regs. */ | 492 | /* Save SSR & SPC, together with R0 & R1, as we need to use 2 regs. */ |
493 | movi resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP | 493 | movi resvec_save_area-CONFIG_PAGE_OFFSET, SP |
494 | 494 | ||
495 | /* With the MMU off, we are bypassing the cache, so purge any | 495 | /* With the MMU off, we are bypassing the cache, so purge any |
496 | * data that will be made stale by the following stores. | 496 | * data that will be made stale by the following stores. |
@@ -558,7 +558,7 @@ debug_interrupt: | |||
558 | /* Save original stack pointer into KCR1 */ | 558 | /* Save original stack pointer into KCR1 */ |
559 | synco | 559 | synco |
560 | putcon SP, KCR1 | 560 | putcon SP, KCR1 |
561 | movi resvec_save_area-CONFIG_CACHED_MEMORY_OFFSET, SP | 561 | movi resvec_save_area-CONFIG_PAGE_OFFSET, SP |
562 | ocbp SP, 0 | 562 | ocbp SP, 0 |
563 | ocbp SP, 32 | 563 | ocbp SP, 32 |
564 | synco | 564 | synco |
@@ -607,7 +607,7 @@ debug_interrupt: | |||
607 | movi EVENT_FAULT_NOT_TLB, r4 | 607 | movi EVENT_FAULT_NOT_TLB, r4 |
608 | 608 | ||
609 | or SP, ZERO, r5 | 609 | or SP, ZERO, r5 |
610 | movi CONFIG_CACHED_MEMORY_OFFSET, r6 | 610 | movi CONFIG_PAGE_OFFSET, r6 |
611 | add r6, r5, r5 | 611 | add r6, r5, r5 |
612 | getcon KCR1, SP | 612 | getcon KCR1, SP |
613 | 613 | ||
@@ -1366,7 +1366,7 @@ route_to_panic_handler: | |||
1366 | last-chance debugging, e.g. if no output wants to go to the console. | 1366 | last-chance debugging, e.g. if no output wants to go to the console. |
1367 | */ | 1367 | */ |
1368 | 1368 | ||
1369 | movi panic_handler - CONFIG_CACHED_MEMORY_OFFSET, r1 | 1369 | movi panic_handler - CONFIG_PAGE_OFFSET, r1 |
1370 | ptabs r1, tr0 | 1370 | ptabs r1, tr0 |
1371 | pta 1f, tr1 | 1371 | pta 1f, tr1 |
1372 | gettr tr1, r0 | 1372 | gettr tr1, r0 |
@@ -1408,7 +1408,7 @@ peek_real_address_q: | |||
1408 | andc r1, r36, r1 /* turn sr.mmu off in real mode section */ | 1408 | andc r1, r36, r1 /* turn sr.mmu off in real mode section */ |
1409 | 1409 | ||
1410 | putcon r1, ssr | 1410 | putcon r1, ssr |
1411 | movi .peek0 - CONFIG_CACHED_MEMORY_OFFSET, r36 /* real mode target address */ | 1411 | movi .peek0 - CONFIG_PAGE_OFFSET, r36 /* real mode target address */ |
1412 | movi 1f, r37 /* virtual mode return addr */ | 1412 | movi 1f, r37 /* virtual mode return addr */ |
1413 | putcon r36, spc | 1413 | putcon r36, spc |
1414 | 1414 | ||
@@ -1457,7 +1457,7 @@ poke_real_address_q: | |||
1457 | andc r1, r36, r1 /* turn sr.mmu off in real mode section */ | 1457 | andc r1, r36, r1 /* turn sr.mmu off in real mode section */ |
1458 | 1458 | ||
1459 | putcon r1, ssr | 1459 | putcon r1, ssr |
1460 | movi .poke0-CONFIG_CACHED_MEMORY_OFFSET, r36 /* real mode target address */ | 1460 | movi .poke0-CONFIG_PAGE_OFFSET, r36 /* real mode target address */ |
1461 | movi 1f, r37 /* virtual mode return addr */ | 1461 | movi 1f, r37 /* virtual mode return addr */ |
1462 | putcon r36, spc | 1462 | putcon r36, spc |
1463 | 1463 | ||
@@ -1954,7 +1954,7 @@ panic_stash_regs: | |||
1954 | getcon SSR,r3 | 1954 | getcon SSR,r3 |
1955 | getcon EXPEVT,r4 | 1955 | getcon EXPEVT,r4 |
1956 | /* Prepare to jump to C - physical address */ | 1956 | /* Prepare to jump to C - physical address */ |
1957 | movi panic_handler-CONFIG_CACHED_MEMORY_OFFSET, r1 | 1957 | movi panic_handler-CONFIG_PAGE_OFFSET, r1 |
1958 | ori r1, 1, r1 | 1958 | ori r1, 1, r1 |
1959 | ptabs r1, tr0 | 1959 | ptabs r1, tr0 |
1960 | getcon DCR, SP | 1960 | getcon DCR, SP |
@@ -2055,7 +2055,7 @@ trap_init: | |||
2055 | andi r19, -4, r19 /* reset MMUOFF + reserved */ | 2055 | andi r19, -4, r19 /* reset MMUOFF + reserved */ |
2056 | /* For RESVEC exceptions we force the MMU off, which means we need the | 2056 | /* For RESVEC exceptions we force the MMU off, which means we need the |
2057 | physical address. */ | 2057 | physical address. */ |
2058 | movi LRESVEC_block-CONFIG_CACHED_MEMORY_OFFSET, r20 | 2058 | movi LRESVEC_block-CONFIG_PAGE_OFFSET, r20 |
2059 | andi r20, -4, r20 /* reset reserved */ | 2059 | andi r20, -4, r20 /* reset reserved */ |
2060 | ori r20, 1, r20 /* set MMUOFF */ | 2060 | ori r20, 1, r20 /* set MMUOFF */ |
2061 | putcon r19, VBR | 2061 | putcon r19, VBR |
diff --git a/arch/sh/kernel/head_64.S b/arch/sh/kernel/head_64.S index 55ae281893f8..c969db592bef 100644 --- a/arch/sh/kernel/head_64.S +++ b/arch/sh/kernel/head_64.S | |||
@@ -38,9 +38,9 @@ | |||
38 | #define MMUDR_END DTLB_LAST_VAR_UNRESTRICTED+TLB_STEP | 38 | #define MMUDR_END DTLB_LAST_VAR_UNRESTRICTED+TLB_STEP |
39 | #define MMUDR_STEP TLB_STEP | 39 | #define MMUDR_STEP TLB_STEP |
40 | 40 | ||
41 | /* Safety check : CONFIG_CACHED_MEMORY_OFFSET has to be a multiple of 512Mb */ | 41 | /* Safety check : CONFIG_PAGE_OFFSET has to be a multiple of 512Mb */ |
42 | #if (CONFIG_CACHED_MEMORY_OFFSET & ((1UL<<29)-1)) | 42 | #if (CONFIG_PAGE_OFFSET & ((1UL<<29)-1)) |
43 | #error "CONFIG_CACHED_MEMORY_OFFSET must be a multiple of 512Mb" | 43 | #error "CONFIG_PAGE_OFFSET must be a multiple of 512Mb" |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* | 46 | /* |
@@ -49,7 +49,7 @@ | |||
49 | /* Deal safely with the case where the base of RAM is not 512Mb aligned */ | 49 | /* Deal safely with the case where the base of RAM is not 512Mb aligned */ |
50 | 50 | ||
51 | #define ALIGN_512M_MASK (0xffffffffe0000000) | 51 | #define ALIGN_512M_MASK (0xffffffffe0000000) |
52 | #define ALIGNED_EFFECTIVE ((CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START) & ALIGN_512M_MASK) | 52 | #define ALIGNED_EFFECTIVE ((CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START) & ALIGN_512M_MASK) |
53 | #define ALIGNED_PHYSICAL (CONFIG_MEMORY_START & ALIGN_512M_MASK) | 53 | #define ALIGNED_PHYSICAL (CONFIG_MEMORY_START & ALIGN_512M_MASK) |
54 | 54 | ||
55 | #define MMUIR_TEXT_H (0x0000000000000003 | ALIGNED_EFFECTIVE) | 55 | #define MMUIR_TEXT_H (0x0000000000000003 | ALIGNED_EFFECTIVE) |
diff --git a/arch/sh/kernel/vmlinux_64.lds.S b/arch/sh/kernel/vmlinux_64.lds.S index f0f5771657dd..2fd0f7401484 100644 --- a/arch/sh/kernel/vmlinux_64.lds.S +++ b/arch/sh/kernel/vmlinux_64.lds.S | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/cache.h> | 24 | #include <asm/cache.h> |
25 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
26 | 26 | ||
27 | #define LOAD_OFFSET CONFIG_CACHED_MEMORY_OFFSET | 27 | #define LOAD_OFFSET CONFIG_PAGE_OFFSET |
28 | #include <asm-generic/vmlinux.lds.h> | 28 | #include <asm-generic/vmlinux.lds.h> |
29 | 29 | ||
30 | OUTPUT_ARCH(sh:sh5) | 30 | OUTPUT_ARCH(sh:sh5) |
@@ -34,7 +34,7 @@ OUTPUT_ARCH(sh:sh5) | |||
34 | ENTRY(__start) | 34 | ENTRY(__start) |
35 | SECTIONS | 35 | SECTIONS |
36 | { | 36 | { |
37 | . = CONFIG_CACHED_MEMORY_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE; | 37 | . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + PAGE_SIZE; |
38 | _text = .; /* Text and read-only data */ | 38 | _text = .; /* Text and read-only data */ |
39 | 39 | ||
40 | .empty_zero_page : C_PHYS(.empty_zero_page) { | 40 | .empty_zero_page : C_PHYS(.empty_zero_page) { |
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 7ff26c1f4e9c..2af950784e66 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -17,7 +17,8 @@ config MMU | |||
17 | 17 | ||
18 | config PAGE_OFFSET | 18 | config PAGE_OFFSET |
19 | hex | 19 | hex |
20 | default "0x80000000" if MMU | 20 | default "0x80000000" if MMU && SUPERH32 |
21 | default "0x20000000" if MMU && SUPERH64 | ||
21 | default "0x00000000" | 22 | default "0x00000000" |
22 | 23 | ||
23 | config MEMORY_START | 24 | config MEMORY_START |