diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-12-26 01:29:19 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-02-12 20:54:44 -0500 |
commit | 7a847f819063b80cc5b38d39e8aad4d60f6ca2fd (patch) | |
tree | f60ac00a1860d188e83f31883df7be807e500bff /arch | |
parent | aa4a5db52a440d32eab134bfb79d2c9af71eedb4 (diff) |
sh: More tidying for large base pages.
There were a few more things that needed fixing up, namely THREAD_SIZE
and the TLB miss handler where certain PTRS_PER_PGD == PTRS_PER_PTE
assumptions were being made.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/Kconfig | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/entry.S | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4f3891215b87..04cbc88e9b9f 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -596,6 +596,8 @@ menu "Boot options" | |||
596 | config ZERO_PAGE_OFFSET | 596 | config ZERO_PAGE_OFFSET |
597 | hex "Zero page offset" | 597 | hex "Zero page offset" |
598 | default "0x00004000" if SH_MPC1211 || SH_SH03 | 598 | default "0x00004000" if SH_MPC1211 || SH_SH03 |
599 | default "0x00010000" if PAGE_SIZE_64KB | ||
600 | default "0x00002000" if PAGE_SIZE_8KB | ||
599 | default "0x00001000" | 601 | default "0x00001000" |
600 | help | 602 | help |
601 | This sets the default offset of zero page. | 603 | This sets the default offset of zero page. |
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index 014ac37ca16a..1c520358ba90 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
@@ -332,12 +332,6 @@ general_exception: | |||
332 | ! | 332 | ! |
333 | ! | 333 | ! |
334 | 334 | ||
335 | /* This code makes some assumptions to improve performance. | ||
336 | * Make sure they are stil true. */ | ||
337 | #if PTRS_PER_PGD != PTRS_PER_PTE | ||
338 | #error PGD and PTE sizes don't match | ||
339 | #endif | ||
340 | |||
341 | /* gas doesn't flag impossible values for mov #immediate as an error */ | 335 | /* gas doesn't flag impossible values for mov #immediate as an error */ |
342 | #if (_PAGE_PRESENT >> 2) > 0x7f | 336 | #if (_PAGE_PRESENT >> 2) > 0x7f |
343 | #error cannot load PAGE_PRESENT as an immediate | 337 | #error cannot load PAGE_PRESENT as an immediate |
@@ -399,6 +393,7 @@ tlb_miss: | |||
399 | 393 | ||
400 | bt 20f ! 110 BR | 394 | bt 20f ! 110 BR |
401 | 395 | ||
396 | mov.w 3f, k3 ! 8 LS (latency=2) (PTRS_PER_PTE-1) << 2 | ||
402 | and k3, k0 ! 78 EX | 397 | and k3, k0 ! 78 EX |
403 | mov.w 5f, k4 ! 8 LS (latency=2) _PAGE_PRESENT | 398 | mov.w 5f, k4 ! 8 LS (latency=2) _PAGE_PRESENT |
404 | 399 | ||
@@ -491,8 +486,9 @@ tlb_miss: | |||
491 | .align 5 | 486 | .align 5 |
492 | ! Once cache line if possible... | 487 | ! Once cache line if possible... |
493 | 1: .long swapper_pg_dir | 488 | 1: .long swapper_pg_dir |
489 | 3: .short (PTRS_PER_PTE-1) << 2 | ||
494 | 4: .short (PTRS_PER_PGD-1) << 2 | 490 | 4: .short (PTRS_PER_PGD-1) << 2 |
495 | 5: .short _PAGE_PRESENT | 491 | 5: .long _PAGE_PRESENT |
496 | 7: .long _PAGE_FLAGS_HARDWARE_MASK | 492 | 7: .long _PAGE_FLAGS_HARDWARE_MASK |
497 | 8: .long MMU_PTEH | 493 | 8: .long MMU_PTEH |
498 | #ifdef COUNT_EXCEPTIONS | 494 | #ifdef COUNT_EXCEPTIONS |