Skip to content

Commit 192f0f8

Browse files
committed
Merge tag 'powerpc-5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
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 ...
2 parents ec92497 + f5a9e48 commit 192f0f8

File tree

224 files changed

+3638
-3538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+3638
-3538
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,7 @@
29322932
register save and restore. The kernel will only save
29332933
legacy floating-point registers on task switch.
29342934

2935-
nohugeiomap [KNL,x86] Disable kernel huge I/O mappings.
2935+
nohugeiomap [KNL,x86,PPC] Disable kernel huge I/O mappings.
29362936

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

5285+
xive= [PPC]
5286+
By default on POWER9 and above, the kernel will
5287+
natively use the XIVE interrupt controller. This option
5288+
allows the fallback firmware mode to be used:
5289+
5290+
off Fallback to firmware control of XIVE interrupt
5291+
controller on both pseries and powernv
5292+
platforms. Only useful on POWER9 and above.
5293+
52855294
xhci-hcd.quirks [USB,KNL]
52865295
A hex value specifying bitmask with supplemental xhci
52875296
host controller quirks. Meaning of each bit can be
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
VCPU Dispatch Statistics:
2+
=========================
3+
4+
For Shared Processor LPARs, the POWER Hypervisor maintains a relatively
5+
static mapping of the LPAR processors (vcpus) to physical processor
6+
chips (representing the "home" node) and tries to always dispatch vcpus
7+
on their associated physical processor chip. However, under certain
8+
scenarios, vcpus may be dispatched on a different processor chip (away
9+
from its home node).
10+
11+
/proc/powerpc/vcpudispatch_stats can be used to obtain statistics
12+
related to the vcpu dispatch behavior. Writing '1' to this file enables
13+
collecting the statistics, while writing '0' disables the statistics.
14+
By default, the DTLB log for each vcpu is processed 50 times a second so
15+
as not to miss any entries. This processing frequency can be changed
16+
through /proc/powerpc/vcpudispatch_stats_freq.
17+
18+
The statistics themselves are available by reading the procfs file
19+
/proc/powerpc/vcpudispatch_stats. Each line in the output corresponds to
20+
a vcpu as represented by the first field, followed by 8 numbers.
21+
22+
The first number corresponds to:
23+
1. total vcpu dispatches since the beginning of statistics collection
24+
25+
The next 4 numbers represent vcpu dispatch dispersions:
26+
2. number of times this vcpu was dispatched on the same processor as last
27+
time
28+
3. number of times this vcpu was dispatched on a different processor core
29+
as last time, but within the same chip
30+
4. number of times this vcpu was dispatched on a different chip
31+
5. number of times this vcpu was dispatches on a different socket/drawer
32+
(next numa boundary)
33+
34+
The final 3 numbers represent statistics in relation to the home node of
35+
the vcpu:
36+
6. number of times this vcpu was dispatched in its home node (chip)
37+
7. number of times this vcpu was dispatched in a different node
38+
8. number of times this vcpu was dispatched in a node further away (numa
39+
distance)
40+
41+
An example output:
42+
$ sudo cat /proc/powerpc/vcpudispatch_stats
43+
cpu0 6839 4126 2683 30 0 6821 18 0
44+
cpu1 2515 1274 1229 12 0 2509 6 0
45+
cpu2 2317 1198 1109 10 0 2312 5 0
46+
cpu3 2259 1165 1088 6 0 2256 3 0
47+
cpu4 2205 1143 1056 6 0 2202 3 0
48+
cpu5 2165 1121 1038 6 0 2162 3 0
49+
cpu6 2183 1127 1050 6 0 2180 3 0
50+
cpu7 2193 1133 1052 8 0 2187 6 0
51+
cpu8 2165 1115 1032 18 0 2156 9 0
52+
cpu9 2301 1252 1033 16 0 2293 8 0
53+
cpu10 2197 1138 1041 18 0 2187 10 0
54+
cpu11 2273 1185 1062 26 0 2260 13 0
55+
cpu12 2186 1125 1043 18 0 2177 9 0
56+
cpu13 2161 1115 1030 16 0 2153 8 0
57+
cpu14 2206 1153 1033 20 0 2196 10 0
58+
cpu15 2163 1115 1032 16 0 2155 8 0
59+
60+
In the output above, for vcpu0, there have been 6839 dispatches since
61+
statistics were enabled. 4126 of those dispatches were on the same
62+
physical cpu as the last time. 2683 were on a different core, but within
63+
the same chip, while 30 dispatches were on a different chip compared to
64+
its last dispatch.
65+
66+
Also, out of the total of 6839 dispatches, we see that there have been
67+
6821 dispatches on the vcpu's home node, while 18 dispatches were
68+
outside its home node, on a neighbouring chip.

arch/powerpc/Kconfig

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ config ARCH_MMAP_RND_COMPAT_BITS_MAX
4848
# Allow randomisation to consume up to 512MB of address space (2^29).
4949
default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
5050
default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
51-
default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
51+
default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
5252
default 17 # 17 = 29 (512MB) - 12 (4K)
5353

5454
config ARCH_MMAP_RND_COMPAT_BITS_MIN
@@ -168,6 +168,7 @@ config PPC
168168
select GENERIC_STRNLEN_USER
169169
select GENERIC_TIME_VSYSCALL
170170
select HAVE_ARCH_AUDITSYSCALL
171+
select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
171172
select HAVE_ARCH_JUMP_LABEL
172173
select HAVE_ARCH_KASAN if PPC32
173174
select HAVE_ARCH_KGDB
@@ -176,6 +177,7 @@ config PPC
176177
select HAVE_ARCH_NVRAM_OPS
177178
select HAVE_ARCH_SECCOMP_FILTER
178179
select HAVE_ARCH_TRACEHOOK
180+
select HAVE_C_RECORDMCOUNT
179181
select HAVE_CBPF_JIT if !PPC64
180182
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
181183
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
@@ -197,6 +199,8 @@ config PPC
197199
select HAVE_IOREMAP_PROT
198200
select HAVE_IRQ_EXIT_ON_IRQ_STACK
199201
select HAVE_KERNEL_GZIP
202+
select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
203+
select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
200204
select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
201205
select HAVE_KPROBES
202206
select HAVE_KPROBES_ON_FTRACE
@@ -235,6 +239,7 @@ config PPC
235239
select OLD_SIGSUSPEND
236240
select PCI_DOMAINS if PCI
237241
select PCI_SYSCALL if PCI
242+
select PPC_DAWR if PPC64
238243
select RTC_LIB
239244
select SPARSE_IRQ
240245
select SYSCTL_EXCEPTION_TRACE
@@ -245,9 +250,9 @@ config PPC
245250
#
246251

247252
config PPC_BARRIER_NOSPEC
248-
bool
249-
default y
250-
depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
253+
bool
254+
default y
255+
depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
251256

252257
config EARLY_PRINTK
253258
bool
@@ -371,6 +376,9 @@ config PPC_ADV_DEBUG_DAC_RANGE
371376
depends on PPC_ADV_DEBUG_REGS && 44x
372377
default y
373378

379+
config PPC_DAWR
380+
bool
381+
374382
config ZONE_DMA
375383
bool
376384
default y if PPC_BOOK3E_64
@@ -399,7 +407,7 @@ config HUGETLB_PAGE_SIZE_VARIABLE
399407
config MATH_EMULATION
400408
bool "Math emulation"
401409
depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
402-
---help---
410+
help
403411
Some PowerPC chips designed for embedded applications do not have
404412
a floating-point unit and therefore do not implement the
405413
floating-point instructions in the PowerPC instruction set. If you
@@ -418,27 +426,27 @@ choice
418426

419427
config MATH_EMULATION_FULL
420428
bool "Emulate all the floating point instructions"
421-
---help---
429+
help
422430
Select this option will enable the kernel to support to emulate
423431
all the floating point instructions. If your SoC doesn't have
424432
a FPU, you should select this.
425433

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

432440
endchoice
433441

434442
config PPC_TRANSACTIONAL_MEM
435-
bool "Transactional Memory support for POWERPC"
436-
depends on PPC_BOOK3S_64
437-
depends on SMP
438-
select ALTIVEC
439-
select VSX
440-
---help---
441-
Support user-mode Transactional Memory on POWERPC.
443+
bool "Transactional Memory support for POWERPC"
444+
depends on PPC_BOOK3S_64
445+
depends on SMP
446+
select ALTIVEC
447+
select VSX
448+
help
449+
Support user-mode Transactional Memory on POWERPC.
442450

443451
config LD_HEAD_STUB_CATCH
444452
bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
@@ -458,7 +466,7 @@ config HOTPLUG_CPU
458466
bool "Support for enabling/disabling CPUs"
459467
depends on SMP && (PPC_PSERIES || \
460468
PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
461-
---help---
469+
help
462470
Say Y here to be able to disable and re-enable individual
463471
CPUs at runtime on SMP machines.
464472

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

@@ -939,7 +947,7 @@ config FSL_SOC
939947
bool
940948

941949
config FSL_PCI
942-
bool
950+
bool
943951
select ARCH_HAS_DMA_SET_MASK
944952
select PPC_INDIRECT_PCI
945953
select PCI_QUIRKS
@@ -987,7 +995,7 @@ config FSL_RIO
987995
bool "Freescale Embedded SRIO Controller support"
988996
depends on RAPIDIO = y && HAVE_RAPIDIO
989997
default "n"
990-
---help---
998+
help
991999
Include support for RapidIO controller on Freescale embedded
9921000
processors (MPC8548, MPC8641, etc).
9931001

@@ -1051,14 +1059,14 @@ config DYNAMIC_MEMSTART
10511059
select NONSTATIC_KERNEL
10521060
help
10531061
This option enables the kernel to be loaded at any page aligned
1054-
physical address. The kernel creates a mapping from KERNELBASE to
1062+
physical address. The kernel creates a mapping from KERNELBASE to
10551063
the address where the kernel is loaded. The page size here implies
10561064
the TLB page size of the mapping for kernel on the particular platform.
10571065
Please refer to the init code for finding the TLB page size.
10581066

10591067
DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
10601068
kernel image, where the only restriction is the page aligned kernel
1061-
load address. When this option is enabled, the compile time physical
1069+
load address. When this option is enabled, the compile time physical
10621070
address CONFIG_PHYSICAL_START is ignored.
10631071

10641072
This option is overridden by CONFIG_RELOCATABLE

arch/powerpc/boot/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ fdt_sw.c
4444
fdt_wip.c
4545
libfdt.h
4646
libfdt_internal.h
47-
autoconf.h
48-

arch/powerpc/boot/Makefile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
all: $(obj)/zImage
2222

23-
compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
24-
compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
25-
2623
ifdef CROSS32_COMPILE
2724
BOOTCC := $(CROSS32_COMPILE)gcc
2825
BOOTAR := $(CROSS32_COMPILE)ar
@@ -34,7 +31,7 @@ endif
3431
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
3532
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
3633
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
37-
-D$(compress-y)
34+
$(LINUXINCLUDE)
3835

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

54-
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
51+
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc
5552

5653
BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
5754

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

205-
$(srctree)/$(src)/serial.c: $(obj)/autoconf.h
206-
207-
$(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/%
208-
$(Q)cp $< $@
209-
210202
clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
211203
$(zlib-decomp-) $(libfdt) $(libfdtheader) \
212-
autoconf.h empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
204+
empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
213205

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

258250
compressor-$(CONFIG_KERNEL_GZIP) := gz
259251
compressor-$(CONFIG_KERNEL_XZ) := xz
252+
compressor-$(CONFIG_KERNEL_LZMA) := lzma
253+
compressor-$(CONFIG_KERNEL_LZO) := lzo
260254

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

arch/powerpc/boot/serial.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "stdio.h"
1919
#include "io.h"
2020
#include "ops.h"
21-
#include "autoconf.h"
2221

2322
static int serial_open(void)
2423
{

arch/powerpc/boot/wrapper

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dts=
4040
cacheit=
4141
binary=
4242
compression=.gz
43+
uboot_comp=gzip
4344
pie=
4445
format=
4546

@@ -130,22 +131,29 @@ while [ "$#" -gt 0 ]; do
130131
;;
131132
-z)
132133
compression=.gz
134+
uboot_comp=gzip
133135
;;
134136
-Z)
135137
shift
136138
[ "$#" -gt 0 ] || usage
137-
[ "$1" != "gz" -o "$1" != "xz" -o "$1" != "none" ] || usage
139+
[ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "lzo" -o "$1" != "none" ] || usage
138140

139141
compression=".$1"
142+
uboot_comp=$1
140143

141144
if [ $compression = ".none" ]; then
142145
compression=
146+
uboot_comp=none
143147
fi
148+
if [ $uboot_comp = "gz" ]; then
149+
uboot_comp=gzip
150+
fi
144151
;;
145152
--no-gzip)
146153
# a "feature" of the the wrapper script is that it can be used outside
147154
# the kernel tree. So keeping this around for backwards compatibility.
148155
compression=
156+
uboot_comp=none
149157
;;
150158
-?)
151159
usage
@@ -365,9 +373,16 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel
365373
.gz)
366374
gzip -n -f -9 "$vmz.$$"
367375
;;
376+
.lzma)
377+
xz --format=lzma -f -6 "$vmz.$$"
378+
;;
379+
.lzo)
380+
lzop -f -9 "$vmz.$$"
381+
;;
368382
*)
369383
# drop the compression suffix so the stripped vmlinux is used
370384
compression=
385+
uboot_comp=none
371386
;;
372387
esac
373388

@@ -411,7 +426,7 @@ membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
411426
case "$platform" in
412427
uboot)
413428
rm -f "$ofile"
414-
${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
429+
${MKIMAGE} -A ppc -O linux -T kernel -C $uboot_comp -a $membase -e $membase \
415430
$uboot_version -d "$vmz" "$ofile"
416431
if [ -z "$cacheit" ]; then
417432
rm -f "$vmz"

0 commit comments

Comments
 (0)