diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2024-02-23 23:18:37 +0100 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2024-03-06 19:28:26 +0100 |
| commit | ba89f9c8ccbad3998cbfbf4012eff182f77b42aa (patch) | |
| tree | 8ad229ae23cea709b4f7fb8eec697d1c9480d15c /arch/hexagon/include | |
| parent | mm: Remove broken pfn_to_virt() on arch csky/hexagon/openrisc (diff) | |
| download | linux-ba89f9c8ccbad3998cbfbf4012eff182f77b42aa.tar.gz linux-ba89f9c8ccbad3998cbfbf4012eff182f77b42aa.zip | |
arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions
These four architectures define the same Kconfig symbols for configuring
the page size. Move the logic into a common place where it can be shared
with all other architectures.
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/hexagon/include')
| -rw-r--r-- | arch/hexagon/include/asm/page.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/hexagon/include/asm/page.h b/arch/hexagon/include/asm/page.h index 32394b7e752e..8a6af57274c2 100644 --- a/arch/hexagon/include/asm/page.h +++ b/arch/hexagon/include/asm/page.h @@ -13,27 +13,22 @@ /* This is probably not the most graceful way to handle this. */ #ifdef CONFIG_PAGE_SIZE_4KB -#define PAGE_SHIFT 12 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_4KB #endif #ifdef CONFIG_PAGE_SIZE_16KB -#define PAGE_SHIFT 14 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_16KB #endif #ifdef CONFIG_PAGE_SIZE_64KB -#define PAGE_SHIFT 16 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_64KB #endif #ifdef CONFIG_PAGE_SIZE_256KB -#define PAGE_SHIFT 18 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_256KB #endif #ifdef CONFIG_PAGE_SIZE_1MB -#define PAGE_SHIFT 20 #define HEXAGON_L1_PTE_SIZE __HVM_PDE_S_1MB #endif @@ -50,6 +45,7 @@ #define HVM_HUGEPAGE_SIZE 0x5 #endif +#define PAGE_SHIFT CONFIG_PAGE_SHIFT #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) |
