Skip to content

Commit 4899a36

Browse files
committed
Merge tag 'powerpc-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Remove our now never-true definitions for pgd_huge() and p4d_leaf(). - Add pte_needs_flush() and huge_pmd_needs_flush() for 64-bit. - Add support for syscall wrappers. - Add support for KFENCE on 64-bit. - Update 64-bit HV KVM to use the new guest state entry/exit accounting API. - Support execute-only memory when using the Radix MMU (P9 or later). - Implement CONFIG_PARAVIRT_TIME_ACCOUNTING for pseries guests. - Updates to our linker script to move more data into read-only sections. - Allow the VDSO to be randomised on 32-bit. - Many other small features and fixes. Thanks to Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Athira Rajeev, Christophe Leroy, David Hildenbrand, Disha Goel, Fabiano Rosas, Gaosheng Cui, Gustavo A. R. Silva, Haren Myneni, Hari Bathini, Jilin Yuan, Joel Stanley, Kajol Jain, Kees Cook, Krzysztof Kozlowski, Laurent Dufour, Liang He, Li Huafei, Lukas Bulwahn, Madhavan Srinivasan, Nathan Chancellor, Nathan Lynch, Nicholas Miehlbradt, Nicholas Piggin, Pali Rohár, Rohan McLure, Russell Currey, Sachin Sant, Segher Boessenkool, Shrikanth Hegde, Tyrel Datwyler, Wolfram Sang, ye xingchen, and Zheng Yongjun. * tag 'powerpc-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits) KVM: PPC: Book3S HV: Fix stack frame regs marker powerpc: Don't add __powerpc_ prefix to syscall entry points powerpc/64s/interrupt: Fix stack frame regs marker powerpc/64: Fix msr_check_and_set/clear MSR[EE] race powerpc/64s/interrupt: Change must-hard-mask interrupt check from BUG to WARN powerpc/pseries: Add firmware details to the hardware description powerpc/powernv: Add opal details to the hardware description powerpc: Add device-tree model to the hardware description powerpc/64: Add logical PVR to the hardware description powerpc: Add PVR & CPU name to hardware description powerpc: Add hardware description string powerpc/configs: Enable PPC_UV in powernv_defconfig powerpc/configs: Update config files for removed/renamed symbols powerpc/mm: Fix UBSAN warning reported on hugetlb powerpc/mm: Always update max/min_low_pfn in mem_topology_setup() powerpc/mm/book3s/hash: Rename flush_tlb_pmd_range powerpc: Drops STABS_DEBUG from linker scripts powerpc/64s: Remove lost/old comment powerpc/64s: Remove old STAB comment powerpc: remove orphan systbl_chk.sh ...
2 parents 03785a6 + 376b327 commit 4899a36

File tree

307 files changed

+4550
-3720
lines changed

Some content is hidden

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

307 files changed

+4550
-3720
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3629,7 +3629,7 @@
36293629
(bounds check bypass). With this option data leaks are
36303630
possible in the system.
36313631

3632-
nospectre_v2 [X86,PPC_FSL_BOOK3E,ARM64] Disable all mitigations for
3632+
nospectre_v2 [X86,PPC_E500,ARM64] Disable all mitigations for
36333633
the Spectre variant 2 (indirect branch prediction)
36343634
vulnerability. System may allow data leaks with this
36353635
option.
@@ -3748,9 +3748,9 @@
37483748
[X86,PV_OPS] Disable paravirtualized VMware scheduler
37493749
clock and use the default one.
37503750

3751-
no-steal-acc [X86,PV_OPS,ARM64] Disable paravirtualized steal time
3752-
accounting. steal time is computed, but won't
3753-
influence scheduler behaviour
3751+
no-steal-acc [X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
3752+
steal time accounting. steal time is computed, but
3753+
won't influence scheduler behaviour
37543754

37553755
nolapic [X86-32,APIC] Do not enable or use the local APIC.
37563756

Documentation/powerpc/isa-versions.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ CPU to ISA Version Mapping
44

55
Mapping of some CPU versions to relevant ISA versions.
66

7+
Note Power4 and Power4+ are not supported.
8+
79
========= ====================================================================
810
CPU Architecture version
911
========= ====================================================================
1012
Power10 Power ISA v3.1
1113
Power9 Power ISA v3.0B
1214
Power8 Power ISA v2.07
15+
e6500 Power ISA v2.06 with some exceptions
16+
e5500 Power ISA v2.06 with some exceptions, no Altivec
1317
Power7 Power ISA v2.06
1418
Power6 Power ISA v2.05
1519
PA6T Power ISA v2.04
@@ -24,6 +28,12 @@ PPC970 - PowerPC User Instruction Set Architecture Book I v2.01
2428
- PowerPC Virtual Environment Architecture Book II v2.01
2529
- PowerPC Operating Environment Architecture Book III v2.01
2630
- Plus Altivec/VMX ~= 2.03
31+
Power4+ - PowerPC User Instruction Set Architecture Book I v2.01
32+
- PowerPC Virtual Environment Architecture Book II v2.01
33+
- PowerPC Operating Environment Architecture Book III v2.01
34+
Power4 - PowerPC User Instruction Set Architecture Book I v2.00
35+
- PowerPC Virtual Environment Architecture Book II v2.00
36+
- PowerPC Operating Environment Architecture Book III v2.00
2737
========= ====================================================================
2838

2939

@@ -36,6 +46,8 @@ CPU VMX (aka. Altivec)
3646
Power10 Yes
3747
Power9 Yes
3848
Power8 Yes
49+
e6500 Yes
50+
e5500 No
3951
Power7 Yes
4052
Power6 Yes
4153
PA6T Yes
@@ -44,6 +56,8 @@ Power5++ No
4456
Power5+ No
4557
Power5 No
4658
PPC970 Yes
59+
Power4+ No
60+
Power4 No
4761
========== ==================
4862

4963
========== ====
@@ -52,6 +66,8 @@ CPU VSX
5266
Power10 Yes
5367
Power9 Yes
5468
Power8 Yes
69+
e6500 No
70+
e5500 No
5571
Power7 Yes
5672
Power6 No
5773
PA6T No
@@ -60,6 +76,8 @@ Power5++ No
6076
Power5+ No
6177
Power5 No
6278
PPC970 No
79+
Power4+ No
80+
Power4 No
6381
========== ====
6482

6583
========== ====================================
@@ -68,6 +86,8 @@ CPU Transactional Memory
6886
Power10 No (* see Power ISA v3.1, "Appendix A. Notes on the Removal of Transactional Memory from the Architecture")
6987
Power9 Yes (* see transactional_memory.txt)
7088
Power8 Yes
89+
e6500 No
90+
e5500 No
7191
Power7 No
7292
Power6 No
7393
PA6T No
@@ -76,4 +96,6 @@ Power5++ No
7696
Power5+ No
7797
Power5 No
7898
PPC970 No
99+
Power4+ No
100+
Power4 No
79101
========== ====================================

arch/powerpc/Kconfig

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ config PPC
135135
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
136136
select ARCH_HAS_SET_MEMORY
137137
select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
138-
select ARCH_HAS_STRICT_KERNEL_RWX if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
138+
select ARCH_HAS_STRICT_KERNEL_RWX if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
139139
select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX
140+
select ARCH_HAS_SYSCALL_WRAPPER if !SPU_BASE && !COMPAT
140141
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
141142
select ARCH_HAS_UACCESS_FLUSHCACHE
142143
select ARCH_HAS_UBSAN_SANITIZE_ALL
@@ -194,7 +195,7 @@ config PPC
194195
select HAVE_ARCH_KASAN if PPC_RADIX_MMU
195196
select HAVE_ARCH_KASAN if PPC_BOOK3E_64
196197
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
197-
select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || 40x
198+
select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
198199
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
199200
select HAVE_ARCH_KGDB
200201
select HAVE_ARCH_MMAP_RND_BITS
@@ -211,7 +212,7 @@ config PPC
211212
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if MPROFILE_KERNEL || PPC32
212213
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL || PPC32
213214
select HAVE_EBPF_JIT
214-
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
215+
select HAVE_EFFICIENT_UNALIGNED_ACCESS
215216
select HAVE_FAST_GUP
216217
select HAVE_FTRACE_MCOUNT_RECORD
217218
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
@@ -290,7 +291,7 @@ config PPC_LONG_DOUBLE_128
290291
config PPC_BARRIER_NOSPEC
291292
bool
292293
default y
293-
depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
294+
depends on PPC_BOOK3S_64 || PPC_E500
294295

295296
config EARLY_PRINTK
296297
bool
@@ -548,7 +549,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE
548549

549550
config KEXEC
550551
bool "kexec system call"
551-
depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
552+
depends on PPC_BOOK3S || PPC_E500 || (44x && !SMP)
552553
select KEXEC_CORE
553554
help
554555
kexec is a system call that implements the ability to shutdown your
@@ -583,7 +584,7 @@ config ARCH_HAS_KEXEC_PURGATORY
583584

584585
config RELOCATABLE
585586
bool "Build a relocatable kernel"
586-
depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
587+
depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
587588
select NONSTATIC_KERNEL
588589
help
589590
This builds a kernel image that is capable of running at the
@@ -606,7 +607,7 @@ config RELOCATABLE
606607

607608
config RANDOMIZE_BASE
608609
bool "Randomize the address of the kernel image"
609-
depends on (FSL_BOOKE && FLATMEM && PPC32)
610+
depends on PPC_85xx && FLATMEM
610611
depends on RELOCATABLE
611612
help
612613
Randomizes the virtual address at which the kernel image is
@@ -625,8 +626,8 @@ config RELOCATABLE_TEST
625626

626627
config CRASH_DUMP
627628
bool "Build a dump capture kernel"
628-
depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
629-
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
629+
depends on PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
630+
select RELOCATABLE if PPC64 || 44x || PPC_85xx
630631
help
631632
Build a kernel suitable for use as a dump capture kernel.
632633
The same kernel binary can be used as production kernel and dump
@@ -815,7 +816,7 @@ config DATA_SHIFT_BOOL
815816
depends on ADVANCED_OPTIONS
816817
depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
817818
depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
818-
FSL_BOOKE
819+
PPC_85xx
819820
help
820821
This option allows you to set the kernel data alignment. When
821822
RAM is mapped by blocks, the alignment needs to fit the size and
@@ -828,13 +829,13 @@ config DATA_SHIFT
828829
default 24 if STRICT_KERNEL_RWX && PPC64
829830
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
830831
range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
831-
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
832+
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
832833
default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
833834
default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
834835
default 23 if STRICT_KERNEL_RWX && PPC_8xx
835836
default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
836837
default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
837-
default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
838+
default 24 if STRICT_KERNEL_RWX && PPC_85xx
838839
default PPC_PAGE_SHIFT
839840
help
840841
On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
@@ -1150,7 +1151,7 @@ config LOWMEM_SIZE
11501151

11511152
config LOWMEM_CAM_NUM_BOOL
11521153
bool "Set number of CAMs to use to map low memory"
1153-
depends on ADVANCED_OPTIONS && FSL_BOOKE
1154+
depends on ADVANCED_OPTIONS && PPC_85xx
11541155
help
11551156
This option allows you to set the maximum number of CAM slots that
11561157
will be used to map low memory. There are a limited number of slots
@@ -1161,7 +1162,7 @@ config LOWMEM_CAM_NUM_BOOL
11611162
Say N here unless you know what you are doing.
11621163

11631164
config LOWMEM_CAM_NUM
1164-
depends on FSL_BOOKE
1165+
depends on PPC_85xx
11651166
int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
11661167
default 3 if !STRICT_KERNEL_RWX
11671168
default 9 if DATA_SHIFT >= 24
@@ -1170,7 +1171,7 @@ config LOWMEM_CAM_NUM
11701171

11711172
config DYNAMIC_MEMSTART
11721173
bool "Enable page aligned dynamic load address for kernel"
1173-
depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
1174+
depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
11741175
select NONSTATIC_KERNEL
11751176
help
11761177
This option enables the kernel to be loaded at any page aligned
@@ -1219,7 +1220,7 @@ config KERNEL_START
12191220

12201221
config PHYSICAL_START_BOOL
12211222
bool "Set physical address where the kernel is loaded"
1222-
depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
1223+
depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
12231224
help
12241225
This gives the physical address where the kernel is loaded.
12251226

@@ -1232,7 +1233,7 @@ config PHYSICAL_START
12321233

12331234
config PHYSICAL_ALIGN
12341235
hex
1235-
default "0x04000000" if FSL_BOOKE
1236+
default "0x04000000" if PPC_85xx
12361237
help
12371238
This value puts the alignment restrictions on physical address
12381239
where kernel is loaded and run from. Kernel is compiled for an

arch/powerpc/Kconfig.debug

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ config PPC_EARLY_DEBUG_MEMCONS
283283
This console provides input and output buffers stored within the
284284
kernel BSS and should be safe to select on any system. A debugger
285285
can then be used to read kernel output or send input to the console.
286+
287+
config PPC_EARLY_DEBUG_16550
288+
bool "Serial 16550"
289+
depends on PPC_UDBG_16550
290+
help
291+
Select this to enable early debugging via Serial 16550 console
286292
endchoice
287293

288294
config PPC_MEMCONS_OUTPUT_SIZE
@@ -354,6 +360,15 @@ config PPC_EARLY_DEBUG_CPM_ADDR
354360
platform probing is done, all platforms selected must
355361
share the same address.
356362

363+
config PPC_EARLY_DEBUG_16550_PHYSADDR
364+
hex "Early debug Serial 16550 physical address"
365+
depends on PPC_EARLY_DEBUG_16550
366+
367+
config PPC_EARLY_DEBUG_16550_STRIDE
368+
int "Early debug Serial 16550 stride"
369+
depends on PPC_EARLY_DEBUG_16550
370+
default 1
371+
357372
config FAIL_IOMMU
358373
bool "Fault-injection capability for IOMMU"
359374
depends on FAULT_INJECTION

arch/powerpc/Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,12 @@ CFLAGS-$(CONFIG_PPC32) += $(call cc-option,-mno-readonly-in-sdata)
149149
ifdef CONFIG_PPC_BOOK3S_64
150150
ifdef CONFIG_CPU_LITTLE_ENDIAN
151151
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power8
152-
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power9,-mtune=power8)
153152
else
154-
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power7,$(call cc-option,-mtune=power5))
155-
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mcpu=power5,-mcpu=power4)
153+
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=power4
156154
endif
155+
CFLAGS-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=power10, \
156+
$(call cc-option,-mtune=power9, \
157+
$(call cc-option,-mtune=power8)))
157158
else ifdef CONFIG_PPC_BOOK3E_64
158159
CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
159160
endif
@@ -191,9 +192,14 @@ ifdef CONFIG_476FPE_ERR46
191192
-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
192193
endif
193194

194-
# No AltiVec or VSX instructions when building kernel
195+
# No prefix or pcrel
196+
KBUILD_CFLAGS += $(call cc-option,-mno-prefixed)
197+
KBUILD_CFLAGS += $(call cc-option,-mno-pcrel)
198+
199+
# No AltiVec or VSX or MMA instructions when building kernel
195200
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
196201
KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
202+
KBUILD_CFLAGS += $(call cc-option,-mno-mma)
197203

198204
# No SPE instruction when building kernel
199205
# (We use all available options to help semi-broken compilers)
@@ -210,7 +216,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-string)
210216
cpu-as-$(CONFIG_40x) += -Wa,-m405
211217
cpu-as-$(CONFIG_44x) += -Wa,-m440
212218
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
213-
cpu-as-$(CONFIG_E500) += -Wa,-me500
219+
cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500
214220

215221
# When using '-many -mpower4' gas will first try and find a matching power4
216222
# mnemonic and failing that it will allow any valid mnemonic that GAS knows
@@ -231,7 +237,7 @@ head-$(CONFIG_PPC_BOOK3S_32) := arch/powerpc/kernel/head_book3s_32.o
231237
head-$(CONFIG_PPC_8xx) := arch/powerpc/kernel/head_8xx.o
232238
head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
233239
head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o
234-
head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o
240+
head-$(CONFIG_PPC_85xx) := arch/powerpc/kernel/head_85xx.o
235241

236242
head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
237243
head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o

arch/powerpc/boot/44x.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* PowerPC 44x related functions
34
*
45
* Copyright 2007 David Gibson, IBM Corporation.
5-
*
6-
* This file is licensed under the terms of the GNU General Public
7-
* License version 2. This program is licensed "as is" without any
8-
* warranty of any kind, whether express or implied.
96
*/
107
#ifndef _PPC_BOOT_44X_H_
118
#define _PPC_BOOT_44X_H_

arch/powerpc/boot/4xx.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
12
/*
23
* PowerPC 4xx related functions
34
*
45
* Copyright 2007 IBM Corporation.
56
* Josh Boyer <[email protected]>
6-
*
7-
* This file is licensed under the terms of the GNU General Public
8-
* License version 2. This program is licensed "as is" without any
9-
* warranty of any kind, whether express or implied.
107
*/
118
#ifndef _POWERPC_BOOT_4XX_H_
129
#define _POWERPC_BOOT_4XX_H_

arch/powerpc/boot/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ 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-spe) $(call cc-option,-mspe=no) \
3738
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
3839
$(LINUXINCLUDE)
3940

0 commit comments

Comments
 (0)