Skip to content

Commit 29ec39f

Browse files
committed
Merge tag 'powerpc-5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
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() ...
2 parents 3fb561b + f1aa0e4 commit 29ec39f

File tree

370 files changed

+5618
-3431
lines changed

Some content is hidden

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

370 files changed

+5618
-3431
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,7 +3393,7 @@
33933393
Disable SMAP (Supervisor Mode Access Prevention)
33943394
even if it is supported by processor.
33953395

3396-
nosmep [X86,PPC]
3396+
nosmep [X86,PPC64s]
33973397
Disable SMEP (Supervisor Mode Execution Prevention)
33983398
even if it is supported by processor.
33993399

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

4169+
pmu_override= [PPC] Override the PMU.
4170+
This option takes over the PMU facility, so it is no
4171+
longer usable by perf. Setting this option starts the
4172+
PMU counters by setting MMCR0 to 0 (the FC bit is
4173+
cleared). If a number is given, then MMCR1 is set to
4174+
that number, otherwise (e.g., 'pmu_override=on'), MMCR1
4175+
remains 0.
4176+
41694177
pm_debug_messages [SUSPEND,KNL]
41704178
Enable suspend/resume debug messages during boot up.
41714179

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

6505+
xive.store-eoi=off [PPC]
6506+
By default on POWER10 and above, the kernel will use
6507+
stores for EOI handling when the XIVE interrupt mode
6508+
is active. This option allows the XIVE driver to use
6509+
loads instead, as on POWER9.
6510+
64976511
xhci-hcd.quirks [USB,KNL]
64986512
A hex value specifying bitmask with supplemental xhci
64996513
host controller quirks. Meaning of each bit can be

arch/powerpc/Kconfig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ config PPC
129129
select ARCH_HAS_KCOV
130130
select ARCH_HAS_MEMBARRIER_CALLBACKS
131131
select ARCH_HAS_MEMBARRIER_SYNC_CORE
132-
select ARCH_HAS_MEMREMAP_COMPAT_ALIGN
132+
select ARCH_HAS_MEMREMAP_COMPAT_ALIGN if PPC_64S_HASH_MMU
133133
select ARCH_HAS_MMIOWB if PPC64
134134
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
135135
select ARCH_HAS_PHYS_TO_DMA
@@ -165,6 +165,7 @@ config PPC
165165
select BINFMT_ELF
166166
select BUILDTIME_TABLE_SORT
167167
select CLONE_BACKWARDS
168+
select CPUMASK_OFFSTACK if NR_CPUS >= 8192
168169
select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
169170
select DMA_OPS_BYPASS if PPC64
170171
select DMA_OPS if PPC64
@@ -205,7 +206,7 @@ config PPC
205206
select HAVE_DEBUG_KMEMLEAK
206207
select HAVE_DEBUG_STACKOVERFLOW
207208
select HAVE_DYNAMIC_FTRACE
208-
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
209+
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL || PPC32
209210
select HAVE_EBPF_JIT
210211
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
211212
select HAVE_FAST_GUP
@@ -229,7 +230,7 @@ config PPC
229230
select HAVE_KPROBES_ON_FTRACE
230231
select HAVE_KRETPROBES
231232
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
232-
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
233+
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS && PPC64
233234
select HAVE_MOD_ARCH_SPECIFIC
234235
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
235236
select HAVE_OPTPROBES
@@ -845,7 +846,7 @@ config FORCE_MAX_ZONEORDER
845846
config PPC_SUBPAGE_PROT
846847
bool "Support setting protections for 4k subpages (subpage_prot syscall)"
847848
default n
848-
depends on PPC_BOOK3S_64 && PPC_64K_PAGES
849+
depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
849850
help
850851
This option adds support for system call to allow user programs
851852
to set access permissions (read/write, readonly, or no access)
@@ -943,6 +944,7 @@ config PPC_MEM_KEYS
943944
prompt "PowerPC Memory Protection Keys"
944945
def_bool y
945946
depends on PPC_BOOK3S_64
947+
depends on PPC_64S_HASH_MMU
946948
select ARCH_USES_HIGH_VMA_FLAGS
947949
select ARCH_HAS_PKEYS
948950
help

arch/powerpc/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ cpu-as-$(CONFIG_E500) += -Wa,-me500
245245
# When using '-many -mpower4' gas will first try and find a matching power4
246246
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
247247
# about. GCC will pass -many to GAS when assembling, clang does not.
248-
cpu-as-$(CONFIG_PPC_BOOK3S_64) += -Wa,-mpower4 -Wa,-many
248+
# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
249+
# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
250+
cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
249251
cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
250252

251253
KBUILD_AFLAGS += $(cpu-as-y)
@@ -445,10 +447,11 @@ PHONY += checkbin
445447
# Check toolchain versions:
446448
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
447449
checkbin:
448-
@if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \
449-
&& $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \
450+
@if test "x${CONFIG_LD_IS_LLD}" != "xy" -a \
451+
"x$(call ld-ifversion, -le, 22400, y)" = "xy" ; then \
450452
echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \
451453
echo 'in some circumstances.' ; \
454+
echo '*** binutils 2.23 do not define the TOC symbol ' ; \
452455
echo -n '*** Please use a different binutils version.' ; \
453456
false ; \
454457
fi

arch/powerpc/boot/crt0.S

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ p_etext: .8byte _etext
2828
p_bss_start: .8byte __bss_start
2929
p_end: .8byte _end
3030

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

228228
#define PROM_FRAME_SIZE 512
229-
#define SAVE_GPR(n, base) std n,8*(n)(base)
230-
#define REST_GPR(n, base) ld n,8*(n)(base)
231-
#define SAVE_2GPRS(n, base) SAVE_GPR(n, base); SAVE_GPR(n+1, base)
232-
#define SAVE_4GPRS(n, base) SAVE_2GPRS(n, base); SAVE_2GPRS(n+2, base)
233-
#define SAVE_8GPRS(n, base) SAVE_4GPRS(n, base); SAVE_4GPRS(n+4, base)
234-
#define SAVE_10GPRS(n, base) SAVE_8GPRS(n, base); SAVE_2GPRS(n+8, base)
235-
#define REST_2GPRS(n, base) REST_GPR(n, base); REST_GPR(n+1, base)
236-
#define REST_4GPRS(n, base) REST_2GPRS(n, base); REST_2GPRS(n+2, base)
237-
#define REST_8GPRS(n, base) REST_4GPRS(n, base); REST_4GPRS(n+4, base)
238-
#define REST_10GPRS(n, base) REST_8GPRS(n, base); REST_2GPRS(n+8, base)
229+
230+
.macro OP_REGS op, width, start, end, base, offset
231+
.Lreg=\start
232+
.rept (\end - \start + 1)
233+
\op .Lreg,\offset+\width*.Lreg(\base)
234+
.Lreg=.Lreg+1
235+
.endr
236+
.endm
237+
238+
#define SAVE_GPRS(start, end, base) OP_REGS std, 8, start, end, base, 0
239+
#define REST_GPRS(start, end, base) OP_REGS ld, 8, start, end, base, 0
240+
#define SAVE_GPR(n, base) SAVE_GPRS(n, n, base)
241+
#define REST_GPR(n, base) REST_GPRS(n, n, base)
239242

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

248251
SAVE_GPR(2, r1)
249-
SAVE_GPR(13, r1)
250-
SAVE_8GPRS(14, r1)
251-
SAVE_10GPRS(22, r1)
252+
SAVE_GPRS(13, 31, r1)
252253
mfcr r10
253254
std r10,8*32(r1)
254255
mfmsr r10
@@ -283,9 +284,7 @@ prom:
283284

284285
/* Restore other registers */
285286
REST_GPR(2, r1)
286-
REST_GPR(13, r1)
287-
REST_8GPRS(14, r1)
288-
REST_10GPRS(22, r1)
287+
REST_GPRS(13, 31, r1)
289288
ld r10,8*32(r1)
290289
mtcr r10
291290

arch/powerpc/boot/dts/digsy_mtc.dts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
status = "disabled";
2626
};
2727

28-
spi@f00 {
29-
msp430@0 {
30-
compatible = "spidev";
31-
spi-max-frequency = <32000>;
32-
reg = <0>;
33-
};
34-
};
35-
3628
psc@2000 { // PSC1
3729
status = "disabled";
3830
};

arch/powerpc/boot/dts/o2d.dtsi

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@
3434
#address-cells = <1>;
3535
#size-cells = <0>;
3636
cell-index = <0>;
37-
38-
spidev@0 {
39-
compatible = "spidev";
40-
spi-max-frequency = <250000>;
41-
reg = <0>;
42-
};
4337
};
4438

4539
psc@2200 { // PSC2

arch/powerpc/boot/zImage.lds.S

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ SECTIONS
3636
}
3737

3838
#ifdef CONFIG_PPC64_BOOT_WRAPPER
39-
. = ALIGN(256);
40-
.got :
39+
.got : ALIGN(256)
4140
{
42-
__toc_start = .;
43-
*(.got)
44-
*(.toc)
41+
*(.got .toc)
4542
}
4643
#endif
4744

arch/powerpc/configs/microwatt_defconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ CONFIG_EMBEDDED=y
1515
# CONFIG_COMPAT_BRK is not set
1616
# CONFIG_SLAB_MERGE_DEFAULT is not set
1717
CONFIG_PPC64=y
18+
CONFIG_POWER9_CPU=y
19+
# CONFIG_PPC_64S_HASH_MMU is not set
1820
# CONFIG_PPC_KUEP is not set
1921
# CONFIG_PPC_KUAP is not set
2022
CONFIG_CPU_LITTLE_ENDIAN=y
@@ -27,7 +29,6 @@ CONFIG_PPC_MICROWATT=y
2729
CONFIG_CPU_FREQ=y
2830
CONFIG_HZ_100=y
2931
CONFIG_PPC_4K_PAGES=y
30-
# CONFIG_PPC_MEM_KEYS is not set
3132
# CONFIG_SECCOMP is not set
3233
# CONFIG_MQ_IOSCHED_KYBER is not set
3334
# CONFIG_COREDUMP is not set

arch/powerpc/configs/ppc64_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ CONFIG_PPC64=y
2626
CONFIG_NR_CPUS=2048
2727
CONFIG_PPC_SPLPAR=y
2828
CONFIG_DTL=y
29-
CONFIG_SCANLOG=m
3029
CONFIG_PPC_SMLPAR=y
3130
CONFIG_IBMEBUS=y
3231
CONFIG_PPC_SVM=y

arch/powerpc/configs/pseries_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ CONFIG_MODULE_SRCVERSION_ALL=y
3838
CONFIG_PARTITION_ADVANCED=y
3939
CONFIG_PPC_SPLPAR=y
4040
CONFIG_DTL=y
41-
CONFIG_SCANLOG=m
4241
CONFIG_PPC_SMLPAR=y
4342
CONFIG_IBMEBUS=y
4443
CONFIG_PAPR_SCM=m

0 commit comments

Comments
 (0)