aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/m68k
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-02-26 17:14:13 +0100
committerArnd Bergmann <arnd@arndb.de>2024-03-06 19:29:09 +0100
commit5394f1e9b687bcf26595cabf83483e568676128d (patch)
treea2cd24c1b83dd794efc4d278e36a53495def2e45 /arch/m68k
parentarch: simplify architecture specific page size configuration (diff)
downloadwireguard-linux-5394f1e9b687bcf26595cabf83483e568676128d.tar.xz
wireguard-linux-5394f1e9b687bcf26595cabf83483e568676128d.zip
arch: define CONFIG_PAGE_SIZE_*KB on all architectures
Most architectures only support a single hardcoded page size. In order to ensure that each one of these sets the corresponding Kconfig symbols, change over the PAGE_SHIFT definition to the common one and allow only the hardware page size to be selected. Acked-by: Guo Ren <guoren@kernel.org> Acked-by: Heiko Carstens <hca@linux.ibm.com> Acked-by: Stafford Horne <shorne@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/Kconfig3
-rw-r--r--arch/m68k/Kconfig.cpu2
-rw-r--r--arch/m68k/include/asm/page.h6
3 files changed, 6 insertions, 5 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 4b3e93cac723..7b709453d5e7 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -84,12 +84,15 @@ config MMU
config MMU_MOTOROLA
bool
+ select HAVE_PAGE_SIZE_4KB
config MMU_COLDFIRE
+ select HAVE_PAGE_SIZE_8KB
bool
config MMU_SUN3
bool
+ select HAVE_PAGE_SIZE_8KB
depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE
config ARCH_SUPPORTS_KEXEC
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index 9dcf245c9cbf..c777a129768a 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -30,6 +30,7 @@ config COLDFIRE
select GENERIC_CSUM
select GPIOLIB
select HAVE_LEGACY_CLK
+ select HAVE_PAGE_SIZE_8KB if !MMU
endchoice
@@ -45,6 +46,7 @@ config M68000
select GENERIC_CSUM
select CPU_NO_EFFICIENT_FFS
select HAVE_ARCH_HASH
+ select HAVE_PAGE_SIZE_4KB
select LEGACY_TIMER_TICK
help
The Freescale (was Motorola) 68000 CPU is the first generation of
diff --git a/arch/m68k/include/asm/page.h b/arch/m68k/include/asm/page.h
index a5993ad83ed8..8cfb84b49975 100644
--- a/arch/m68k/include/asm/page.h
+++ b/arch/m68k/include/asm/page.h
@@ -7,11 +7,7 @@
#include <asm/page_offset.h>
/* PAGE_SHIFT determines the page size */
-#if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
-#define PAGE_SHIFT 13
-#else
-#define PAGE_SHIFT 12
-#endif
+#define PAGE_SHIFT CONFIG_PAGE_SHIFT
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#define PAGE_OFFSET (PAGE_OFFSET_RAW)