Skip to content

Commit 5394f1e

Browse files
committed
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 <[email protected]> Acked-by: Heiko Carstens <[email protected]> Acked-by: Stafford Horne <[email protected]> Acked-by: Johannes Berg <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent d3e5bab commit 5394f1e

File tree

28 files changed

+32
-19
lines changed

28 files changed

+32
-19
lines changed

arch/alpha/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ config ALPHA
1414
select PCI_DOMAINS if PCI
1515
select PCI_SYSCALL if PCI
1616
select HAVE_ASM_MODVERSIONS
17+
select HAVE_PAGE_SIZE_8KB
1718
select HAVE_PCSPKR_PLATFORM
1819
select HAVE_PERF_EVENTS
1920
select NEED_DMA_MAP_STATE

arch/alpha/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <asm/pal.h>
77

88
/* PAGE_SHIFT determines the page size */
9-
#define PAGE_SHIFT 13
9+
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
1010
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
1111
#define PAGE_MASK (~(PAGE_SIZE-1))
1212

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ config ARM
116116
select HAVE_MOD_ARCH_SPECIFIC
117117
select HAVE_NMI
118118
select HAVE_OPTPROBES if !THUMB2_KERNEL
119+
select HAVE_PAGE_SIZE_4KB
119120
select HAVE_PCI if MMU
120121
select HAVE_PERF_EVENTS
121122
select HAVE_PERF_REGS

arch/arm/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define _ASMARM_PAGE_H
99

1010
/* PAGE_SHIFT determines the page size */
11-
#define PAGE_SHIFT 12
11+
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
1212
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
1313
#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
1414

arch/csky/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ config CSKY
8989
select HAVE_KPROBES if !CPU_CK610
9090
select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
9191
select HAVE_KRETPROBES if !CPU_CK610
92+
select HAVE_PAGE_SIZE_4KB
9293
select HAVE_PERF_EVENTS
9394
select HAVE_PERF_REGS
9495
select HAVE_PERF_USER_STACK_DUMP

arch/csky/include/asm/page.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/*
1111
* PAGE_SHIFT determines the page size: 4KB
1212
*/
13-
#define PAGE_SHIFT 12
13+
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
1414
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
1515
#define PAGE_MASK (~(PAGE_SIZE - 1))
1616
#define THREAD_SIZE (PAGE_SIZE * 2)

arch/m68k/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,15 @@ config MMU
8484

8585
config MMU_MOTOROLA
8686
bool
87+
select HAVE_PAGE_SIZE_4KB
8788

8889
config MMU_COLDFIRE
90+
select HAVE_PAGE_SIZE_8KB
8991
bool
9092

9193
config MMU_SUN3
9294
bool
95+
select HAVE_PAGE_SIZE_8KB
9396
depends on MMU && !MMU_MOTOROLA && !MMU_COLDFIRE
9497

9598
config ARCH_SUPPORTS_KEXEC

arch/m68k/Kconfig.cpu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ config COLDFIRE
3030
select GENERIC_CSUM
3131
select GPIOLIB
3232
select HAVE_LEGACY_CLK
33+
select HAVE_PAGE_SIZE_8KB if !MMU
3334

3435
endchoice
3536

@@ -45,6 +46,7 @@ config M68000
4546
select GENERIC_CSUM
4647
select CPU_NO_EFFICIENT_FFS
4748
select HAVE_ARCH_HASH
49+
select HAVE_PAGE_SIZE_4KB
4850
select LEGACY_TIMER_TICK
4951
help
5052
The Freescale (was Motorola) 68000 CPU is the first generation of

arch/m68k/include/asm/page.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
#include <asm/page_offset.h>
88

99
/* PAGE_SHIFT determines the page size */
10-
#if defined(CONFIG_SUN3) || defined(CONFIG_COLDFIRE)
11-
#define PAGE_SHIFT 13
12-
#else
13-
#define PAGE_SHIFT 12
14-
#endif
10+
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
1511
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
1612
#define PAGE_MASK (~(PAGE_SIZE-1))
1713
#define PAGE_OFFSET (PAGE_OFFSET_RAW)

arch/microblaze/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ config MICROBLAZE
3131
select HAVE_FTRACE_MCOUNT_RECORD
3232
select HAVE_FUNCTION_GRAPH_TRACER
3333
select HAVE_FUNCTION_TRACER
34+
select HAVE_PAGE_SIZE_4KB
3435
select HAVE_PCI
3536
select IRQ_DOMAIN
3637
select XILINX_INTC

0 commit comments

Comments
 (0)