Skip to content

Commit c70a4be

Browse files
committed
Merge tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Enable KFENCE for 32-bit. - Implement EBPF for 32-bit. - Convert 32-bit to do interrupt entry/exit in C. - Convert 64-bit BookE to do interrupt entry/exit in C. - Changes to our signal handling code to use user_access_begin/end() more extensively. - Add support for time namespaces (CONFIG_TIME_NS) - A series of fixes that allow us to reenable STRICT_KERNEL_RWX. - Other smaller features, fixes & cleanups. Thanks to Alexey Kardashevskiy, Andreas Schwab, Andrew Donnellan, Aneesh Kumar K.V, Athira Rajeev, Bhaskar Chowdhury, Bixuan Cui, Cédric Le Goater, Chen Huang, Chris Packham, Christophe Leroy, Christopher M. Riedl, Colin Ian King, Dan Carpenter, Daniel Axtens, Daniel Henrique Barboza, David Gibson, Davidlohr Bueso, Denis Efremov, dingsenjie, Dmitry Safonov, Dominic DeMarco, Fabiano Rosas, Ganesh Goudar, Geert Uytterhoeven, Geetika Moolchandani, Greg Kurz, Guenter Roeck, Haren Myneni, He Ying, Jiapeng Chong, Jordan Niethe, Laurent Dufour, Lee Jones, Leonardo Bras, Li Huafei, Madhavan Srinivasan, Mahesh Salgaonkar, Masahiro Yamada, Nathan Chancellor, Nathan Lynch, Nicholas Piggin, Oliver O'Halloran, Paul Menzel, Pu Lehui, Randy Dunlap, Ravi Bangoria, Rosen Penev, Russell Currey, Santosh Sivaraj, Sebastian Andrzej Siewior, Segher Boessenkool, Shivaprasad G Bhat, Srikar Dronamraju, Stephen Rothwell, Thadeu Lima de Souza Cascardo, Thomas Gleixner, Tony Ambardar, Tyrel Datwyler, Vaibhav Jain, Vincenzo Frascino, Xiongwei Song, Yang Li, Yu Kuai, and Zhang Yunkai. * tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (302 commits) powerpc/signal32: Fix erroneous SIGSEGV on RT signal return powerpc: Avoid clang uninitialized warning in __get_user_size_allowed powerpc/papr_scm: Mark nvdimm as unarmed if needed during probe powerpc/kvm: Fix build error when PPC_MEM_KEYS/PPC_PSERIES=n powerpc/kasan: Fix shadow start address with modules powerpc/kernel/iommu: Use largepool as a last resort when !largealloc powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs powerpc/44x: fix spelling mistake in Kconfig "varients" -> "variants" powerpc/iommu: Annotate nested lock for lockdep powerpc/iommu: Do not immediately panic when failed IOMMU table allocation powerpc/iommu: Allocate it_map by vmalloc selftests/powerpc: remove unneeded semicolon powerpc/64s: remove unneeded semicolon powerpc/eeh: remove unneeded semicolon powerpc/selftests: Add selftest to test concurrent perf/ptrace events powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR powerpc/selftests/perf-hwbreak: Coalesce event creation code powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR powerpc/configs: Add IBMVNIC to some 64-bit configs selftests/powerpc: Add uaccess flush test ...
2 parents 437d1a5 + 5256426 commit c70a4be

File tree

234 files changed

+6868
-5596
lines changed

Some content is hidden

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

234 files changed

+6868
-5596
lines changed

Documentation/admin-guide/sysctl/net.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ two flavors of JITs, the newer eBPF JIT currently supported on:
6464
- arm64
6565
- arm32
6666
- ppc64
67+
- ppc32
6768
- sparc64
6869
- mips64
6970
- s390x
@@ -73,7 +74,6 @@ two flavors of JITs, the newer eBPF JIT currently supported on:
7374
And the older cBPF JIT supported on the following archs:
7475

7576
- mips
76-
- ppc
7777
- sparc
7878

7979
eBPF JITs are a superset of cBPF JITs, meaning the kernel will

Documentation/features/debug/debug-vm-pgtable/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
| nios2: | TODO |
2222
| openrisc: | TODO |
2323
| parisc: | TODO |
24-
| powerpc: | TODO |
24+
| powerpc: | ok |
2525
| riscv: | ok |
2626
| s390: | ok |
2727
| sh: | TODO |

Documentation/powerpc/papr_hcalls.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,20 @@ Health Bitmap Flags:
275275
Given a DRC Index collect the performance statistics for NVDIMM and copy them
276276
to the resultBuffer.
277277

278+
**H_SCM_FLUSH**
279+
280+
| Input: *drcIndex, continue-token*
281+
| Out: *continue-token*
282+
| Return Value: *H_SUCCESS, H_Parameter, H_P2, H_BUSY*
283+
284+
Given a DRC Index Flush the data to backend NVDIMM device.
285+
286+
The hcall returns H_BUSY when the flush takes longer time and the hcall needs
287+
to be issued multiple times in order to be completely serviced. The
288+
*continue-token* from the output to be passed in the argument list of
289+
subsequent hcalls to the hypervisor until the hcall is completely serviced
290+
at which point H_SUCCESS or other error is returned by the hypervisor.
291+
278292
References
279293
==========
280294
.. [1] "Power Architecture Platform Reference"

Documentation/powerpc/vas-api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ using this window. the signal will be issued to the thread group leader
254254
signals.
255255

256256
NX-GZIP User's Manual:
257-
https://github.com/libnxz/power-gzip/blob/master/power_nx_gzip_um.pdf
257+
https://github.com/libnxz/power-gzip/blob/master/doc/power_nx_gzip_um.pdf
258258

259259
Simple example
260260
==============
@@ -301,5 +301,5 @@ Simple example
301301
close(fd) or window can be closed upon process exit
302302
}
303303

304-
Refer https://github.com/abalib/power-gzip for tests or more
304+
Refer https://github.com/libnxz/power-gzip for tests or more
305305
use cases.

arch/arm64/include/asm/vdso/compat_gettimeofday.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
155155
}
156156

157157
#ifdef CONFIG_TIME_NS
158-
static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void)
158+
static __always_inline
159+
const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd)
159160
{
160161
const struct vdso_data *ret;
161162

arch/arm64/include/asm/vdso/gettimeofday.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const struct vdso_data *__arch_get_vdso_data(void)
9696

9797
#ifdef CONFIG_TIME_NS
9898
static __always_inline
99-
const struct vdso_data *__arch_get_timens_vdso_data(void)
99+
const struct vdso_data *__arch_get_timens_vdso_data(const struct vdso_data *vd)
100100
{
101101
return _timens_data;
102102
}

arch/powerpc/Kconfig

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ config PPC
119119
#
120120
select ARCH_32BIT_OFF_T if PPC32
121121
select ARCH_HAS_DEBUG_VIRTUAL
122+
select ARCH_HAS_DEBUG_VM_PGTABLE
122123
select ARCH_HAS_DEVMEM_IS_ALLOWED
123124
select ARCH_HAS_ELF_RANDOMIZE
124125
select ARCH_HAS_FORTIFY_SOURCE
@@ -135,7 +136,7 @@ config PPC
135136
select ARCH_HAS_MEMBARRIER_CALLBACKS
136137
select ARCH_HAS_MEMBARRIER_SYNC_CORE
137138
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
138-
select ARCH_HAS_STRICT_KERNEL_RWX if (PPC32 && !HIBERNATION)
139+
select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !HIBERNATION)
139140
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
140141
select ARCH_HAS_UACCESS_FLUSHCACHE
141142
select ARCH_HAS_COPY_MC if PPC64
@@ -145,6 +146,7 @@ config PPC
145146
select ARCH_MIGHT_HAVE_PC_PARPORT
146147
select ARCH_MIGHT_HAVE_PC_SERIO
147148
select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
149+
select ARCH_STACKWALK
148150
select ARCH_SUPPORTS_ATOMIC_RMW
149151
select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC32 || PPC_BOOK3S_64
150152
select ARCH_USE_BUILTIN_BSWAP
@@ -171,36 +173,38 @@ config PPC
171173
select GENERIC_CPU_AUTOPROBE
172174
select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
173175
select GENERIC_EARLY_IOREMAP
176+
select GENERIC_GETTIMEOFDAY
174177
select GENERIC_IRQ_SHOW
175178
select GENERIC_IRQ_SHOW_LEVEL
176179
select GENERIC_PCI_IOMAP if PCI
177180
select GENERIC_SMP_IDLE_THREAD
178181
select GENERIC_STRNCPY_FROM_USER
179182
select GENERIC_STRNLEN_USER
180183
select GENERIC_TIME_VSYSCALL
181-
select GENERIC_GETTIMEOFDAY
184+
select GENERIC_VDSO_TIME_NS
182185
select HAVE_ARCH_AUDITSYSCALL
183186
select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
184187
select HAVE_ARCH_JUMP_LABEL
188+
select HAVE_ARCH_JUMP_LABEL_RELATIVE
185189
select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
186190
select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
187191
select HAVE_ARCH_KGDB
192+
select HAVE_ARCH_KFENCE if PPC32
188193
select HAVE_ARCH_MMAP_RND_BITS
189194
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
190195
select HAVE_ARCH_NVRAM_OPS
191196
select HAVE_ARCH_SECCOMP_FILTER
192197
select HAVE_ARCH_TRACEHOOK
193198
select HAVE_ASM_MODVERSIONS
194199
select HAVE_C_RECORDMCOUNT
195-
select HAVE_CBPF_JIT if !PPC64
196200
select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
197201
select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
198202
select HAVE_CONTEXT_TRACKING if PPC64
199203
select HAVE_DEBUG_KMEMLEAK
200204
select HAVE_DEBUG_STACKOVERFLOW
201205
select HAVE_DYNAMIC_FTRACE
202206
select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
203-
select HAVE_EBPF_JIT if PPC64
207+
select HAVE_EBPF_JIT
204208
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
205209
select HAVE_FAST_GUP
206210
select HAVE_FTRACE_MCOUNT_RECORD
@@ -224,8 +228,8 @@ config PPC
224228
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
225229
select HAVE_MOD_ARCH_SPECIFIC
226230
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
227-
select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
228-
select HAVE_OPTPROBES if PPC64
231+
select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC64 && PPC_BOOK3S && SMP
232+
select HAVE_OPTPROBES
229233
select HAVE_PERF_EVENTS
230234
select HAVE_PERF_EVENTS_NMI if PPC64
231235
select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
@@ -234,7 +238,7 @@ config PPC
234238
select MMU_GATHER_RCU_TABLE_FREE
235239
select MMU_GATHER_PAGE_SIZE
236240
select HAVE_REGS_AND_STACK_ACCESS_API
237-
select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
241+
select HAVE_RELIABLE_STACKTRACE
238242
select HAVE_SOFTIRQ_ON_OWN_STACK
239243
select HAVE_SYSCALL_TRACEPOINTS
240244
select HAVE_VIRT_CPU_ACCOUNTING
@@ -786,7 +790,7 @@ config THREAD_SHIFT
786790
config DATA_SHIFT_BOOL
787791
bool "Set custom data alignment"
788792
depends on ADVANCED_OPTIONS
789-
depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC
793+
depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
790794
depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX)
791795
help
792796
This option allows you to set the kernel data alignment. When
@@ -798,13 +802,13 @@ config DATA_SHIFT_BOOL
798802
config DATA_SHIFT
799803
int "Data shift" if DATA_SHIFT_BOOL
800804
default 24 if STRICT_KERNEL_RWX && PPC64
801-
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC) && PPC_BOOK3S_32
802-
range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC) && PPC_8xx
805+
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
806+
range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
803807
default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
804-
default 18 if DEBUG_PAGEALLOC && PPC_BOOK3S_32
808+
default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
805809
default 23 if STRICT_KERNEL_RWX && PPC_8xx
806-
default 23 if DEBUG_PAGEALLOC && PPC_8xx && PIN_TLB_DATA
807-
default 19 if DEBUG_PAGEALLOC && PPC_8xx
810+
default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
811+
default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
808812
default PPC_PAGE_SHIFT
809813
help
810814
On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
@@ -1217,7 +1221,7 @@ config TASK_SIZE_BOOL
12171221
config TASK_SIZE
12181222
hex "Size of user task space" if TASK_SIZE_BOOL
12191223
default "0x80000000" if PPC_8xx
1220-
default "0xb0000000" if PPC_BOOK3S_32 && STRICT_KERNEL_RWX
1224+
default "0xb0000000" if PPC_BOOK3S_32
12211225
default "0xc0000000"
12221226
endmenu
12231227

arch/powerpc/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
353353
config FAIL_IOMMU
354354
bool "Fault-injection capability for IOMMU"
355355
depends on FAULT_INJECTION
356+
depends on PCI || IBMVIO
356357
help
357358
Provide fault-injection capability for IOMMU. Each device can
358359
be selectively enabled via the fail_iommu property.

arch/powerpc/Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ CC_FLAGS_FTRACE := -pg
181181
ifdef CONFIG_MPROFILE_KERNEL
182182
CC_FLAGS_FTRACE += -mprofile-kernel
183183
endif
184-
# Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
185-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199
186-
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
187-
ifndef CONFIG_CC_IS_CLANG
188-
CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog)
189-
endif
190184
endif
191185

192186
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
@@ -444,12 +438,15 @@ endif
444438
endif
445439

446440
ifdef CONFIG_SMP
441+
ifdef CONFIG_PPC32
447442
prepare: task_cpu_prepare
448443

449444
PHONY += task_cpu_prepare
450445
task_cpu_prepare: prepare0
451446
$(eval KBUILD_CFLAGS += -D_TASK_CPU=$(shell awk '{if ($$2 == "TASK_CPU") print $$3;}' include/generated/asm-offsets.h))
452-
endif
447+
448+
endif # CONFIG_PPC32
449+
endif # CONFIG_SMP
453450

454451
PHONY += checkbin
455452
# Check toolchain versions:

arch/powerpc/configs/ppc64_defconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ CONFIG_PPC_TRANSACTIONAL_MEM=y
5050
CONFIG_KEXEC=y
5151
CONFIG_KEXEC_FILE=y
5252
CONFIG_CRASH_DUMP=y
53+
CONFIG_FA_DUMP=y
5354
CONFIG_IRQ_ALL_CPUS=y
5455
CONFIG_PPC_64K_PAGES=y
5556
CONFIG_SCHED_SMT=y
@@ -177,6 +178,7 @@ CONFIG_CHELSIO_T1=m
177178
CONFIG_BE2NET=m
178179
CONFIG_IBMVETH=m
179180
CONFIG_EHEA=m
181+
CONFIG_IBMVNIC=m
180182
CONFIG_E100=y
181183
CONFIG_E1000=y
182184
CONFIG_E1000E=y

0 commit comments

Comments
 (0)