Commit 4899a36f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc updates from Michael Ellerman:

 - Remove our now never-true definitions for pgd_huge() and p4d_leaf().

 - Add pte_needs_flush() and huge_pmd_needs_flush() for 64-bit.

 - Add support for syscall wrappers.

 - Add support for KFENCE on 64-bit.

 - Update 64-bit HV KVM to use the new guest state entry/exit accounting
   API.

 - Support execute-only memory when using the Radix MMU (P9 or later).

 - Implement CONFIG_PARAVIRT_TIME_ACCOUNTING for pseries guests.

 - Updates to our linker script to move more data into read-only
   sections.

 - Allow the VDSO to be randomised on 32-bit.

 - Many other small features and fixes.

Thanks to Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Athira
Rajeev, Christophe Leroy, David Hildenbrand, Disha Goel, Fabiano Rosas,
Gaosheng Cui, Gustavo A. R. Silva, Haren Myneni, Hari Bathini, Jilin
Yuan, Joel Stanley, Kajol Jain, Kees Cook, Krzysztof Kozlowski, Laurent
Dufour, Liang He, Li Huafei, Lukas Bulwahn, Madhavan Srinivasan, Nathan
Chancellor, Nathan Lynch, Nicholas Miehlbradt, Nicholas Piggin, Pali
Rohár, Rohan McLure, Russell Currey, Sachin Sant, Segher Boessenkool,
Shrikanth Hegde, Tyrel Datwyler, Wolfram Sang, ye xingchen, and Zheng
Yongjun.

* tag 'powerpc-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits)
  KVM: PPC: Book3S HV: Fix stack frame regs marker
  powerpc: Don't add __powerpc_ prefix to syscall entry points
  powerpc/64s/interrupt: Fix stack frame regs marker
  powerpc/64: Fix msr_check_and_set/clear MSR[EE] race
  powerpc/64s/interrupt: Change must-hard-mask interrupt check from BUG to WARN
  powerpc/pseries: Add firmware details to the hardware description
  powerpc/powernv: Add opal details to the hardware description
  powerpc: Add device-tree model to the hardware description
  powerpc/64: Add logical PVR to the hardware description
  powerpc: Add PVR & CPU name to hardware description
  powerpc: Add hardware description string
  powerpc/configs: Enable PPC_UV in powernv_defconfig
  powerpc/configs: Update config files for removed/renamed symbols
  powerpc/mm: Fix UBSAN warning reported on hugetlb
  powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()
  powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range
  powerpc: Drops STABS_DEBUG from linker scripts
  powerpc/64s: Remove lost/old comment
  powerpc/64s: Remove old STAB comment
  powerpc: remove orphan systbl_chk.sh
  ...
parents 03785a69 376b3275
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3629,7 +3629,7 @@
			(bounds check bypass). With this option data leaks are
			possible in the system.

	nospectre_v2	[X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
	nospectre_v2	[X86,PPC_E500,ARM64] Disable all mitigations for
			the Spectre variant 2 (indirect branch prediction)
			vulnerability. System may allow data leaks with this
			option.
@@ -3748,9 +3748,9 @@
			[X86,PV_OPS] Disable paravirtualized VMware scheduler
			clock and use the default one.

	no-steal-acc	[X86,PV_OPS,ARM64] Disable paravirtualized steal time
			accounting. steal time is computed, but won't
			influence scheduler behaviour
	no-steal-acc	[X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
			steal time accounting. steal time is computed, but
			won't influence scheduler behaviour

	nolapic		[X86-32,APIC] Do not enable or use the local APIC.

+22 −0
Original line number Diff line number Diff line
@@ -4,12 +4,16 @@ CPU to ISA Version Mapping

Mapping of some CPU versions to relevant ISA versions.

Note Power4 and Power4+ are not supported.

========= ====================================================================
CPU       Architecture version
========= ====================================================================
Power10   Power ISA v3.1
Power9    Power ISA v3.0B
Power8    Power ISA v2.07
e6500     Power ISA v2.06 with some exceptions
e5500     Power ISA v2.06 with some exceptions, no Altivec
Power7    Power ISA v2.06
Power6    Power ISA v2.05
PA6T      Power ISA v2.04
@@ -24,6 +28,12 @@ PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
          - PowerPC Virtual Environment Architecture Book II v2.01
          - PowerPC Operating Environment Architecture Book III v2.01
          - Plus Altivec/VMX ~= 2.03
Power4+   - PowerPC User Instruction Set Architecture Book I v2.01
          - PowerPC Virtual Environment Architecture Book II v2.01
          - PowerPC Operating Environment Architecture Book III v2.01
Power4    - PowerPC User Instruction Set Architecture Book I v2.00
          - PowerPC Virtual Environment Architecture Book II v2.00
          - PowerPC Operating Environment Architecture Book III v2.00
========= ====================================================================


@@ -36,6 +46,8 @@ CPU VMX (aka. Altivec)
Power10    Yes
Power9     Yes
Power8     Yes
e6500      Yes
e5500      No
Power7     Yes
Power6     Yes
PA6T       Yes
@@ -44,6 +56,8 @@ Power5++ No
Power5+    No
Power5     No
PPC970     Yes
Power4+    No
Power4     No
========== ==================

========== ====
@@ -52,6 +66,8 @@ CPU VSX
Power10    Yes
Power9     Yes
Power8     Yes
e6500      No
e5500      No
Power7     Yes
Power6     No
PA6T       No
@@ -60,6 +76,8 @@ Power5++ No
Power5+    No
Power5     No
PPC970     No
Power4+    No
Power4     No
========== ====

========== ====================================
@@ -68,6 +86,8 @@ CPU Transactional Memory
Power10    No  (* see Power ISA v3.1, "Appendix A. Notes on the Removal of Transactional Memory from the Architecture")
Power9     Yes (* see transactional_memory.txt)
Power8     Yes
e6500      No
e5500      No
Power7     No
Power6     No
PA6T       No
@@ -76,4 +96,6 @@ Power5++ No
Power5+    No
Power5     No
PPC970     No
Power4+    No
Power4     No
========== ====================================
+18 −17
Original line number Diff line number Diff line
@@ -135,8 +135,9 @@ config PPC
	select ARCH_HAS_SCALED_CPUTIME		if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
	select ARCH_HAS_SET_MEMORY
	select ARCH_HAS_STRICT_KERNEL_RWX	if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
	select ARCH_HAS_STRICT_KERNEL_RWX	if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
	select ARCH_HAS_STRICT_KERNEL_RWX	if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
	select ARCH_HAS_STRICT_MODULE_RWX	if ARCH_HAS_STRICT_KERNEL_RWX
	select ARCH_HAS_SYSCALL_WRAPPER		if !SPU_BASE && !COMPAT
	select ARCH_HAS_TICK_BROADCAST		if GENERIC_CLOCKEVENTS_BROADCAST
	select ARCH_HAS_UACCESS_FLUSHCACHE
	select ARCH_HAS_UBSAN_SANITIZE_ALL
@@ -194,7 +195,7 @@ config PPC
	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
	select HAVE_ARCH_KFENCE			if PPC_BOOK3S_32 || PPC_8xx || 40x
	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_MMAP_RND_BITS
@@ -211,7 +212,7 @@ config PPC
	select HAVE_DYNAMIC_FTRACE_WITH_ARGS	if MPROFILE_KERNEL || PPC32
	select HAVE_DYNAMIC_FTRACE_WITH_REGS	if MPROFILE_KERNEL || PPC32
	select HAVE_EBPF_JIT
	select HAVE_EFFICIENT_UNALIGNED_ACCESS	if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
	select HAVE_EFFICIENT_UNALIGNED_ACCESS
	select HAVE_FAST_GUP
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_DESCRIPTORS	if PPC64_ELF_ABI_V1
@@ -290,7 +291,7 @@ config PPC_LONG_DOUBLE_128
config PPC_BARRIER_NOSPEC
	bool
	default y
	depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
	depends on PPC_BOOK3S_64 || PPC_E500

config EARLY_PRINTK
	bool
@@ -548,7 +549,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE

config KEXEC
	bool "kexec system call"
	depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
	depends on PPC_BOOK3S || PPC_E500 || (44x && !SMP)
	select KEXEC_CORE
	help
	  kexec is a system call that implements the ability to shutdown your
@@ -583,7 +584,7 @@ config ARCH_HAS_KEXEC_PURGATORY

config RELOCATABLE
	bool "Build a relocatable kernel"
	depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
	depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
	select NONSTATIC_KERNEL
	help
	  This builds a kernel image that is capable of running at the
@@ -606,7 +607,7 @@ config RELOCATABLE

config RANDOMIZE_BASE
	bool "Randomize the address of the kernel image"
	depends on (FSL_BOOKE && FLATMEM && PPC32)
	depends on PPC_85xx && FLATMEM
	depends on RELOCATABLE
	help
	  Randomizes the virtual address at which the kernel image is
@@ -625,8 +626,8 @@ config RELOCATABLE_TEST

config CRASH_DUMP
	bool "Build a dump capture kernel"
	depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
	depends on PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
	select RELOCATABLE if PPC64 || 44x || PPC_85xx
	help
	  Build a kernel suitable for use as a dump capture kernel.
	  The same kernel binary can be used as production kernel and dump
@@ -815,7 +816,7 @@ config DATA_SHIFT_BOOL
	depends on ADVANCED_OPTIONS
	depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
	depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
		   FSL_BOOKE
		   PPC_85xx
	help
	  This option allows you to set the kernel data alignment. When
	  RAM is mapped by blocks, the alignment needs to fit the size and
@@ -828,13 +829,13 @@ config DATA_SHIFT
	default 24 if STRICT_KERNEL_RWX && PPC64
	range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
	range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
	range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
	range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
	default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
	default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
	default 23 if STRICT_KERNEL_RWX && PPC_8xx
	default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
	default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
	default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
	default 24 if STRICT_KERNEL_RWX && PPC_85xx
	default PPC_PAGE_SHIFT
	help
	  On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
@@ -1150,7 +1151,7 @@ config LOWMEM_SIZE

config LOWMEM_CAM_NUM_BOOL
	bool "Set number of CAMs to use to map low memory"
	depends on ADVANCED_OPTIONS && FSL_BOOKE
	depends on ADVANCED_OPTIONS && PPC_85xx
	help
	  This option allows you to set the maximum number of CAM slots that
	  will be used to map low memory.  There are a limited number of slots
@@ -1161,7 +1162,7 @@ config LOWMEM_CAM_NUM_BOOL
	  Say N here unless you know what you are doing.

config LOWMEM_CAM_NUM
	depends on FSL_BOOKE
	depends on PPC_85xx
	int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
	default 3 if !STRICT_KERNEL_RWX
	default 9 if DATA_SHIFT >= 24
@@ -1170,7 +1171,7 @@ config LOWMEM_CAM_NUM

config DYNAMIC_MEMSTART
	bool "Enable page aligned dynamic load address for kernel"
	depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
	depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
	select NONSTATIC_KERNEL
	help
	  This option enables the kernel to be loaded at any page aligned
@@ -1219,7 +1220,7 @@ config KERNEL_START

config PHYSICAL_START_BOOL
	bool "Set physical address where the kernel is loaded"
	depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
	depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
	help
	  This gives the physical address where the kernel is loaded.

@@ -1232,7 +1233,7 @@ config PHYSICAL_START

config PHYSICAL_ALIGN
	hex
	default "0x04000000" if FSL_BOOKE
	default "0x04000000" if PPC_85xx
	help
	  This value puts the alignment restrictions on physical address
	  where kernel is loaded and run from. Kernel is compiled for an
+15 −0
Original line number Diff line number Diff line
@@ -283,6 +283,12 @@ config PPC_EARLY_DEBUG_MEMCONS
	  This console provides input and output buffers stored within the
	  kernel BSS and should be safe to select on any system. A debugger
	  can then be used to read kernel output or send input to the console.

config PPC_EARLY_DEBUG_16550
	bool "Serial 16550"
	depends on PPC_UDBG_16550
	help
	  Select this to enable early debugging via Serial 16550 console
endchoice

config PPC_MEMCONS_OUTPUT_SIZE
@@ -354,6 +360,15 @@ config PPC_EARLY_DEBUG_CPM_ADDR
	  platform probing is done, all platforms selected must
	  share the same address.

config PPC_EARLY_DEBUG_16550_PHYSADDR
	hex "Early debug Serial 16550 physical address"
	depends on PPC_EARLY_DEBUG_16550

config PPC_EARLY_DEBUG_16550_STRIDE
	int "Early debug Serial 16550 stride"
	depends on PPC_EARLY_DEBUG_16550
	default 1

config FAIL_IOMMU
	bool "Fault-injection capability for IOMMU"
	depends on FAULT_INJECTION
+12 −6
Original line number Diff line number Diff line
@@ -149,11 +149,12 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
ifdef CONFIG_PPC_BOOK3S_64
ifdef CONFIG_CPU_LITTLE_ENDIAN
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
else
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
endif
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10,	\
				  $(call cc-option,-mtune=power9,	\
				  $(call cc-option,-mtune=power8)))
else ifdef CONFIG_PPC_BOOK3E_64
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
endif
@@ -191,9 +192,14 @@ ifdef CONFIG_476FPE_ERR46
		-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
endif

# No AltiVec or VSX instructions when building kernel
# No prefix or pcrel
KBUILD_CFLAGS += $(call cc-option,-mno-prefixed)
KBUILD_CFLAGS += $(call cc-option,-mno-pcrel)

# No AltiVec or VSX or MMA instructions when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
KBUILD_CFLAGS += $(call cc-option,-mno-mma)

# No SPE instruction when building kernel
# (We use all available options to help semi-broken compilers)
@@ -210,7 +216,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-string)
cpu-as-$(CONFIG_40x)		+= -Wa,-m405
cpu-as-$(CONFIG_44x)		+= -Wa,-m440
cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
cpu-as-$(CONFIG_E500)		+= -Wa,-me500
cpu-as-$(CONFIG_PPC_E500)		+= -Wa,-me500

# When using '-many -mpower4' gas will first try and find a matching power4
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
@@ -231,7 +237,7 @@ head-$(CONFIG_PPC_BOOK3S_32) := arch/powerpc/kernel/head_book3s_32.o
head-$(CONFIG_PPC_8xx)		:= arch/powerpc/kernel/head_8xx.o
head-$(CONFIG_40x)		:= arch/powerpc/kernel/head_40x.o
head-$(CONFIG_44x)		:= arch/powerpc/kernel/head_44x.o
head-$(CONFIG_FSL_BOOKE)	:= arch/powerpc/kernel/head_fsl_booke.o
head-$(CONFIG_PPC_85xx)	:= arch/powerpc/kernel/head_85xx.o

head-$(CONFIG_PPC64)		+= arch/powerpc/kernel/entry_64.o
head-$(CONFIG_PPC_FPU)		+= arch/powerpc/kernel/fpu.o
Loading