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

 - Optimise radix KVM guest entry/exit by 2x on Power9/Power10.

 - Allow firmware to tell us whether to disable the entry and uaccess
   flushes on Power10 or later CPUs.

 - Add BPF_PROBE_MEM support for 32 and 64-bit BPF jits.

 - Several fixes and improvements to our hard lockup watchdog.

 - Activate HAVE_DYNAMIC_FTRACE_WITH_REGS on 32-bit.

 - Allow building the 64-bit Book3S kernel without hash MMU support, ie.
   Radix only.

 - Add KUAP (SMAP) support for 40x, 44x, 8xx, Book3E (64-bit).

 - Add new encodings for perf_mem_data_src.mem_hops field, and use them
   on Power10.

 - A series of small performance improvements to 64-bit interrupt entry.

 - Several commits fixing issues when building with the clang integrated
   assembler.

 - Many other small features and fixes.

Thanks to Alan Modra, Alexey Kardashevskiy, Ammar Faizi, Anders Roxell,
Arnd Bergmann, Athira Rajeev, Cédric Le Goater, Christophe JAILLET,
Christophe Leroy, Christoph Hellwig, Daniel Axtens, David Yang, Erhard
Furtner, Fabiano Rosas, Greg Kroah-Hartman, Guo Ren, Hari Bathini, Jason
Wang, Joel Stanley, Julia Lawall, Kajol Jain, Kees Cook, Laurent Dufour,
Madhavan Srinivasan, Mark Brown, Minghao Chi, Nageswara R Sastry, Naresh
Kamboju, Nathan Chancellor, Nathan Lynch, Nicholas Piggin, Nick Child,
Oliver O'Halloran, Peiwei Hu, Randy Dunlap, Ravi Bangoria, Rob Herring,
Russell Currey, Sachin Sant, Sean Christopherson, Segher Boessenkool,
Thadeu Lima de Souza Cascardo, Tyrel Datwyler, Xiang wangx, and Yang
Guang.

* tag 'powerpc-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (240 commits)
  powerpc/xmon: Dump XIVE information for online-only processors.
  powerpc/opal: use default_groups in kobj_type
  powerpc/cacheinfo: use default_groups in kobj_type
  powerpc/sched: Remove unused TASK_SIZE_OF
  powerpc/xive: Add missing null check after calling kmalloc
  powerpc/floppy: Remove usage of the deprecated "pci-dma-compat.h" API
  selftests/powerpc: Add a test of sigreturning to an unaligned address
  powerpc/64s: Use EMIT_WARN_ENTRY for SRR debug warnings
  powerpc/64s: Mask NIP before checking against SRR0
  powerpc/perf: Fix spelling of "its"
  powerpc/32: Fix boot failure with GCC latent entropy plugin
  powerpc/code-patching: Replace patch_instruction() by ppc_inst_write() in selftests
  powerpc/code-patching: Move code patching selftests in its own file
  powerpc/code-patching: Move instr_is_branch_{i/b}form() in code-patching.h
  powerpc/code-patching: Move patch_exception() outside code-patching.c
  powerpc/code-patching: Use test_trampoline for prefixed patch test
  powerpc/code-patching: Fix patch_branch() return on out-of-range failure
  powerpc/code-patching: Reorganise do_patch_instruction() to ease error handling
  powerpc/code-patching: Fix unmap_patch_area() error handling
  powerpc/code-patching: Fix error handling in do_patch_instruction()
  ...
parents 3fb561b1 f1aa0e47
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -3393,7 +3393,7 @@
			Disable SMAP (Supervisor Mode Access Prevention)
			even if it is supported by processor.

	nosmep		[X86,PPC]
	nosmep		[X86,PPC64s]
			Disable SMEP (Supervisor Mode Execution Prevention)
			even if it is supported by processor.

@@ -4166,6 +4166,14 @@
			Override pmtimer IOPort with a hex value.
			e.g. pmtmr=0x508

	pmu_override=	[PPC] Override the PMU.
			This option takes over the PMU facility, so it is no
			longer usable by perf. Setting this option starts the
			PMU counters by setting MMCR0 to 0 (the FC bit is
			cleared). If a number is given, then MMCR1 is set to
			that number, otherwise (e.g., 'pmu_override=on'), MMCR1
			remains 0.

	pm_debug_messages	[SUSPEND,KNL]
			Enable suspend/resume debug messages during boot up.

@@ -6494,6 +6502,12 @@
				  controller on both pseries and powernv
				  platforms. Only useful on POWER9 and above.

	xive.store-eoi=off	[PPC]
			By default on POWER10 and above, the kernel will use
			stores for EOI handling when the XIVE interrupt mode
			is active. This option allows the XIVE driver to use
			loads instead, as on POWER9.

	xhci-hcd.quirks		[USB,KNL]
			A hex value specifying bitmask with supplemental xhci
			host controller quirks. Meaning of each bit can be
+6 −4
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ config PPC
	select ARCH_HAS_KCOV
	select ARCH_HAS_MEMBARRIER_CALLBACKS
	select ARCH_HAS_MEMBARRIER_SYNC_CORE
	select ARCH_HAS_MEMREMAP_COMPAT_ALIGN
	select ARCH_HAS_MEMREMAP_COMPAT_ALIGN	if PPC_64S_HASH_MMU
	select ARCH_HAS_MMIOWB			if PPC64
	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
	select ARCH_HAS_PHYS_TO_DMA
@@ -165,6 +165,7 @@ config PPC
	select BINFMT_ELF
	select BUILDTIME_TABLE_SORT
	select CLONE_BACKWARDS
	select CPUMASK_OFFSTACK			if NR_CPUS >= 8192
	select DCACHE_WORD_ACCESS		if PPC64 && CPU_LITTLE_ENDIAN
	select DMA_OPS_BYPASS			if PPC64
	select DMA_OPS				if PPC64
@@ -205,7 +206,7 @@ config PPC
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DEBUG_STACKOVERFLOW
	select HAVE_DYNAMIC_FTRACE
	select HAVE_DYNAMIC_FTRACE_WITH_REGS	if MPROFILE_KERNEL
	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_FAST_GUP
@@ -229,7 +230,7 @@ config PPC
	select HAVE_KPROBES_ON_FTRACE
	select HAVE_KRETPROBES
	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
	select HAVE_LIVEPATCH			if HAVE_DYNAMIC_FTRACE_WITH_REGS
	select HAVE_LIVEPATCH			if HAVE_DYNAMIC_FTRACE_WITH_REGS && PPC64
	select HAVE_MOD_ARCH_SPECIFIC
	select HAVE_NMI				if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
	select HAVE_OPTPROBES
@@ -845,7 +846,7 @@ config FORCE_MAX_ZONEORDER
config PPC_SUBPAGE_PROT
	bool "Support setting protections for 4k subpages (subpage_prot syscall)"
	default n
	depends on PPC_BOOK3S_64 && PPC_64K_PAGES
	depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
	help
	  This option adds support for system call to allow user programs
	  to set access permissions (read/write, readonly, or no access)
@@ -943,6 +944,7 @@ config PPC_MEM_KEYS
	prompt "PowerPC Memory Protection Keys"
	def_bool y
	depends on PPC_BOOK3S_64
	depends on PPC_64S_HASH_MMU
	select ARCH_USES_HIGH_VMA_FLAGS
	select ARCH_HAS_PKEYS
	help
+6 −3
Original line number Diff line number Diff line
@@ -245,7 +245,9 @@ cpu-as-$(CONFIG_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
# about. GCC will pass -many to GAS when assembling, clang does not.
cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= -Wa,-mpower4 -Wa,-many
# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
cpu-as-$(CONFIG_PPC_E500MC)	+= $(call as-option,-Wa$(comma)-me500mc)

KBUILD_AFLAGS += $(cpu-as-y)
@@ -445,10 +447,11 @@ PHONY += checkbin
# Check toolchain versions:
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
checkbin:
	@if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
	    && $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
	@if test "x${CONFIG_LD_IS_LLD}" != "xy" -a \
		"x$(call ld-ifversion, -le, 22400, y)" = "xy" ; then \
		echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
		echo 'in some circumstances.' ; \
		echo    '*** binutils 2.23 do not define the TOC symbol ' ; \
		echo -n '*** Please use a different binutils version.' ; \
		false ; \
	fi
+16 −17
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ p_etext: .8byte _etext
p_bss_start:	.8byte	__bss_start
p_end:		.8byte	_end

p_toc:		.8byte	__toc_start + 0x8000 - p_base
p_toc:		.8byte	.TOC. - p_base
p_dyn:		.8byte	__dynamic_start - p_base
p_rela:		.8byte	__rela_dyn_start - p_base
p_prom:		.8byte	0
@@ -226,16 +226,19 @@ p_base: mflr r10 /* r10 now points to runtime addr of p_base */
#ifdef __powerpc64__

#define PROM_FRAME_SIZE 512
#define SAVE_GPR(n, base)       std     n,8*(n)(base)
#define REST_GPR(n, base)       ld      n,8*(n)(base)
#define SAVE_2GPRS(n, base)     SAVE_GPR(n, base); SAVE_GPR(n+1, base)
#define SAVE_4GPRS(n, base)     SAVE_2GPRS(n, base); SAVE_2GPRS(n+2, base)
#define SAVE_8GPRS(n, base)     SAVE_4GPRS(n, base); SAVE_4GPRS(n+4, base)
#define SAVE_10GPRS(n, base)    SAVE_8GPRS(n, base); SAVE_2GPRS(n+8, base)
#define REST_2GPRS(n, base)     REST_GPR(n, base); REST_GPR(n+1, base)
#define REST_4GPRS(n, base)     REST_2GPRS(n, base); REST_2GPRS(n+2, base)
#define REST_8GPRS(n, base)     REST_4GPRS(n, base); REST_4GPRS(n+4, base)
#define REST_10GPRS(n, base)    REST_8GPRS(n, base); REST_2GPRS(n+8, base)

.macro OP_REGS op, width, start, end, base, offset
	.Lreg=\start
	.rept (\end - \start + 1)
	\op	.Lreg,\offset+\width*.Lreg(\base)
	.Lreg=.Lreg+1
	.endr
.endm

#define SAVE_GPRS(start, end, base)	OP_REGS std, 8, start, end, base, 0
#define REST_GPRS(start, end, base)	OP_REGS ld, 8, start, end, base, 0
#define SAVE_GPR(n, base)		SAVE_GPRS(n, n, base)
#define REST_GPR(n, base)		REST_GPRS(n, n, base)

/* prom handles the jump into and return from firmware.  The prom args pointer
   is loaded in r3. */
@@ -246,9 +249,7 @@ prom:
	stdu	r1,-PROM_FRAME_SIZE(r1) /* Save SP and create stack space */

	SAVE_GPR(2, r1)
	SAVE_GPR(13, r1)
	SAVE_8GPRS(14, r1)
	SAVE_10GPRS(22, r1)
	SAVE_GPRS(13, 31, r1)
	mfcr    r10
	std     r10,8*32(r1)
	mfmsr   r10
@@ -283,9 +284,7 @@ prom:

	/* Restore other registers */
	REST_GPR(2, r1)
	REST_GPR(13, r1)
	REST_8GPRS(14, r1)
	REST_10GPRS(22, r1)
	REST_GPRS(13, 31, r1)
	ld      r10,8*32(r1)
	mtcr	r10

+0 −8
Original line number Diff line number Diff line
@@ -25,14 +25,6 @@
			status = "disabled";
		};

		spi@f00 {
			msp430@0 {
				compatible = "spidev";
				spi-max-frequency = <32000>;
				reg = <0>;
			};
		};

		psc@2000 {		// PSC1
			status = "disabled";
		};
Loading