Skip to content

Commit 5c0b0c6

Browse files
committed
Merge tag 'powerpc-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Enable STRICT_KERNEL_RWX for Freescale 85xx platforms. - Activate CONFIG_STRICT_KERNEL_RWX by default, while still allowing it to be disabled. - Add support for out-of-line static calls on 32-bit. - Fix oopses doing bpf-to-bpf calls when STRICT_KERNEL_RWX is enabled. - Fix boot hangs on e5500 due to stale value in ESR passed to do_page_fault(). - Fix several bugs on pseries in handling of device tree cache information for hotplugged CPUs, and/or during partition migration. - Various other small features and fixes. Thanks to Alexey Kardashevskiy, Alistair Popple, Anatolij Gustschin, Andrew Donnellan, Athira Rajeev, Bixuan Cui, Bjorn Helgaas, Cédric Le Goater, Christophe Leroy, Daniel Axtens, Daniel Henrique Barboza, Denis Kirjanov, Fabiano Rosas, Frederic Barrat, Gustavo A. R. Silva, Hari Bathini, Jacques de Laval, Joel Stanley, Kai Song, Kajol Jain, Laurent Vivier, Leonardo Bras, Madhavan Srinivasan, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, Nick Desaulniers, Niklas Schnelle, Oliver O'Halloran, Rob Herring, Russell Currey, Srikar Dronamraju, Stan Johnson, Tyrel Datwyler, Uwe Kleine-König, Vasant Hegde, Wan Jiabing, and Xiaoming Ni, * tag 'powerpc-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (73 commits) powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST powerpc/32e: Ignore ESR in instruction storage interrupt handler powerpc/powernv/prd: Unregister OPAL_MSG_PRD2 notifier during module unload powerpc: Don't provide __kernel_map_pages() without ARCH_SUPPORTS_DEBUG_PAGEALLOC MAINTAINERS: Update powerpc KVM entry powerpc/xmon: fix task state output powerpc/44x/fsp2: add missing of_node_put powerpc/dcr: Use cmplwi instead of 3-argument cmpli KVM: PPC: Tick accounting should defer vtime accounting 'til after IRQ handling powerpc/security: Use a mutex for interrupt exit code patching powerpc/83xx/mpc8349emitx: Make mcu_gpiochip_remove() return void powerpc/fsl_booke: Fix setting of exec flag when setting TLBCAMs powerpc/book3e: Fix set_memory_x() and set_memory_nx() powerpc/nohash: Fix __ptep_set_access_flags() and ptep_set_wrprotect() powerpc/bpf: Fix write protecting JIT code selftests/powerpc: Use date instead of EPOCHSECONDS in mitigation-patching.sh powerpc/64s/interrupt: Fix check_return_regs_valid() false positive powerpc/boot: Set LC_ALL=C in wrapper script powerpc/64s: Default to 64K pages for 64 bit book3s Revert "powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC" ...
2 parents a3f3677 + c12ab8d commit 5c0b0c6

File tree

112 files changed

+837
-582
lines changed

Some content is hidden

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

112 files changed

+837
-582
lines changed

MAINTAINERS

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10388,11 +10388,8 @@ F: arch/mips/include/uapi/asm/kvm*
1038810388
F: arch/mips/kvm/
1038910389

1039010390
KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc)
10391-
M: Paul Mackerras <[email protected]>
10392-
10393-
S: Supported
10394-
W: http://www.linux-kvm.org/
10395-
T: git git://github.com/agraf/linux-2.6.git
10391+
10392+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git topic/ppc-kvm
1039610393
F: arch/powerpc/include/asm/kvm*
1039710394
F: arch/powerpc/include/uapi/asm/kvm*
1039810395
F: arch/powerpc/kernel/kvm*

arch/powerpc/Kconfig

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ config PPC
138138
select ARCH_HAS_PTE_SPECIAL
139139
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
140140
select ARCH_HAS_SET_MEMORY
141-
select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !HIBERNATION)
141+
select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
142+
select ARCH_HAS_STRICT_KERNEL_RWX if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
142143
select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX && !PPC_BOOK3S_32
143144
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
144145
select ARCH_HAS_UACCESS_FLUSHCACHE
@@ -148,9 +149,10 @@ config PPC
148149
select ARCH_MIGHT_HAVE_PC_PARPORT
149150
select ARCH_MIGHT_HAVE_PC_SERIO
150151
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
152+
select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
151153
select ARCH_STACKWALK
152154
select ARCH_SUPPORTS_ATOMIC_RMW
153-
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC32 || PPC_BOOK3S_64
155+
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx || 40x
154156
select ARCH_USE_BUILTIN_BSWAP
155157
select ARCH_USE_CMPXCHG_LOCKREF if PPC64
156158
select ARCH_USE_MEMTEST
@@ -190,7 +192,7 @@ config PPC
190192
select HAVE_ARCH_JUMP_LABEL_RELATIVE
191193
select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
192194
select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
193-
select HAVE_ARCH_KFENCE if PPC32
195+
select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || 40x
194196
select HAVE_ARCH_KGDB
195197
select HAVE_ARCH_MMAP_RND_BITS
196198
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
@@ -241,6 +243,7 @@ config PPC
241243
select HAVE_SOFTIRQ_ON_OWN_STACK
242244
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
243245
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
246+
select HAVE_STATIC_CALL if PPC32
244247
select HAVE_SYSCALL_TRACEPOINTS
245248
select HAVE_VIRT_CPU_ACCOUNTING
246249
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
@@ -707,6 +710,7 @@ config ARCH_MEMORY_PROBE
707710

708711
choice
709712
prompt "Page size"
713+
default PPC_64K_PAGES if PPC_BOOK3S_64
710714
default PPC_4K_PAGES
711715
help
712716
Select the kernel logical page size. Increasing the page size
@@ -778,7 +782,8 @@ config DATA_SHIFT_BOOL
778782
bool "Set custom data alignment"
779783
depends on ADVANCED_OPTIONS
780784
depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
781-
depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX)
785+
depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
786+
FSL_BOOKE
782787
help
783788
This option allows you to set the kernel data alignment. When
784789
RAM is mapped by blocks, the alignment needs to fit the size and
@@ -791,11 +796,13 @@ config DATA_SHIFT
791796
default 24 if STRICT_KERNEL_RWX && PPC64
792797
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
793798
range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
799+
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
794800
default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
795801
default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
796802
default 23 if STRICT_KERNEL_RWX && PPC_8xx
797803
default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
798804
default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
805+
default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
799806
default PPC_PAGE_SHIFT
800807
help
801808
On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
@@ -1123,7 +1130,10 @@ config LOWMEM_CAM_NUM_BOOL
11231130
config LOWMEM_CAM_NUM
11241131
depends on FSL_BOOKE
11251132
int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
1126-
default 3
1133+
default 3 if !STRICT_KERNEL_RWX
1134+
default 9 if DATA_SHIFT >= 24
1135+
default 12 if DATA_SHIFT >= 22
1136+
default 15
11271137

11281138
config DYNAMIC_MEMSTART
11291139
bool "Enable page aligned dynamic load address for kernel"

arch/powerpc/boot/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
123123
oflib.c ofconsole.c cuboot.c
124124

125125
src-wlib-$(CONFIG_PPC_MPC52xx) += mpc52xx-psc.c
126-
src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S opal.c
126+
src-wlib-$(CONFIG_PPC_POWERNV) += opal-calls.S opal.c
127127
ifndef CONFIG_PPC64_BOOT_WRAPPER
128128
src-wlib-y += crtsavres.S
129129
endif

arch/powerpc/boot/dts/a4m072.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
clock-frequency = <0>; /* From boot loader */
141141
interrupts = <2 8 0 2 9 0 2 10 0>;
142142
bus-range = <0 0>;
143-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
144-
0x02000000 0 0x90000000 0x90000000 0 0x10000000
145-
0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
143+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
144+
<0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
145+
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
146146
};
147147
};

arch/powerpc/boot/dts/charon.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
};
3636
};
3737

38-
memory {
38+
memory@0 {
3939
device_type = "memory";
4040
reg = <0x00000000 0x08000000>; // 128MB
4141
};
@@ -225,8 +225,8 @@
225225
clock-frequency = <0>; // From boot loader
226226
interrupts = <2 8 0 2 9 0 2 10 0>;
227227
bus-range = <0 0>;
228-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
229-
0x02000000 0 0x90000000 0x90000000 0 0x10000000
230-
0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
228+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
229+
<0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
230+
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
231231
};
232232
};

arch/powerpc/boot/dts/digsy_mtc.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
model = "intercontrol,digsy-mtc";
1717
compatible = "intercontrol,digsy-mtc";
1818

19-
memory {
19+
memory@0 {
2020
reg = <0x00000000 0x02000000>; // 32MB
2121
};
2222

@@ -98,9 +98,9 @@
9898
clock-frequency = <0>; // From boot loader
9999
interrupts = <2 8 0 2 9 0 2 10 0>;
100100
bus-range = <0 0>;
101-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000
102-
0x02000000 0 0x90000000 0x90000000 0 0x10000000
103-
0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
101+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
102+
<0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
103+
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
104104
};
105105

106106
localbus {

arch/powerpc/boot/dts/lite5200.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
};
3333
};
3434

35-
memory {
35+
memory@0 {
3636
device_type = "memory";
3737
reg = <0x00000000 0x04000000>; // 64MB
3838
};
@@ -283,9 +283,9 @@
283283
clock-frequency = <0>; // From boot loader
284284
interrupts = <2 8 0 2 9 0 2 10 0>;
285285
bus-range = <0 0>;
286-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
287-
0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
288-
0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
286+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
287+
<0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
288+
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
289289
};
290290

291291
localbus {

arch/powerpc/boot/dts/lite5200b.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
led4 { gpios = <&gpio_simple 2 1>; };
3232
};
3333

34-
memory {
34+
memory@0 {
3535
reg = <0x00000000 0x10000000>; // 256MB
3636
};
3737

@@ -116,9 +116,9 @@
116116
clock-frequency = <0>; // From boot loader
117117
interrupts = <2 8 0 2 9 0 2 10 0>;
118118
bus-range = <0 0>;
119-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
120-
0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
121-
0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
119+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
120+
<0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
121+
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
122122
};
123123

124124
localbus {

arch/powerpc/boot/dts/media5200.dts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
};
3333
};
3434

35-
memory {
35+
memory@0 {
3636
reg = <0x00000000 0x08000000>; // 128MB RAM
3737
};
3838

@@ -96,9 +96,9 @@
9696

9797
0xe000 0 0 1 &media5200_fpga 0 5 // CoralIP
9898
>;
99-
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000
100-
0x02000000 0 0xa0000000 0xa0000000 0 0x10000000
101-
0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
99+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x20000000>,
100+
<0x02000000 0 0xa0000000 0xa0000000 0 0x10000000>,
101+
<0x01000000 0 0x00000000 0xb0000000 0 0x01000000>;
102102
interrupt-parent = <&mpc5200_pic>;
103103
};
104104

arch/powerpc/boot/dts/mpc5200b.dtsi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
};
3434
};
3535

36-
memory: memory {
36+
memory: memory@0 {
3737
device_type = "memory";
3838
reg = <0x00000000 0x04000000>; // 64MB
3939
};
@@ -276,7 +276,9 @@
276276
clock-frequency = <0>; // From boot loader
277277
interrupts = <2 8 0 2 9 0 2 10 0>;
278278
bus-range = <0 0>;
279-
// ranges = need to add
279+
ranges = <0x42000000 0 0x80000000 0x80000000 0 0x10000000>,
280+
<0x02000000 0 0x90000000 0x90000000 0 0x10000000>,
281+
<0x01000000 0 0x00000000 0xa0000000 0 0x01000000>;
280282
};
281283

282284
localbus: localbus {

0 commit comments

Comments
 (0)