Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 192f0f8e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc updates from Michael Ellerman:
 "Notable changes:

   - Removal of the NPU DMA code, used by the out-of-tree Nvidia driver,
     as well as some other functions only used by drivers that haven't
     (yet?) made it upstream.

   - A fix for a bug in our handling of hardware watchpoints (eg. perf
     record -e mem: ...) which could lead to register corruption and
     kernel crashes.

   - Enable HAVE_ARCH_HUGE_VMAP, which allows us to use large pages for
     vmalloc when using the Radix MMU.

   - A large but incremental rewrite of our exception handling code to
     use gas macros rather than multiple levels of nested CPP macros.

  And the usual small fixes, cleanups and improvements.

  Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Andreas Schwab,
  Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann,
  Athira Rajeev, Cédric Le Goater, Christian Lamparter, Christophe
  Leroy, Christophe Lombard, Christoph Hellwig, Daniel Axtens, Denis
  Efremov, Enrico Weigelt, Frederic Barrat, Gautham R. Shenoy, Geert
  Uytterhoeven, Geliang Tang, Gen Zhang, Greg Kroah-Hartman, Greg Kurz,
  Gustavo Romero, Krzysztof Kozlowski, Madhavan Srinivasan, Masahiro
  Yamada, Mathieu Malaterre, Michael Neuling, Nathan Lynch, Naveen N.
  Rao, Nicholas Piggin, Nishad Kamdar, Oliver O'Halloran, Qian Cai, Ravi
  Bangoria, Sachin Sant, Sam Bobroff, Satheesh Rajendran, Segher
  Boessenkool, Shaokun Zhang, Shawn Anastasio, Stewart Smith, Suraj
  Jitindar Singh, Thiago Jung Bauermann, YueHaibing"

* tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (163 commits)
  powerpc/powernv/idle: Fix restore of SPRN_LDBAR for POWER9 stop state.
  powerpc/eeh: Handle hugepages in ioremap space
  ocxl: Update for AFU descriptor template version 1.1
  powerpc/boot: pass CONFIG options in a simpler and more robust way
  powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h
  powerpc/irq: Don't WARN continuously in arch_local_irq_restore()
  powerpc/module64: Use symbolic instructions names.
  powerpc/module32: Use symbolic instructions names.
  powerpc: Move PPC_HA() PPC_HI() and PPC_LO() to ppc-opcode.h
  powerpc/module64: Fix comment in R_PPC64_ENTRY handling
  powerpc/boot: Add lzo support for uImage
  powerpc/boot: Add lzma support for uImage
  powerpc/boot: don't force gzipped uImage
  powerpc/8xx: Add microcode patch to move SMC parameter RAM.
  powerpc/8xx: Use IO accessors in microcode programming.
  powerpc/8xx: replace #ifdefs by IS_ENABLED() in microcode.c
  powerpc/8xx: refactor programming of microcode CPM params.
  powerpc/8xx: refactor printing of microcode patch name.
  powerpc/8xx: Refactor microcode write
  powerpc/8xx: refactor writing of CPM microcode arrays
  ...
parents ec924975 f5a9e488
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2932,7 +2932,7 @@
			register save and restore. The kernel will only save
			legacy floating-point registers on task switch.

	nohugeiomap	[KNL,x86] Disable kernel huge I/O mappings.
	nohugeiomap	[KNL,x86,PPC] Disable kernel huge I/O mappings.

	nosmt		[KNL,S390] Disable symmetric multithreading (SMT).
			Equivalent to smt=1.
@@ -5282,6 +5282,15 @@
			Format:
			<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]

	xive=		[PPC]
			By default on POWER9 and above, the kernel will
			natively use the XIVE interrupt controller. This option
			allows the fallback firmware mode to be used:

			off       Fallback to firmware control of XIVE interrupt
				  controller on both pseries and powernv
				  platforms. Only useful on POWER9 and above.

	xhci-hcd.quirks		[USB,KNL]
			A hex value specifying bitmask with supplemental xhci
			host controller quirks. Meaning of each bit can be
+68 −0
Original line number Diff line number Diff line
VCPU Dispatch Statistics:
=========================

For Shared Processor LPARs, the POWER Hypervisor maintains a relatively
static mapping of the LPAR processors (vcpus) to physical processor
chips (representing the "home" node) and tries to always dispatch vcpus
on their associated physical processor chip. However, under certain
scenarios, vcpus may be dispatched on a different processor chip (away
from its home node).

/proc/powerpc/vcpudispatch_stats can be used to obtain statistics
related to the vcpu dispatch behavior. Writing '1' to this file enables
collecting the statistics, while writing '0' disables the statistics.
By default, the DTLB log for each vcpu is processed 50 times a second so
as not to miss any entries. This processing frequency can be changed
through /proc/powerpc/vcpudispatch_stats_freq.

The statistics themselves are available by reading the procfs file
/proc/powerpc/vcpudispatch_stats. Each line in the output corresponds to
a vcpu as represented by the first field, followed by 8 numbers.

The first number corresponds to:
1. total vcpu dispatches since the beginning of statistics collection

The next 4 numbers represent vcpu dispatch dispersions:
2. number of times this vcpu was dispatched on the same processor as last
   time
3. number of times this vcpu was dispatched on a different processor core
   as last time, but within the same chip
4. number of times this vcpu was dispatched on a different chip
5. number of times this vcpu was dispatches on a different socket/drawer
(next numa boundary)

The final 3 numbers represent statistics in relation to the home node of
the vcpu:
6. number of times this vcpu was dispatched in its home node (chip)
7. number of times this vcpu was dispatched in a different node
8. number of times this vcpu was dispatched in a node further away (numa
distance)

An example output:
    $ sudo cat /proc/powerpc/vcpudispatch_stats
    cpu0 6839 4126 2683 30 0 6821 18 0
    cpu1 2515 1274 1229 12 0 2509 6 0
    cpu2 2317 1198 1109 10 0 2312 5 0
    cpu3 2259 1165 1088 6 0 2256 3 0
    cpu4 2205 1143 1056 6 0 2202 3 0
    cpu5 2165 1121 1038 6 0 2162 3 0
    cpu6 2183 1127 1050 6 0 2180 3 0
    cpu7 2193 1133 1052 8 0 2187 6 0
    cpu8 2165 1115 1032 18 0 2156 9 0
    cpu9 2301 1252 1033 16 0 2293 8 0
    cpu10 2197 1138 1041 18 0 2187 10 0
    cpu11 2273 1185 1062 26 0 2260 13 0
    cpu12 2186 1125 1043 18 0 2177 9 0
    cpu13 2161 1115 1030 16 0 2153 8 0
    cpu14 2206 1153 1033 20 0 2196 10 0
    cpu15 2163 1115 1032 16 0 2155 8 0

In the output above, for vcpu0, there have been 6839 dispatches since
statistics were enabled. 4126 of those dispatches were on the same
physical cpu as the last time. 2683 were on a different core, but within
the same chip, while 30 dispatches were on a different chip compared to
its last dispatch.

Also, out of the total of 6839 dispatches, we see that there have been
6821 dispatches on the vcpu's home node, while 18 dispatches were
outside its home node, on a neighbouring chip.
+28 −20
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ config PPC
	select GENERIC_STRNLEN_USER
	select GENERIC_TIME_VSYSCALL
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_HUGE_VMAP		if PPC_BOOK3S_64 && PPC_RADIX_MMU
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_KASAN			if PPC32
	select HAVE_ARCH_KGDB
@@ -176,6 +177,7 @@ config PPC
	select HAVE_ARCH_NVRAM_OPS
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_TRACEHOOK
	select HAVE_C_RECORDMCOUNT
	select HAVE_CBPF_JIT			if !PPC64
	select HAVE_STACKPROTECTOR		if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
	select HAVE_STACKPROTECTOR		if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
@@ -197,6 +199,8 @@ config PPC
	select HAVE_IOREMAP_PROT
	select HAVE_IRQ_EXIT_ON_IRQ_STACK
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_LZMA			if DEFAULT_UIMAGE
	select HAVE_KERNEL_LZO			if DEFAULT_UIMAGE
	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
	select HAVE_KPROBES
	select HAVE_KPROBES_ON_FTRACE
@@ -235,6 +239,7 @@ config PPC
	select OLD_SIGSUSPEND
	select PCI_DOMAINS			if PCI
	select PCI_SYSCALL			if PCI
	select PPC_DAWR				if PPC64
	select RTC_LIB
	select SPARSE_IRQ
	select SYSCTL_EXCEPTION_TRACE
@@ -371,6 +376,9 @@ config PPC_ADV_DEBUG_DAC_RANGE
	depends on PPC_ADV_DEBUG_REGS && 44x
	default y

config PPC_DAWR
	bool

config ZONE_DMA
	bool
	default y if PPC_BOOK3E_64
@@ -399,7 +407,7 @@ config HUGETLB_PAGE_SIZE_VARIABLE
config MATH_EMULATION
	bool "Math emulation"
	depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
	---help---
	help
	  Some PowerPC chips designed for embedded applications do not have
	  a floating-point unit and therefore do not implement the
	  floating-point instructions in the PowerPC instruction set.  If you
@@ -418,14 +426,14 @@ choice

config	MATH_EMULATION_FULL
	bool "Emulate all the floating point instructions"
	---help---
	help
	  Select this option will enable the kernel to support to emulate
	  all the floating point instructions. If your SoC doesn't have
	  a FPU, you should select this.

config MATH_EMULATION_HW_UNIMPLEMENTED
	bool "Just emulate the FPU unimplemented instructions"
	---help---
	help
	  Select this if you know there does have a hardware FPU on your
	  SoC, but some floating point instructions are not implemented by that.

@@ -437,7 +445,7 @@ config PPC_TRANSACTIONAL_MEM
	depends on SMP
	select ALTIVEC
	select VSX
       ---help---
	help
	  Support user-mode Transactional Memory on POWERPC.

config LD_HEAD_STUB_CATCH
@@ -458,7 +466,7 @@ config HOTPLUG_CPU
	bool "Support for enabling/disabling CPUs"
	depends on SMP && (PPC_PSERIES || \
	PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
	---help---
	help
	  Say Y here to be able to disable and re-enable individual
	  CPUs at runtime on SMP machines.

@@ -826,7 +834,7 @@ config PPC_DENORMALISATION
	bool "PowerPC denormalisation exception handling"
	depends on PPC_BOOK3S_64
	default "y" if PPC_POWERNV
	---help---
	help
	  Add support for handling denormalisation of single precision
	  values.  Useful for bare metal only.  If unsure say Y here.

@@ -987,7 +995,7 @@ config FSL_RIO
	bool "Freescale Embedded SRIO Controller support"
	depends on RAPIDIO = y && HAVE_RAPIDIO
	default "n"
	---help---
	help
	  Include support for RapidIO controller on Freescale embedded
	  processors (MPC8548, MPC8641, etc).

+0 −2
Original line number Diff line number Diff line
@@ -44,5 +44,3 @@ fdt_sw.c
fdt_wip.c
libfdt.h
libfdt_internal.h
autoconf.h
+5 −11
Original line number Diff line number Diff line
@@ -20,9 +20,6 @@

all: $(obj)/zImage

compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
compress-$(CONFIG_KERNEL_XZ)   := CONFIG_KERNEL_XZ

ifdef CROSS32_COMPILE
    BOOTCC := $(CROSS32_COMPILE)gcc
    BOOTAR := $(CROSS32_COMPILE)ar
@@ -34,7 +31,7 @@ endif
BOOTCFLAGS    := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
		 -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
		 -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
		 -D$(compress-y)
		 $(LINUXINCLUDE)

ifdef CONFIG_PPC64_BOOT_WRAPPER
BOOTCFLAGS	+= -m64
@@ -51,7 +48,7 @@ BOOTCFLAGS += -mlittle-endian
BOOTCFLAGS	+= $(call cc-option,-mabi=elfv2)
endif

BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
BOOTAFLAGS	:= -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc

BOOTARFLAGS	:= -cr$(KBUILD_ARFLAGS)

@@ -202,14 +199,9 @@ $(obj)/empty.c:
$(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S
	$(Q)cp $< $@

$(srctree)/$(src)/serial.c: $(obj)/autoconf.h

$(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/%
	$(Q)cp $< $@

clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
		$(zlib-decomp-) $(libfdt) $(libfdtheader) \
		autoconf.h empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
		empty.c zImage.coff.lds zImage.ps3.lds zImage.lds

quiet_cmd_bootcc = BOOTCC  $@
      cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -257,6 +249,8 @@ endif

compressor-$(CONFIG_KERNEL_GZIP) := gz
compressor-$(CONFIG_KERNEL_XZ)   := xz
compressor-$(CONFIG_KERNEL_LZMA)   := lzma
compressor-$(CONFIG_KERNEL_LZO) := lzo

# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
quiet_cmd_wrap	= WRAP    $@
Loading