diff options
author | Michal Simek <monstr@monstr.eu> | 2012-08-01 04:29:28 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2012-10-04 08:52:49 -0400 |
commit | 6e80cff5430efb9dc8c12cb066e12c62d0a2d9d2 (patch) | |
tree | 9e536194b12b6d24aa4c0679b89a670dcf07b938 /arch/microblaze | |
parent | 9f78d3b5ab97a22a7e836312c495804ee4bca4ab (diff) |
microblaze: Support 4k/16k/64k pages
Add support for page size which is supported by MMU.
Remove 8k and 32k page size because they are not supported
by MMU.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/Kconfig | 7 | ||||
-rw-r--r-- | arch/microblaze/include/asm/page.h | 6 | ||||
-rw-r--r-- | arch/microblaze/kernel/hw_exception_handler.S | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index ab9afcaa7f6a..6133bed2b855 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -243,14 +243,11 @@ choice | |||
243 | config MICROBLAZE_4K_PAGES | 243 | config MICROBLAZE_4K_PAGES |
244 | bool "4k page size" | 244 | bool "4k page size" |
245 | 245 | ||
246 | config MICROBLAZE_8K_PAGES | ||
247 | bool "8k page size" | ||
248 | |||
249 | config MICROBLAZE_16K_PAGES | 246 | config MICROBLAZE_16K_PAGES |
250 | bool "16k page size" | 247 | bool "16k page size" |
251 | 248 | ||
252 | config MICROBLAZE_32K_PAGES | 249 | config MICROBLAZE_64K_PAGES |
253 | bool "32k page size" | 250 | bool "64k page size" |
254 | 251 | ||
255 | endchoice | 252 | endchoice |
256 | 253 | ||
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index dd9ea9d6b765..85a5ae8e9bd0 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h | |||
@@ -23,12 +23,10 @@ | |||
23 | #ifdef __KERNEL__ | 23 | #ifdef __KERNEL__ |
24 | 24 | ||
25 | /* PAGE_SHIFT determines the page size */ | 25 | /* PAGE_SHIFT determines the page size */ |
26 | #if defined(CONFIG_MICROBLAZE_32K_PAGES) | 26 | #if defined(CONFIG_MICROBLAZE_64K_PAGES) |
27 | #define PAGE_SHIFT 15 | 27 | #define PAGE_SHIFT 16 |
28 | #elif defined(CONFIG_MICROBLAZE_16K_PAGES) | 28 | #elif defined(CONFIG_MICROBLAZE_16K_PAGES) |
29 | #define PAGE_SHIFT 14 | 29 | #define PAGE_SHIFT 14 |
30 | #elif defined(CONFIG_MICROBLAZE_8K_PAGES) | ||
31 | #define PAGE_SHIFT 13 | ||
32 | #else | 30 | #else |
33 | #define PAGE_SHIFT 12 | 31 | #define PAGE_SHIFT 12 |
34 | #endif | 32 | #endif |
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 76a069dc13cb..0a573df47ff8 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -862,7 +862,13 @@ ex_handler_done: | |||
862 | * bits 20 and 21 are zero. | 862 | * bits 20 and 21 are zero. |
863 | */ | 863 | */ |
864 | andi r3, r3, PAGE_MASK | 864 | andi r3, r3, PAGE_MASK |
865 | #ifdef CONFIG_MICROBLAZE_64K_PAGES | ||
866 | ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_64K) | ||
867 | #elif CONFIG_MICROBLAZE_16K_PAGES | ||
868 | ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_16K) | ||
869 | #else | ||
865 | ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_4K) | 870 | ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_4K) |
871 | #endif | ||
866 | mts rtlbhi, r3 /* Load TLB HI */ | 872 | mts rtlbhi, r3 /* Load TLB HI */ |
867 | nop | 873 | nop |
868 | 874 | ||