Skip to content

Commit d0a32f5

Browse files
committed
Merge tag 'powerpc-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Support for configuring secure boot with user-defined keys on PowerVM LPARs - Simplify the replay of soft-masked IRQs by making it non-recursive - Add support for KCSAN on 64-bit Book3S - Improvements to the API & code which interacts with RTAS (pseries firmware) - Change 32-bit powermac to assign PCI bus numbers per domain by default - Some improvements to the 32-bit BPF JIT - Various other small features and fixes Thanks to Anders Roxell, Andrew Donnellan, Andrew Jeffery, Benjamin Gray, Christophe Leroy, Frederic Barrat, Ganesh Goudar, Geoff Levand, Greg Kroah-Hartman, Jan-Benedict Glaw, Josh Poimboeuf, Kajol Jain, Laurent Dufour, Mahesh Salgaonkar, Mathieu Desnoyers, Mimi Zohar, Murphy Zhou, Nathan Chancellor, Nathan Lynch, Nayna Jain, Nicholas Piggin, Pali Rohár, Petr Mladek, Rohan McLure, Russell Currey, Sachin Sant, Sathvika Vasireddy, Sourabh Jain, Stefan Berger, Stephen Rothwell, and Sudhakar Kuppusamy. * tag 'powerpc-6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (114 commits) powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot powerpc/e500: Add missing prototype for 'relocate_init' powerpc/64: Fix unannotated intra-function call warning powerpc/epapr: Don't use wrteei on non booke powerpc: Pass correct CPU reference to assembler powerpc/mm: Rearrange if-else block to avoid clang warning powerpc/nohash: Fix build with llvm-as powerpc/nohash: Fix build error with binutils >= 2.38 powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags macintosh: windfarm: Use unsigned type for 1-bit bitfields powerpc/kexec_file: print error string on usable memory property update failure powerpc/machdep: warn when machine_is() used too early powerpc/64: Replace -mcpu=e500mc64 by -mcpu=e5500 powerpc/eeh: Set channel state after notifying the drivers selftests/powerpc: Fix incorrect kernel headers search path powerpc/rtas: arch-wide function token lookup conversions powerpc/rtas: introduce rtas_function_token() API powerpc/pseries/lpar: convert to papr_sysparm API powerpc/pseries/hv-24x7: convert to papr_sysparm API ...
2 parents 5596c6a + f82cdc3 commit d0a32f5

File tree

113 files changed

+3850
-1582
lines changed

Some content is hidden

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

113 files changed

+3850
-1582
lines changed

Documentation/ABI/testing/sysfs-secvar

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ Description: A string indicating which backend is in use by the firmware.
1818
This determines the format of the variable and the accepted
1919
format of variable updates.
2020

21+
On powernv/OPAL, this value is provided by the OPAL firmware
22+
and is expected to be "ibm,edk2-compat-v1".
23+
24+
On pseries/PLPKS, this is generated by the kernel based on the
25+
version number in the SB_VERSION variable in the keystore, and
26+
has the form "ibm,plpks-sb-v<version>", or
27+
"ibm,plpks-sb-unknown" if there is no SB_VERSION variable.
28+
2129
What: /sys/firmware/secvar/vars/<variable name>
2230
Date: August 2019
2331
Contact: Nayna Jain <[email protected]>
@@ -34,7 +42,7 @@ Description: An integer representation of the size of the content of the
3442

3543
What: /sys/firmware/secvar/vars/<variable_name>/data
3644
Date: August 2019
37-
Contact: Nayna Jain h<[email protected]>
45+
Contact: Nayna Jain <[email protected]>
3846
Description: A read-only file containing the value of the variable. The size
3947
of the file represents the maximum size of the variable data.
4048

@@ -44,3 +52,68 @@ Contact: Nayna Jain <[email protected]>
4452
Description: A write-only file that is used to submit the new value for the
4553
variable. The size of the file represents the maximum size of
4654
the variable data that can be written.
55+
56+
What: /sys/firmware/secvar/config
57+
Date: February 2023
58+
Contact: Nayna Jain <[email protected]>
59+
Description: This optional directory contains read-only config attributes as
60+
defined by the secure variable implementation. All data is in
61+
ASCII format. The directory is only created if the backing
62+
implementation provides variables to populate it, which at
63+
present is only PLPKS on the pseries platform.
64+
65+
What: /sys/firmware/secvar/config/version
66+
Date: February 2023
67+
Contact: Nayna Jain <[email protected]>
68+
Description: Config version as reported by the hypervisor in ASCII decimal
69+
format.
70+
71+
Currently only provided by PLPKS on the pseries platform.
72+
73+
What: /sys/firmware/secvar/config/max_object_size
74+
Date: February 2023
75+
Contact: Nayna Jain <[email protected]>
76+
Description: Maximum allowed size of objects in the keystore in bytes,
77+
represented in ASCII decimal format.
78+
79+
This is not necessarily the same as the max size that can be
80+
written to an update file as writes can contain more than
81+
object data, you should use the size of the update file for
82+
that purpose.
83+
84+
Currently only provided by PLPKS on the pseries platform.
85+
86+
What: /sys/firmware/secvar/config/total_size
87+
Date: February 2023
88+
Contact: Nayna Jain <[email protected]>
89+
Description: Total size of the PLPKS in bytes, represented in ASCII decimal
90+
format.
91+
92+
Currently only provided by PLPKS on the pseries platform.
93+
94+
What: /sys/firmware/secvar/config/used_space
95+
Date: February 2023
96+
Contact: Nayna Jain <[email protected]>
97+
Description: Current space consumed by the key store, in bytes, represented
98+
in ASCII decimal format.
99+
100+
Currently only provided by PLPKS on the pseries platform.
101+
102+
What: /sys/firmware/secvar/config/supported_policies
103+
Date: February 2023
104+
Contact: Nayna Jain <[email protected]>
105+
Description: Bitmask of supported policy flags by the hypervisor,
106+
represented as an 8 byte hexadecimal ASCII string. Consult the
107+
hypervisor documentation for what these flags are.
108+
109+
Currently only provided by PLPKS on the pseries platform.
110+
111+
What: /sys/firmware/secvar/config/signed_update_algorithms
112+
Date: February 2023
113+
Contact: Nayna Jain <[email protected]>
114+
Description: Bitmask of flags indicating which algorithms the hypervisor
115+
supports for signed update of objects, represented as a 16 byte
116+
hexadecimal ASCII string. Consult the hypervisor documentation
117+
for what these flags mean.
118+
119+
Currently only provided by PLPKS on the pseries platform.

arch/powerpc/Kconfig

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ config PPC
197197
select HAVE_ARCH_KASAN if PPC_RADIX_MMU
198198
select HAVE_ARCH_KASAN if PPC_BOOK3E_64
199199
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
200+
select HAVE_ARCH_KCSAN if PPC_BOOK3S_64
200201
select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
201202
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
202203
select HAVE_ARCH_KGDB
@@ -206,7 +207,7 @@ config PPC
206207
select HAVE_ARCH_SECCOMP_FILTER
207208
select HAVE_ARCH_TRACEHOOK
208209
select HAVE_ASM_MODVERSIONS
209-
select HAVE_CONTEXT_TRACKING_USER if PPC64
210+
select HAVE_CONTEXT_TRACKING_USER
210211
select HAVE_C_RECORDMCOUNT
211212
select HAVE_DEBUG_KMEMLEAK
212213
select HAVE_DEBUG_STACKOVERFLOW
@@ -256,6 +257,7 @@ config PPC
256257
select HAVE_STATIC_CALL if PPC32
257258
select HAVE_SYSCALL_TRACEPOINTS
258259
select HAVE_VIRT_CPU_ACCOUNTING
260+
select HAVE_VIRT_CPU_ACCOUNTING_GEN
259261
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
260262
select IOMMU_HELPER if PPC64
261263
select IRQ_DOMAIN
@@ -387,10 +389,22 @@ config PPC_DCR
387389
depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
388390
default y
389391

392+
config PPC_PCI_OF_BUS_MAP
393+
bool "Use pci_to_OF_bus_map (deprecated)"
394+
depends on PPC32
395+
depends on PPC_PMAC || PPC_CHRP
396+
help
397+
This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
398+
restricts the system to only having 256 PCI buses. On CHRP it also causes
399+
the "pci-OF-bus-map" property to be created in the device tree.
400+
401+
If unsure, say "N".
402+
390403
config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
391404
depends on PPC32
392-
depends on !PPC_PMAC && !PPC_CHRP
405+
depends on !PPC_PCI_OF_BUS_MAP
393406
bool "Assign PCI bus numbers from zero individually for each PCI domain"
407+
default y
394408
help
395409
By default on PPC32 were PCI bus numbers unique across all PCI domains.
396410
So system could have only 256 PCI buses independently of available
@@ -1028,6 +1042,7 @@ config PPC_SECURE_BOOT
10281042
depends on PPC_POWERNV || PPC_PSERIES
10291043
depends on IMA_ARCH_POLICY
10301044
imply IMA_SECURE_AND_OR_TRUSTED_BOOT
1045+
select PSERIES_PLPKS if PPC_PSERIES
10311046
help
10321047
Systems with firmware secure boot enabled need to define security
10331048
policies to extend secure boot to the OS. This config allows a user

arch/powerpc/Makefile

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -146,31 +146,19 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option, $(MULTIPLEWORD))
146146

147147
CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
148148

149-
ifdef CONFIG_PPC_BOOK3S_64
150-
ifdef CONFIG_CPU_LITTLE_ENDIAN
151-
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
152-
else
153-
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
154-
endif
155-
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10, \
156-
$(call cc-option,-mtune=power9, \
157-
$(call cc-option,-mtune=power8)))
158-
else ifdef CONFIG_PPC_BOOK3E_64
159-
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
160-
endif
161-
162149
ifdef CONFIG_FUNCTION_TRACER
163150
CC_FLAGS_FTRACE := -pg
164151
ifdef CONFIG_MPROFILE_KERNEL
165152
CC_FLAGS_FTRACE += -mprofile-kernel
166153
endif
167154
endif
168155

169-
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
170-
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
156+
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
157+
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
171158

172-
CFLAGS-$(CONFIG_E5500_CPU) += $(call cc-option,-mcpu=e500mc64,-mcpu=powerpc64)
173-
CFLAGS-$(CONFIG_E6500_CPU) += $(call cc-option,-mcpu=e6500,$(E5500_CPU))
159+
CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \
160+
$(call cc-option,-mtune=power9, \
161+
$(call cc-option,-mtune=power8)))
174162

175163
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
176164

@@ -213,18 +201,14 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
213201
# often slow when they are implemented at all
214202
KBUILD_CFLAGS += $(call cc-option,-mno-string)
215203

216-
cpu-as-$(CONFIG_40x) += -Wa,-m405
217-
cpu-as-$(CONFIG_44x) += -Wa,-m440
218204
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
219-
cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500
220205

221206
# When using '-many -mpower4' gas will first try and find a matching power4
222207
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
223208
# about. GCC will pass -many to GAS when assembling, clang does not.
224209
# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
225210
# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
226211
cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
227-
cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
228212

229213
KBUILD_AFLAGS += $(cpu-as-y)
230214
KBUILD_CFLAGS += $(cpu-as-y)

arch/powerpc/boot/Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
3939
$(LINUXINCLUDE)
4040

4141
ifdef CONFIG_PPC64_BOOT_WRAPPER
42-
ifdef CONFIG_CPU_LITTLE_ENDIAN
43-
BOOTCFLAGS += -m64 -mcpu=powerpc64le
42+
BOOTCFLAGS += -m64
4443
else
45-
BOOTCFLAGS += -m64 -mcpu=powerpc64
44+
BOOTCFLAGS += -m32
4645
endif
46+
47+
ifdef CONFIG_TARGET_CPU_BOOL
48+
BOOTCFLAGS += -mcpu=$(CONFIG_TARGET_CPU)
49+
else ifdef CONFIG_PPC64_BOOT_WRAPPER
50+
ifdef CONFIG_CPU_LITTLE_ENDIAN
51+
BOOTCFLAGS += -mcpu=powerpc64le
4752
else
48-
BOOTCFLAGS += -m32 -mcpu=powerpc
53+
BOOTCFLAGS += -mcpu=powerpc64
54+
endif
4955
endif
5056

5157
BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)

arch/powerpc/boot/dts/turris1x.dts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,34 @@
367367
};
368368

369369
reboot@d {
370+
/*
371+
* CPLD firmware which manages system reset and
372+
* watchdog registers has bugs. It does not
373+
* autoclear system reset register after change
374+
* and watchdog ignores reset line on immediate
375+
* succeeding reset cycle triggered by watchdog.
376+
* These bugs have to be workarounded in U-Boot
377+
* bootloader. So use system reset via syscon as
378+
* a last resort because older U-Boot versions
379+
* do not have workaround for watchdog.
380+
*
381+
* Reset method via rstcr's global-utilities
382+
* (the preferred one) has priority level 128,
383+
* watchdog has priority level 0 and default
384+
* syscon-reboot priority level is 192.
385+
*
386+
* So define syscon-reboot with custom priority
387+
* level 64 (between rstcr and watchdog) because
388+
* rstcr should stay as default preferred reset
389+
* method and reset via watchdog is more broken
390+
* than system reset via syscon.
391+
*/
370392
compatible = "syscon-reboot";
371393
reg = <0x0d 0x01>;
372394
offset = <0x0d>;
373395
mask = <0x01>;
374396
value = <0x01>;
397+
priority = <64>;
375398
};
376399

377400
led-controller@13 {

arch/powerpc/configs/ps3_defconfig

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
CONFIG_PPC64=y
2-
CONFIG_CELL_CPU=y
3-
CONFIG_ALTIVEC=y
4-
CONFIG_SMP=y
5-
CONFIG_NR_CPUS=2
61
CONFIG_SYSVIPC=y
72
CONFIG_POSIX_MQUEUE=y
83
CONFIG_HIGH_RES_TIMERS=y
94
CONFIG_BLK_DEV_INITRD=y
105
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
116
CONFIG_EMBEDDED=y
127
# CONFIG_PERF_EVENTS is not set
13-
# CONFIG_COMPAT_BRK is not set
14-
CONFIG_SLAB=y
158
CONFIG_PROFILING=y
16-
CONFIG_MODULES=y
17-
CONFIG_MODULE_UNLOAD=y
9+
CONFIG_PPC64=y
10+
CONFIG_CELL_CPU=y
11+
CONFIG_ALTIVEC=y
12+
CONFIG_SMP=y
13+
CONFIG_NR_CPUS=2
1814
# CONFIG_PPC_POWERNV is not set
1915
# CONFIG_PPC_PSERIES is not set
2016
# CONFIG_PPC_PMAC is not set
@@ -27,17 +23,20 @@ CONFIG_PS3_FLASH=y
2723
CONFIG_PS3_VRAM=m
2824
CONFIG_PS3_LPM=m
2925
# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
30-
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
31-
CONFIG_BINFMT_MISC=y
3226
CONFIG_KEXEC=y
3327
CONFIG_PPC_4K_PAGES=y
34-
# CONFIG_SPARSEMEM_VMEMMAP is not set
35-
# CONFIG_COMPACTION is not set
3628
CONFIG_SCHED_SMT=y
3729
CONFIG_PM=y
3830
CONFIG_PM_DEBUG=y
3931
# CONFIG_SECCOMP is not set
40-
# CONFIG_PCI is not set
32+
CONFIG_MODULES=y
33+
CONFIG_MODULE_UNLOAD=y
34+
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
35+
CONFIG_BINFMT_MISC=y
36+
CONFIG_SLAB=y
37+
# CONFIG_COMPAT_BRK is not set
38+
# CONFIG_SPARSEMEM_VMEMMAP is not set
39+
# CONFIG_COMPACTION is not set
4140
CONFIG_NET=y
4241
CONFIG_PACKET=y
4342
CONFIG_UNIX=y
@@ -87,7 +86,6 @@ CONFIG_USB_USBNET=m
8786
# CONFIG_USB_NET_NET1080 is not set
8887
# CONFIG_USB_NET_CDC_SUBSET is not set
8988
# CONFIG_USB_NET_ZAURUS is not set
90-
CONFIG_INPUT_FF_MEMLESS=m
9189
CONFIG_INPUT_JOYDEV=m
9290
CONFIG_INPUT_EVDEV=m
9391
# CONFIG_INPUT_KEYBOARD is not set
@@ -110,13 +108,10 @@ CONFIG_SND=m
110108
# CONFIG_SND_DRIVERS is not set
111109
CONFIG_SND_USB_AUDIO=m
112110
CONFIG_HIDRAW=y
113-
CONFIG_HID_APPLE=m
114111
CONFIG_HID_BELKIN=m
115112
CONFIG_HID_CHERRY=m
116113
CONFIG_HID_EZKEY=m
117114
CONFIG_HID_TWINHAN=m
118-
CONFIG_HID_LOGITECH=m
119-
CONFIG_HID_LOGITECH_DJ=m
120115
CONFIG_HID_MICROSOFT=m
121116
CONFIG_HID_SUNPLUS=m
122117
CONFIG_HID_SMARTJOYPLUS=m
@@ -151,8 +146,12 @@ CONFIG_CIFS=m
151146
CONFIG_NLS=y
152147
CONFIG_NLS_CODEPAGE_437=y
153148
CONFIG_NLS_ISO8859_1=y
149+
CONFIG_CRYPTO_PCBC=m
150+
CONFIG_CRYPTO_MICHAEL_MIC=m
151+
CONFIG_CRYPTO_LZO=m
154152
CONFIG_CRC_CCITT=m
155153
CONFIG_CRC_T10DIF=y
154+
CONFIG_PRINTK_TIME=y
156155
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
157156
CONFIG_MAGIC_SYSRQ=y
158157
CONFIG_DEBUG_MEMORY_INIT=y
@@ -163,7 +162,3 @@ CONFIG_DEBUG_LOCKDEP=y
163162
CONFIG_DEBUG_LIST=y
164163
CONFIG_RCU_CPU_STALL_TIMEOUT=60
165164
# CONFIG_FTRACE is not set
166-
CONFIG_CRYPTO_PCBC=m
167-
CONFIG_CRYPTO_MICHAEL_MIC=m
168-
CONFIG_CRYPTO_LZO=m
169-
CONFIG_PRINTK_TIME=y

0 commit comments

Comments
 (0)