Skip to content

Commit 8d69733

Browse files
committed
Merge tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "Notable changes: - Mitigations for Spectre v2 on some Freescale (NXP) CPUs. - A large series adding support for pass-through of Nvidia V100 GPUs to guests on Power9. - Another large series to enable hardware assistance for TLB table walk on MPC8xx CPUs. - Some preparatory changes to our DMA code, to make way for further cleanups from Christoph. - Several fixes for our Transactional Memory handling discovered by fuzzing the signal return path. - Support for generating our system call table(s) from a text file like other architectures. - A fix to our page fault handler so that instead of generating a WARN_ON_ONCE, user accesses of kernel addresses instead print a ratelimited and appropriately scary warning. - A cosmetic change to make our unhandled page fault messages more similar to other arches and also more compact and informative. - Freescale updates from Scott: "Highlights include elimination of legacy clock bindings use from dts files, an 83xx watchdog handler, fixes to old dts interrupt errors, and some minor cleanup." And many clean-ups, reworks and minor fixes etc. Thanks to: Alexandre Belloni, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Benjamin Herrenschmidt, Breno Leitao, Christian Lamparter, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Darren Stevens, David Gibson, Diana Craciun, Dmitry V. Levin, Firoz Khan, Geert Uytterhoeven, Greg Kurz, Gustavo Romero, Hari Bathini, Joel Stanley, Kees Cook, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring, Mathieu Malaterre, Michal Suchánek, Naveen N. Rao, Nick Desaulniers, Oliver O'Halloran, Paul Mackerras, Ram Pai, Ravi Bangoria, Rob Herring, Russell Currey, Sabyasachi Gupta, Sam Bobroff, Satheesh Rajendran, Scott Wood, Segher Boessenkool, Stephen Rothwell, Tang Yuantian, Thiago Jung Bauermann, Yangtao Li, Yuantian Tang, Yue Haibing" * tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (201 commits) Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask" powerpc/zImage: Also check for stdout-path powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y macintosh: Use of_node_name_{eq, prefix} for node name comparisons ide: Use of_node_name_eq for node name comparisons powerpc: Use of_node_name_eq for node name comparisons powerpc/pseries/pmem: Convert to %pOFn instead of device_node.name powerpc/mm: Remove very old comment in hash-4k.h powerpc/pseries: Fix node leak in update_lmb_associativity_index() powerpc/configs/85xx: Enable CONFIG_DEBUG_KERNEL powerpc/dts/fsl: Fix dtc-flagged interrupt errors clk: qoriq: add more compatibles strings powerpc/fsl: Use new clockgen binding powerpc/83xx: handle machine check caused by watchdog timer powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved" powerpc/fsl_pci: simplify fsl_pci_dma_set_mask arch/powerpc/fsl_rmu: Use dma_zalloc_coherent vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver vfio_pci: Allow regions to add own capabilities vfio_pci: Allow mapping extra regions ...
2 parents 6d101ba + 12526b0 commit 8d69733

File tree

296 files changed

+4689
-3411
lines changed

Some content is hidden

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

296 files changed

+4689
-3411
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2833,7 +2833,7 @@
28332833
check bypass). With this option data leaks are possible
28342834
in the system.
28352835

2836-
nospectre_v2 [X86] Disable all mitigations for the Spectre variant 2
2836+
nospectre_v2 [X86,PPC_FSL_BOOK3E] Disable all mitigations for the Spectre variant 2
28372837
(indirect branch prediction) vulnerability. System may
28382838
allow data leaks with this option, which is equivalent
28392839
to spectre_v2=off.

Documentation/devicetree/bindings/clock/qoriq-clock.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ Required properties:
2828
* "fsl,p4080-clockgen"
2929
* "fsl,p5020-clockgen"
3030
* "fsl,p5040-clockgen"
31+
* "fsl,t1023-clockgen"
32+
* "fsl,t1024-clockgen"
33+
* "fsl,t1040-clockgen"
34+
* "fsl,t1042-clockgen"
35+
* "fsl,t2080-clockgen"
36+
* "fsl,t2081-clockgen"
3137
* "fsl,t4240-clockgen"
3238
* "fsl,b4420-clockgen"
3339
* "fsl,b4860-clockgen"

Documentation/powerpc/firmware-assisted-dump.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,15 @@ header, is usually reserved at an offset greater than boot memory
113113
size (see Fig. 1). This area is *not* released: this region will
114114
be kept permanently reserved, so that it can act as a receptacle
115115
for a copy of the boot memory content in addition to CPU state
116-
and HPTE region, in the case a crash does occur.
116+
and HPTE region, in the case a crash does occur. Since this reserved
117+
memory area is used only after the system crash, there is no point in
118+
blocking this significant chunk of memory from production kernel.
119+
Hence, the implementation uses the Linux kernel's Contiguous Memory
120+
Allocator (CMA) for memory reservation if CMA is configured for kernel.
121+
With CMA reservation this memory will be available for applications to
122+
use it, while kernel is prevented from using it. With this fadump will
123+
still be able to capture all of the kernel memory and most of the user
124+
space memory except the user pages that were present in CMA region.
117125

118126
o Memory Reservation during first kernel
119127

@@ -162,6 +170,9 @@ How to enable firmware-assisted dump (fadump):
162170

163171
1. Set config option CONFIG_FA_DUMP=y and build kernel.
164172
2. Boot into linux kernel with 'fadump=on' kernel cmdline option.
173+
By default, fadump reserved memory will be initialized as CMA area.
174+
Alternatively, user can boot linux kernel with 'fadump=nocma' to
175+
prevent fadump to use CMA.
165176
3. Optionally, user can also set 'crashkernel=' kernel cmdline
166177
to specify size of the memory to reserve for boot memory dump
167178
preservation.
@@ -172,6 +183,10 @@ NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead
172183
2. If firmware-assisted dump fails to reserve memory then it
173184
will fallback to existing kdump mechanism if 'crashkernel='
174185
option is set at kernel cmdline.
186+
3. if user wants to capture all of user space memory and ok with
187+
reserved memory not available to production system, then
188+
'fadump=nocma' kernel parameter can be used to fallback to
189+
old behaviour.
175190

176191
Sysfs/debugfs files:
177192
------------
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
CPU to ISA Version Mapping
2+
==========================
3+
4+
Mapping of some CPU versions to relevant ISA versions.
5+
6+
========= ====================
7+
CPU Architecture version
8+
========= ====================
9+
Power9 Power ISA v3.0B
10+
Power8 Power ISA v2.07
11+
Power7 Power ISA v2.06
12+
Power6 Power ISA v2.05
13+
PA6T Power ISA v2.04
14+
Cell PPU - Power ISA v2.02 with some minor exceptions
15+
- Plus Altivec/VMX ~= 2.03
16+
Power5++ Power ISA v2.04 (no VMX)
17+
Power5+ Power ISA v2.03
18+
Power5 - PowerPC User Instruction Set Architecture Book I v2.02
19+
- PowerPC Virtual Environment Architecture Book II v2.02
20+
- PowerPC Operating Environment Architecture Book III v2.02
21+
PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
22+
- PowerPC Virtual Environment Architecture Book II v2.01
23+
- PowerPC Operating Environment Architecture Book III v2.01
24+
- Plus Altivec/VMX ~= 2.03
25+
========= ====================
26+
27+
28+
Key Features
29+
------------
30+
31+
========== ==================
32+
CPU VMX (aka. Altivec)
33+
========== ==================
34+
Power9 Yes
35+
Power8 Yes
36+
Power7 Yes
37+
Power6 Yes
38+
PA6T Yes
39+
Cell PPU Yes
40+
Power5++ No
41+
Power5+ No
42+
Power5 No
43+
PPC970 Yes
44+
========== ==================
45+
46+
========== ====
47+
CPU VSX
48+
========== ====
49+
Power9 Yes
50+
Power8 Yes
51+
Power7 Yes
52+
Power6 No
53+
PA6T No
54+
Cell PPU No
55+
Power5++ No
56+
Power5+ No
57+
Power5 No
58+
PPC970 No
59+
========== ====
60+
61+
========== ====================
62+
CPU Transactional Memory
63+
========== ====================
64+
Power9 Yes (* see transactional_memory.txt)
65+
Power8 Yes
66+
Power7 No
67+
Power6 No
68+
PA6T No
69+
Cell PPU No
70+
Power5++ No
71+
Power5+ No
72+
Power5 No
73+
PPC970 No
74+
========== ====================

arch/powerpc/Kconfig

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ config PPC
128128
#
129129
# Please keep this list sorted alphabetically.
130130
#
131+
select ARCH_HAS_DEBUG_VIRTUAL
131132
select ARCH_HAS_DEVMEM_IS_ALLOWED
132133
select ARCH_HAS_DMA_SET_COHERENT_MASK
133134
select ARCH_HAS_ELF_RANDOMIZE
@@ -374,9 +375,9 @@ config PPC_ADV_DEBUG_DAC_RANGE
374375
depends on PPC_ADV_DEBUG_REGS && 44x
375376
default y
376377

377-
config ZONE_DMA32
378+
config ZONE_DMA
378379
bool
379-
default y if PPC64
380+
default y if PPC_BOOK3E_64
380381

381382
config PGTABLE_LEVELS
382383
int
@@ -556,7 +557,7 @@ config RELOCATABLE_TEST
556557

557558
config CRASH_DUMP
558559
bool "Build a dump capture kernel"
559-
depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
560+
depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
560561
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
561562
help
562563
Build a kernel suitable for use as a dump capture kernel.
@@ -869,10 +870,6 @@ config ISA
869870
have an IBM RS/6000 or pSeries machine, say Y. If you have an
870871
embedded board, consult your board documentation.
871872

872-
config ZONE_DMA
873-
bool
874-
default y
875-
876873
config GENERIC_ISA_DMA
877874
bool
878875
depends on ISA_DMA_API
@@ -1096,7 +1093,7 @@ config PHYSICAL_START_BOOL
10961093

10971094
config PHYSICAL_START
10981095
hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
1099-
default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !NONSTATIC_KERNEL
1096+
default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
11001097
default "0x00000000"
11011098

11021099
config PHYSICAL_ALIGN
@@ -1146,7 +1143,7 @@ config PIN_TLB_DATA
11461143

11471144
config PIN_TLB_IMMR
11481145
bool "Pinned TLB for IMMR"
1149-
depends on PIN_TLB
1146+
depends on PIN_TLB || PPC_EARLY_DEBUG_CPM
11501147
default y
11511148

11521149
config PIN_TLB_TEXT

arch/powerpc/Makefile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ endif
3030
endif
3131
endif
3232

33+
ifdef CONFIG_PPC_BOOK3S_32
34+
KBUILD_CFLAGS += -mcpu=powerpc
35+
endif
36+
3337
ifeq ($(CROSS_COMPILE),)
3438
KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
3539
else
@@ -152,7 +156,14 @@ endif
152156
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
153157
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
154158

155-
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
159+
# Clang unconditionally reserves r2 on ppc32 and does not support the flag
160+
# https://bugs.llvm.org/show_bug.cgi?id=39555
161+
CFLAGS-$(CONFIG_PPC32) := $(call cc-option, -ffixed-r2)
162+
163+
# Clang doesn't support -mmultiple / -mno-multiple
164+
# https://bugs.llvm.org/show_bug.cgi?id=39556
165+
CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD))
166+
156167
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
157168

158169
ifdef CONFIG_PPC_BOOK3S_64
@@ -237,10 +248,6 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
237248
# often slow when they are implemented at all
238249
KBUILD_CFLAGS += $(call cc-option,-mno-string)
239250

240-
ifdef CONFIG_6xx
241-
KBUILD_CFLAGS += -mcpu=powerpc
242-
endif
243-
244251
cpu-as-$(CONFIG_4xx) += -Wa,-m405
245252
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
246253
cpu-as-$(CONFIG_E200) += -Wa,-me200
@@ -313,6 +320,14 @@ PHONY += ppc64le_defconfig
313320
ppc64le_defconfig:
314321
$(call merge_into_defconfig,ppc64_defconfig,le)
315322

323+
PHONY += ppc64le_guest_defconfig
324+
ppc64le_guest_defconfig:
325+
$(call merge_into_defconfig,ppc64_defconfig,le guest)
326+
327+
PHONY += ppc64_guest_defconfig
328+
ppc64_guest_defconfig:
329+
$(call merge_into_defconfig,ppc64_defconfig,be guest)
330+
316331
PHONY += powernv_be_defconfig
317332
powernv_be_defconfig:
318333
$(call merge_into_defconfig,powernv_defconfig,be)
@@ -398,6 +413,9 @@ archclean:
398413

399414
archprepare: checkbin
400415

416+
archheaders:
417+
$(Q)$(MAKE) $(build)=arch/powerpc/kernel/syscalls all
418+
401419
ifdef CONFIG_STACKPROTECTOR
402420
prepare: stack_protector_prepare
403421

arch/powerpc/boot/dts/bamboo.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,10 @@
268268
/* Outbound ranges, one memory and one IO,
269269
* later cannot be changed. Chip supports a second
270270
* IO range but we don't use it for now
271+
* The chip also supports a larger memory range but
272+
* it's not naturally aligned, so our code will break
271273
*/
272-
ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x40000000
274+
ranges = <0x02000000 0x00000000 0xa0000000 0x00000000 0xa0000000 0x00000000 0x20000000
273275
0x02000000 0x00000000 0x00000000 0x00000000 0xe0000000 0x00000000 0x00100000
274276
0x01000000 0x00000000 0x00000000 0x00000000 0xe8000000 0x00000000 0x00010000>;
275277

arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@
7070
cpu0: PowerPC,e6500@0 {
7171
device_type = "cpu";
7272
reg = <0 1>;
73-
clocks = <&mux0>;
73+
clocks = <&clockgen 1 0>;
7474
next-level-cache = <&L2_1>;
7575
fsl,portid-mapping = <0x80000000>;
7676
};
7777
cpu1: PowerPC,e6500@2 {
7878
device_type = "cpu";
7979
reg = <2 3>;
80-
clocks = <&mux0>;
80+
clocks = <&clockgen 1 0>;
8181
next-level-cache = <&L2_1>;
8282
fsl,portid-mapping = <0x80000000>;
8383
};

arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,28 @@
7575
cpu0: PowerPC,e6500@0 {
7676
device_type = "cpu";
7777
reg = <0 1>;
78-
clocks = <&mux0>;
78+
clocks = <&clockgen 1 0>;
7979
next-level-cache = <&L2_1>;
8080
fsl,portid-mapping = <0x80000000>;
8181
};
8282
cpu1: PowerPC,e6500@2 {
8383
device_type = "cpu";
8484
reg = <2 3>;
85-
clocks = <&mux0>;
85+
clocks = <&clockgen 1 0>;
8686
next-level-cache = <&L2_1>;
8787
fsl,portid-mapping = <0x80000000>;
8888
};
8989
cpu2: PowerPC,e6500@4 {
9090
device_type = "cpu";
9191
reg = <4 5>;
92-
clocks = <&mux0>;
92+
clocks = <&clockgen 1 0>;
9393
next-level-cache = <&L2_1>;
9494
fsl,portid-mapping = <0x80000000>;
9595
};
9696
cpu3: PowerPC,e6500@6 {
9797
device_type = "cpu";
9898
reg = <6 7>;
99-
clocks = <&mux0>;
99+
clocks = <&clockgen 1 0>;
100100
next-level-cache = <&L2_1>;
101101
fsl,portid-mapping = <0x80000000>;
102102
};

arch/powerpc/boot/dts/fsl/b4si-post.dtsi

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -398,21 +398,6 @@
398398
};
399399

400400
/include/ "qoriq-clockgen2.dtsi"
401-
clockgen: global-utilities@e1000 {
402-
compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0";
403-
reg = <0xe1000 0x1000>;
404-
405-
mux0: mux0@0 {
406-
#clock-cells = <0>;
407-
reg = <0x0 0x4>;
408-
compatible = "fsl,qoriq-core-mux-2.0";
409-
clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>,
410-
<&pll1 0>, <&pll1 1>, <&pll1 2>;
411-
clock-names = "pll0", "pll0-div2", "pll0-div4",
412-
"pll1", "pll1-div2", "pll1-div4";
413-
clock-output-names = "cmux0";
414-
};
415-
};
416401

417402
rcpm: global-utilities@e2000 {
418403
compatible = "fsl,b4-rcpm", "fsl,qoriq-rcpm-2.0";

0 commit comments

Comments
 (0)