Skip to content

Commit 70cc1b5

Browse files
committed
Merge tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Add support for building the kernel using PC-relative addressing on Power10. - Allow HV KVM guests on Power10 to use prefixed instructions. - Unify support for the P2020 CPU (85xx) into a single machine description. - Always build the 64-bit kernel with 128-bit long double. - Drop support for several obsolete 2000's era development boards as identified by Paul Gortmaker. - A series fixing VFIO on Power since some generic changes. - Various other small features and fixes. Thanks to Alexey Kardashevskiy, Andrew Donnellan, Benjamin Gray, Bo Liu, Christophe Leroy, Dan Carpenter, David Binderman, Ira Weiny, Joel Stanley, Kajol Jain, Kautuk Consul, Liang He, Luis Chamberlain, Masahiro Yamada, Michael Neuling, Nathan Chancellor, Nathan Lynch, Nicholas Miehlbradt, Nicholas Piggin, Nick Desaulniers, Nysal Jan K.A, Pali Rohár, Paul Gortmaker, Paul Mackerras, Petr Vaněk, Randy Dunlap, Rob Herring, Sachin Sant, Sean Christopherson, Segher Boessenkool, and Timothy Pearson. * tag 'powerpc-6.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (156 commits) powerpc/64s: Disable pcrel code model on Clang powerpc: Fix merge conflict between pcrel and copy_thread changes powerpc/configs/powernv: Add IGB=y powerpc/configs/64s: Drop JFS Filesystem powerpc/configs/64s: Use EXT4 to mount EXT2 filesystems powerpc/configs: Make pseries_defconfig an alias for ppc64le_guest powerpc/configs: Make pseries_le an alias for ppc64le_guest powerpc/configs: Incorporate generic kvm_guest.config into guest configs powerpc/configs: Add IBMVETH=y and IBMVNIC=y to guest configs powerpc/configs/64s: Enable Device Mapper options powerpc/configs/64s: Enable PSTORE powerpc/configs/64s: Enable VLAN support powerpc/configs/64s: Enable BLK_DEV_NVME powerpc/configs/64s: Drop REISERFS powerpc/configs/64s: Use SHA512 for module signatures powerpc/configs/64s: Enable IO_STRICT_DEVMEM powerpc/configs/64s: Enable SCHEDSTATS powerpc/configs/64s: Enable DEBUG_VM & other options powerpc/configs/64s: Enable EMULATED_STATS powerpc/configs/64s: Enable KUNIT and most tests ...
2 parents 5ea8abf + 169f899 commit 70cc1b5

279 files changed

Lines changed: 2672 additions & 9510 deletions

File tree

Some content is hidden

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

MAINTAINERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9900,6 +9900,11 @@ F: drivers/crypto/vmx/ghash*
99009900
F: drivers/crypto/vmx/ppc-xlate.pl
99019901
F: drivers/crypto/vmx/vmx.c
99029902

9903+
IBM Power VFIO Support
9904+
M: Timothy Pearson <tpearson@raptorengineering.com>
9905+
S: Supported
9906+
F: drivers/vfio/vfio_iommu_spapr_tce.c
9907+
99039908
IBM ServeRAID RAID DRIVER
99049909
S: Orphan
99059910
F: drivers/scsi/ips.*

arch/powerpc/Kconfig

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ source "arch/powerpc/platforms/Kconfig.cputype"
44
config CC_HAS_ELFV2
55
def_bool PPC64 && $(cc-option, -mabi=elfv2)
66

7+
config CC_HAS_PREFIXED
8+
def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed)
9+
10+
config CC_HAS_PCREL
11+
# Clang has a bug (https://github.com/llvm/llvm-project/issues/62372)
12+
# where pcrel code is not generated if -msoft-float, -mno-altivec, or
13+
# -mno-vsx options are also given. Without these options, fp/vec
14+
# instructions are generated from regular kernel code. So Clang can't
15+
# do pcrel yet.
16+
def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel)
17+
718
config 32BIT
819
bool
920
default y if PPC32
@@ -158,6 +169,7 @@ config PPC
158169
select ARCH_USE_CMPXCHG_LOCKREF if PPC64
159170
select ARCH_USE_MEMTEST
160171
select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
172+
select ARCH_WANT_DEFAULT_BPF_JIT
161173
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
162174
select ARCH_WANT_IPC_PARSE_VERSION
163175
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
@@ -201,6 +213,7 @@ config PPC
201213
select HAVE_ARCH_KCSAN if PPC_BOOK3S_64
202214
select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
203215
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
216+
select HAVE_ARCH_WITHIN_STACK_FRAMES
204217
select HAVE_ARCH_KGDB
205218
select HAVE_ARCH_MMAP_RND_BITS
206219
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
@@ -292,10 +305,6 @@ config PPC
292305
# Please keep this list sorted alphabetically.
293306
#
294307

295-
config PPC_LONG_DOUBLE_128
296-
depends on PPC64 && ALTIVEC
297-
def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -)" = 1)
298-
299308
config PPC_BARRIER_NOSPEC
300309
bool
301310
default y
@@ -618,8 +627,7 @@ config PPC64_BIG_ENDIAN_ELF_ABI_V2
618627
bool "Build big-endian kernel using ELF ABI V2 (EXPERIMENTAL)"
619628
depends on PPC64 && CPU_BIG_ENDIAN
620629
depends on CC_HAS_ELFV2
621-
depends on LD_IS_BFD && LD_VERSION >= 22400
622-
default n
630+
depends on LD_VERSION >= 22400 || LLD_VERSION >= 150000
623631
help
624632
This builds the kernel image using the "Power Architecture 64-Bit ELF
625633
V2 ABI Specification", which has a reduced stack overhead and faster

arch/powerpc/Makefile

Lines changed: 61 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) += -z notext
107107
LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
108108

109109
ifdef CONFIG_PPC64
110+
ifndef CONFIG_PPC_KERNEL_PCREL
110111
ifeq ($(call cc-option-yn,-mcmodel=medium),y)
111112
# -mcmodel=medium breaks modules because it uses 32bit offsets from
112113
# the TOC pointer to create pointers where possible. Pointers into the
@@ -121,20 +122,20 @@ else
121122
export NO_MINIMAL_TOC := -mno-minimal-toc
122123
endif
123124
endif
125+
endif
124126

125127
CFLAGS-$(CONFIG_PPC64) := $(call cc-option,-mtraceback=no)
126-
ifndef CONFIG_CC_IS_CLANG
127128
ifdef CONFIG_PPC64_ELF_ABI_V2
128129
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
129-
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
130130
else
131+
ifndef CONFIG_CC_IS_CLANG
131132
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
132133
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
133-
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
134134
endif
135135
endif
136136
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
137137
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
138+
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mlong-double-128)
138139

139140
# Clang unconditionally reserves r2 on ppc32 and does not support the flag
140141
# https://bugs.llvm.org/show_bug.cgi?id=39555
@@ -181,8 +182,16 @@ ifdef CONFIG_476FPE_ERR46
181182
endif
182183

183184
# No prefix or pcrel
185+
ifdef CONFIG_PPC_KERNEL_PREFIXED
186+
KBUILD_CFLAGS += $(call cc-option,-mprefixed)
187+
else
184188
KBUILD_CFLAGS += $(call cc-option,-mno-prefixed)
189+
endif
190+
ifdef CONFIG_PPC_KERNEL_PCREL
191+
KBUILD_CFLAGS += $(call cc-option,-mpcrel)
192+
else
185193
KBUILD_CFLAGS += $(call cc-option,-mno-pcrel)
194+
endif
186195

187196
# No AltiVec or VSX or MMA instructions when building kernel
188197
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
@@ -238,110 +247,118 @@ bootwrapper_install:
238247
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
239248

240249
include $(srctree)/scripts/Makefile.defconf
241-
PHONY += pseries_le_defconfig
242-
pseries_le_defconfig:
243-
$(call merge_into_defconfig,pseries_defconfig,le)
244250

245-
PHONY += ppc64le_defconfig
251+
generated_configs += ppc64le_defconfig
246252
ppc64le_defconfig:
247253
$(call merge_into_defconfig,ppc64_defconfig,le)
248254

249-
PHONY += ppc64le_guest_defconfig
255+
generated_configs += ppc64le_guest_defconfig
250256
ppc64le_guest_defconfig:
251-
$(call merge_into_defconfig,ppc64_defconfig,le guest)
257+
$(call merge_into_defconfig,ppc64_defconfig,le guest kvm_guest)
252258

253-
PHONY += ppc64_guest_defconfig
259+
generated_configs += ppc64_guest_defconfig
254260
ppc64_guest_defconfig:
255-
$(call merge_into_defconfig,ppc64_defconfig,be guest)
261+
$(call merge_into_defconfig,ppc64_defconfig,be guest kvm_guest)
262+
263+
generated_configs += pseries_le_defconfig
264+
pseries_le_defconfig: ppc64le_guest_defconfig
256265

257-
PHONY += powernv_be_defconfig
266+
generated_configs += pseries_defconfig
267+
pseries_defconfig: ppc64le_guest_defconfig
268+
269+
generated_configs += powernv_be_defconfig
258270
powernv_be_defconfig:
259271
$(call merge_into_defconfig,powernv_defconfig,be)
260272

261-
PHONY += mpc85xx_defconfig
273+
generated_configs += mpc85xx_defconfig
262274
mpc85xx_defconfig:
263275
$(call merge_into_defconfig,mpc85xx_base.config,\
264276
85xx-32bit 85xx-hw fsl-emb-nonhw)
265277

266-
PHONY += mpc85xx_smp_defconfig
278+
generated_configs += mpc85xx_smp_defconfig
267279
mpc85xx_smp_defconfig:
268280
$(call merge_into_defconfig,mpc85xx_base.config,\
269281
85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw)
270282

271-
PHONY += corenet32_smp_defconfig
283+
generated_configs += corenet32_smp_defconfig
272284
corenet32_smp_defconfig:
273285
$(call merge_into_defconfig,corenet_base.config,\
274286
85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa)
275287

276-
PHONY += corenet64_smp_defconfig
288+
generated_configs += corenet64_smp_defconfig
277289
corenet64_smp_defconfig:
278290
$(call merge_into_defconfig,corenet_base.config,\
279291
85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa)
280292

281-
PHONY += mpc86xx_defconfig
293+
generated_configs += mpc86xx_defconfig
282294
mpc86xx_defconfig:
283295
$(call merge_into_defconfig,mpc86xx_base.config,\
284296
86xx-hw fsl-emb-nonhw)
285297

286-
PHONY += mpc86xx_smp_defconfig
298+
generated_configs += mpc86xx_smp_defconfig
287299
mpc86xx_smp_defconfig:
288300
$(call merge_into_defconfig,mpc86xx_base.config,\
289301
86xx-smp 86xx-hw fsl-emb-nonhw)
290302

291-
PHONY += ppc32_allmodconfig
303+
generated_configs += ppc32_allmodconfig
292304
ppc32_allmodconfig:
293305
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/book3s_32.config \
294306
-f $(srctree)/Makefile allmodconfig
295307

296-
PHONY += ppc_defconfig
308+
generated_configs += ppc_defconfig
297309
ppc_defconfig:
298310
$(call merge_into_defconfig,book3s_32.config,)
299311

300-
PHONY += ppc64le_allmodconfig
312+
generated_configs += ppc64le_allmodconfig
301313
ppc64le_allmodconfig:
302314
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/le.config \
303315
-f $(srctree)/Makefile allmodconfig
304316

305-
PHONY += ppc64le_allnoconfig
317+
generated_configs += ppc64le_allnoconfig
306318
ppc64le_allnoconfig:
307319
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/ppc64le.config \
308320
-f $(srctree)/Makefile allnoconfig
309321

310-
PHONY += ppc64_book3e_allmodconfig
322+
generated_configs += ppc64_book3e_allmodconfig
311323
ppc64_book3e_allmodconfig:
312324
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/85xx-64bit.config \
313325
-f $(srctree)/Makefile allmodconfig
314326

315-
PHONY += ppc32_randconfig
327+
generated_configs += ppc32_randconfig
316328
ppc32_randconfig:
317329
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/32-bit.config \
318330
-f $(srctree)/Makefile randconfig
319331

320-
PHONY += ppc64_randconfig
332+
generated_configs += ppc64_randconfig
321333
ppc64_randconfig:
322334
$(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/64-bit.config \
323335
-f $(srctree)/Makefile randconfig
324336

337+
PHONY += $(generated_configs)
338+
325339
define archhelp
326-
@echo '* zImage - Build default images selected by kernel config'
327-
@echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
328-
@echo ' uImage - U-Boot native image format'
329-
@echo ' cuImage.<dt> - Backwards compatible U-Boot image for older'
330-
@echo ' versions which do not support device trees'
331-
@echo ' dtbImage.<dt> - zImage with an embedded device tree blob'
332-
@echo ' simpleImage.<dt> - Firmware independent image.'
333-
@echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)'
334-
@echo ' install - Install kernel using'
335-
@echo ' (your) ~/bin/$(INSTALLKERNEL) or'
336-
@echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
337-
@echo ' install to $$(INSTALL_PATH) and run lilo'
338-
@echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
339-
@echo ''
340-
@echo ' Targets with <dt> embed a device tree blob inside the image'
341-
@echo ' These targets support board with firmware that does not'
342-
@echo ' support passing a device tree directly. Replace <dt> with the'
343-
@echo ' name of a dts file from the arch/$(ARCH)/boot/dts/ directory'
344-
@echo ' (minus the .dts extension).'
340+
echo '* zImage - Build default images selected by kernel config'
341+
echo ' zImage.* - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
342+
echo ' uImage - U-Boot native image format'
343+
echo ' cuImage.<dt> - Backwards compatible U-Boot image for older'
344+
echo ' versions which do not support device trees'
345+
echo ' dtbImage.<dt> - zImage with an embedded device tree blob'
346+
echo ' simpleImage.<dt> - Firmware independent image.'
347+
echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)'
348+
echo ' install - Install kernel using'
349+
echo ' (your) ~/bin/$(INSTALLKERNEL) or'
350+
echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
351+
echo ' install to $$(INSTALL_PATH) and run lilo'
352+
echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
353+
echo ''
354+
echo ' Targets with <dt> embed a device tree blob inside the image'
355+
echo ' These targets support board with firmware that does not'
356+
echo ' support passing a device tree directly. Replace <dt> with the'
357+
echo ' name of a dts file from the arch/$(ARCH)/boot/dts/ directory'
358+
echo ' (minus the .dts extension).'
359+
echo
360+
$(foreach cfg,$(generated_configs),
361+
printf " %-27s - Build for %s\\n" $(cfg) $(subst _defconfig,,$(cfg));)
345362
endef
346363

347364
PHONY += install

arch/powerpc/boot/Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ endif
3434

3535
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
3636
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
37+
$(call cc-option,-mno-prefixed) $(call cc-option,-mno-pcrel) \
38+
$(call cc-option,-mno-mma) \
3739
$(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \
3840
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
3941
$(LINUXINCLUDE)
4042

4143
ifdef CONFIG_PPC64_BOOT_WRAPPER
4244
BOOTCFLAGS += -m64
45+
ifdef CONFIG_PPC64_ELF_ABI_V2
46+
BOOTCFLAGS += $(call cc-option,-mabi=elfv2)
47+
endif
4348
else
4449
BOOTCFLAGS += -m32
4550
endif
@@ -61,9 +66,6 @@ BOOTCFLAGS += -mbig-endian
6166
else
6267
BOOTCFLAGS += -mlittle-endian
6368
endif
64-
ifdef CONFIG_PPC64_ELF_ABI_V2
65-
BOOTCFLAGS += $(call cc-option,-mabi=elfv2)
66-
endif
6769

6870
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc
6971

@@ -164,7 +166,7 @@ src-plat-$(CONFIG_PPC_MPC52xx) += cuboot-52xx.c
164166
src-plat-$(CONFIG_PPC_82xx) += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c
165167
src-plat-$(CONFIG_PPC_83xx) += cuboot-83xx.c fixed-head.S redboot-83xx.c
166168
src-plat-$(CONFIG_FSL_SOC_BOOKE) += cuboot-85xx.c cuboot-85xx-cpm2.c
167-
src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \
169+
src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c \
168170
gamecube-head.S gamecube.c \
169171
wii-head.S wii.c holly.c \
170172
fixed-head.S mvme5100.c
@@ -327,17 +329,12 @@ image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200b
327329
image-$(CONFIG_PPC_MEDIA5200) += cuImage.media5200
328330

329331
# Board ports in arch/powerpc/platform/82xx/Kconfig
330-
image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads
331-
image-$(CONFIG_PQ2FADS) += cuImage.pq2fads
332332
image-$(CONFIG_EP8248E) += dtbImage.ep8248e
333333

334334
# Board ports in arch/powerpc/platform/83xx/Kconfig
335-
image-$(CONFIG_MPC832x_MDS) += cuImage.mpc832x_mds
336335
image-$(CONFIG_MPC832x_RDB) += cuImage.mpc832x_rdb
337336
image-$(CONFIG_MPC834x_ITX) += cuImage.mpc8349emitx \
338337
cuImage.mpc8349emitxgp
339-
image-$(CONFIG_MPC834x_MDS) += cuImage.mpc834x_mds
340-
image-$(CONFIG_MPC836x_MDS) += cuImage.mpc836x_mds
341338
image-$(CONFIG_ASP834x) += dtbImage.asp834x-redboot
342339

343340
# Board ports in arch/powerpc/platform/85xx/Kconfig
@@ -361,7 +358,6 @@ image-$(CONFIG_MVME7100) += dtbImage.mvme7100
361358

362359
# Board ports in arch/powerpc/platform/embedded6xx/Kconfig
363360
image-$(CONFIG_STORCENTER) += cuImage.storcenter
364-
image-$(CONFIG_MPC7448HPC2) += cuImage.mpc7448hpc2
365361
image-$(CONFIG_GAMECUBE) += dtbImage.gamecube
366362
image-$(CONFIG_WII) += dtbImage.wii
367363
image-$(CONFIG_MVME5100) += dtbImage.mvme5100

arch/powerpc/boot/crt0.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ _zimage_start:
5151
_zimage_start_lib:
5252
/* Work out the offset between the address we were linked at
5353
and the address where we're running. */
54-
bl .+4
54+
bcl 20,31,.+4
5555
p_base: mflr r10 /* r10 now points to runtime addr of p_base */
5656
#ifndef __powerpc64__
5757
/* grab the link address of the dynamic section in r11 */
@@ -274,7 +274,7 @@ prom:
274274
mtsrr1 r10
275275

276276
/* Load FW address, set LR to label 1, and jump to FW */
277-
bl 0f
277+
bcl 20,31,0f
278278
0: mflr r10
279279
addi r11,r10,(1f-0b)
280280
mtlr r11

0 commit comments

Comments
 (0)