mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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>
This commit is contained in:
parent
d3e5bab923
commit
5394f1e9b6
@ -14,6 +14,7 @@ config ALPHA
|
||||
select PCI_DOMAINS if PCI
|
||||
select PCI_SYSCALL if PCI
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
select HAVE_PAGE_SIZE_8KB
|
||||
select HAVE_PCSPKR_PLATFORM
|
||||
select HAVE_PERF_EVENTS
|
||||
select NEED_DMA_MAP_STATE
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <asm/pal.h>
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 13
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -116,6 +116,7 @@ config ARM
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_NMI
|
||||
select HAVE_OPTPROBES if !THUMB2_KERNEL
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCI if MMU
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
|
@ -8,7 +8,7 @@
|
||||
#define _ASMARM_PAGE_H
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~((1 << PAGE_SHIFT) - 1))
|
||||
|
||||
|
@ -89,6 +89,7 @@ config CSKY
|
||||
select HAVE_KPROBES if !CPU_CK610
|
||||
select HAVE_KPROBES_ON_FTRACE if !CPU_CK610
|
||||
select HAVE_KRETPROBES if !CPU_CK610
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
select HAVE_PERF_USER_STACK_DUMP
|
||||
|
@ -10,7 +10,7 @@
|
||||
/*
|
||||
* PAGE_SHIFT determines the page size: 4KB
|
||||
*/
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define THREAD_SIZE (PAGE_SIZE * 2)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -31,6 +31,7 @@ config MICROBLAZE
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
select HAVE_FUNCTION_GRAPH_TRACER
|
||||
select HAVE_FUNCTION_TRACER
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCI
|
||||
select IRQ_DOMAIN
|
||||
select XILINX_INTC
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -15,6 +15,7 @@ config NIOS2
|
||||
select GENERIC_IRQ_SHOW
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_KGDB
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select IRQ_DOMAIN
|
||||
select LOCK_MM_AND_FIND_VMA
|
||||
select MODULES_USE_ELF_RELA
|
||||
|
@ -21,7 +21,7 @@
|
||||
/*
|
||||
* PAGE_SHIFT determines the page size
|
||||
*/
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
|
||||
|
@ -25,6 +25,7 @@ config OPENRISC
|
||||
select GENERIC_CPU_DEVICES
|
||||
select HAVE_PCI
|
||||
select HAVE_UID16
|
||||
select HAVE_PAGE_SIZE_8KB
|
||||
select GENERIC_ATOMIC64
|
||||
select GENERIC_CLOCKEVENTS_BROADCAST
|
||||
select GENERIC_SMP_IDLE_THREAD
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
|
||||
#define PAGE_SHIFT 13
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#ifdef __ASSEMBLY__
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#else
|
||||
|
@ -136,6 +136,7 @@ config RISCV
|
||||
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
|
||||
select HAVE_MOVE_PMD
|
||||
select HAVE_MOVE_PUD
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCI
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/const.h>
|
||||
|
||||
#define PAGE_SHIFT (12)
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
|
||||
|
@ -199,6 +199,7 @@ config S390
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_NMI
|
||||
select HAVE_NOP_MCOUNT
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCI
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_REGS
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <linux/const.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
#define _PAGE_SHIFT 12
|
||||
#define _PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define _PAGE_SIZE (_AC(1, UL) << _PAGE_SHIFT)
|
||||
#define _PAGE_MASK (~(_PAGE_SIZE - 1))
|
||||
|
||||
|
@ -58,6 +58,7 @@ config SPARC32
|
||||
select DMA_DIRECT_REMAP
|
||||
select GENERIC_ATOMIC64
|
||||
select HAVE_UID16
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select LOCK_MM_AND_FIND_VMA
|
||||
select OLD_SIGACTION
|
||||
select ZONE_DMA
|
||||
@ -75,6 +76,7 @@ config SPARC64
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
||||
select HAVE_DYNAMIC_FTRACE
|
||||
select HAVE_FTRACE_MCOUNT_RECORD
|
||||
select HAVE_PAGE_SIZE_8KB
|
||||
select HAVE_SYSCALL_TRACEPOINTS
|
||||
select HAVE_CONTEXT_TRACKING_USER
|
||||
select HAVE_TIF_NOHZ
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include <linux/const.h>
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
#include <linux/const.h>
|
||||
|
||||
#define PAGE_SHIFT 13
|
||||
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -20,6 +20,7 @@ config UML
|
||||
select HAVE_UID16
|
||||
select HAVE_DEBUG_KMEMLEAK
|
||||
select HAVE_DEBUG_BUGVERBOSE
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select NO_DMA if !UML_DMA_EMULATION
|
||||
select OF_EARLY_FLATTREE if OF
|
||||
select GENERIC_IRQ_SHOW
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <linux/const.h>
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -255,6 +255,7 @@ config X86
|
||||
select HAVE_NOINSTR_VALIDATION if HAVE_OBJTOOL
|
||||
select HAVE_OBJTOOL if X86_64
|
||||
select HAVE_OPTPROBES
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCSPKR_PLATFORM
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_PERF_EVENTS_NMI
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <linux/mem_encrypt.h>
|
||||
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
@ -44,6 +44,7 @@ config XTENSA
|
||||
select HAVE_GCC_PLUGINS if GCC_VERSION >= 120000
|
||||
select HAVE_HW_BREAKPOINT if PERF_EVENTS
|
||||
select HAVE_IRQ_TIME_ACCOUNTING
|
||||
select HAVE_PAGE_SIZE_4KB
|
||||
select HAVE_PCI
|
||||
select HAVE_PERF_EVENTS
|
||||
select HAVE_STACKPROTECTOR
|
||||
|
@ -22,7 +22,7 @@
|
||||
* PAGE_SHIFT determines the page size
|
||||
*/
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SHIFT CONFIG_PAGE_SHIFT
|
||||
#define PAGE_SIZE (__XTENSA_UL_CONST(1) << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user