microblaze: Allow PAGE_SIZE configuration
Allow developer to configure memory page size at compile time. Larger pages can improve performance on some workloads. Based on PowerPC code. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:

committed by
Michal Simek

parent
0d9ec762af
commit
ba9c4f88d7
@@ -23,8 +23,16 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT (12)
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#if defined(CONFIG_MICROBLAZE_32K_PAGES)
|
||||
#define PAGE_SHIFT 15
|
||||
#elif defined(CONFIG_MICROBLAZE_16K_PAGES)
|
||||
#define PAGE_SHIFT 14
|
||||
#elif defined(CONFIG_MICROBLAZE_8K_PAGES)
|
||||
#define PAGE_SHIFT 13
|
||||
#else
|
||||
#define PAGE_SHIFT 12
|
||||
#endif
|
||||
#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
#define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_KERNEL_BASE_ADDR))
|
||||
|
Reference in New Issue
Block a user