mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
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>
This commit is contained in:
parent
9f78d3b5ab
commit
6e80cff543
@ -243,14 +243,11 @@ choice
|
|||||||
config MICROBLAZE_4K_PAGES
|
config MICROBLAZE_4K_PAGES
|
||||||
bool "4k page size"
|
bool "4k page size"
|
||||||
|
|
||||||
config MICROBLAZE_8K_PAGES
|
|
||||||
bool "8k page size"
|
|
||||||
|
|
||||||
config MICROBLAZE_16K_PAGES
|
config MICROBLAZE_16K_PAGES
|
||||||
bool "16k page size"
|
bool "16k page size"
|
||||||
|
|
||||||
config MICROBLAZE_32K_PAGES
|
config MICROBLAZE_64K_PAGES
|
||||||
bool "32k page size"
|
bool "64k page size"
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
@ -23,12 +23,10 @@
|
|||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
/* PAGE_SHIFT determines the page size */
|
/* PAGE_SHIFT determines the page size */
|
||||||
#if defined(CONFIG_MICROBLAZE_32K_PAGES)
|
#if defined(CONFIG_MICROBLAZE_64K_PAGES)
|
||||||
#define PAGE_SHIFT 15
|
#define PAGE_SHIFT 16
|
||||||
#elif defined(CONFIG_MICROBLAZE_16K_PAGES)
|
#elif defined(CONFIG_MICROBLAZE_16K_PAGES)
|
||||||
#define PAGE_SHIFT 14
|
#define PAGE_SHIFT 14
|
||||||
#elif defined(CONFIG_MICROBLAZE_8K_PAGES)
|
|
||||||
#define PAGE_SHIFT 13
|
|
||||||
#else
|
#else
|
||||||
#define PAGE_SHIFT 12
|
#define PAGE_SHIFT 12
|
||||||
#endif
|
#endif
|
||||||
|
@ -862,7 +862,13 @@ ex_handler_done:
|
|||||||
* bits 20 and 21 are zero.
|
* bits 20 and 21 are zero.
|
||||||
*/
|
*/
|
||||||
andi r3, r3, PAGE_MASK
|
andi r3, r3, PAGE_MASK
|
||||||
|
#ifdef CONFIG_MICROBLAZE_64K_PAGES
|
||||||
|
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_64K)
|
||||||
|
#elif CONFIG_MICROBLAZE_16K_PAGES
|
||||||
|
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_16K)
|
||||||
|
#else
|
||||||
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_4K)
|
ori r3, r3, TLB_VALID | TLB_PAGESZ(PAGESZ_4K)
|
||||||
|
#endif
|
||||||
mts rtlbhi, r3 /* Load TLB HI */
|
mts rtlbhi, r3 /* Load TLB HI */
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user