Skip to content

Commit 25d8d4e

Browse files
committed
Merge tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Add support for (optionally) using queued spinlocks & rwlocks. - Support for a new faster system call ABI using the scv instruction on Power9 or later. - Drop support for the PROT_SAO mmap/mprotect flag as it will be unsupported on Power10 and future processors, leaving us with no way to implement the functionality it requests. This risks breaking userspace, though we believe it is unused in practice. - A bug fix for, and then the removal of, our custom stack expansion checking. We now allow stack expansion up to the rlimit, like other architectures. - Remove the remnants of our (previously disabled) topology update code, which tried to react to NUMA layout changes on virtualised systems, but was prone to crashes and other problems. - Add PMU support for Power10 CPUs. - A change to our signal trampoline so that we don't unbalance the link stack (branch return predictor) in the signal delivery path. - Lots of other cleanups, refactorings, smaller features and so on as usual. Thanks to: Abhishek Goel, Alastair D'Silva, Alexander A. Klimov, Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Balamuruhan S, Bharata B Rao, Bill Wendling, Bin Meng, Cédric Le Goater, Chris Packham, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Dan Williams, David Lamparter, Desnes A. Nunes do Rosario, Erhard F., Finn Thain, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geoff Levand, Greg Kurz, Gustavo A. R. Silva, Hari Bathini, Harish, Imre Kaloz, Joel Stanley, Joe Perches, John Crispin, Jordan Niethe, Kajol Jain, Kamalesh Babulal, Kees Cook, Laurent Dufour, Leonardo Bras, Li RongQing, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Michal Suchanek, Milton Miller, Mimi Zohar, Murilo Opsfelder Araujo, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Oliver O'Halloran, Palmer Dabbelt, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud, Pingfan Liu, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Randy Dunlap, Ravi Bangoria, Sachin Sant, Sam Bobroff, Sandipan Das, Santosh Sivaraj, Satheesh Rajendran, Shirisha Ganta, Sourabh Jain, Srikar Dronamraju, Stan Johnson, Stephen Rothwell, Thadeu Lima de Souza Cascardo, Thiago Jung Bauermann, Tom Lane, Vaibhav Jain, Vladis Dronov, Wei Yongjun, Wen Xiong, YueHaibing. * tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (337 commits) selftests/powerpc: Fix pkey syscall redefinitions powerpc: Fix circular dependency between percpu.h and mmu.h powerpc/powernv/sriov: Fix use of uninitialised variable selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs powerpc/40x: Fix assembler warning about r0 powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric powerpc/papr_scm: Fetch nvdimm performance stats from PHYP cpuidle: pseries: Fixup exit latency for CEDE(0) cpuidle: pseries: Add function to parse extended CEDE records cpuidle: pseries: Set the latency-hint before entering CEDE selftests/powerpc: Fix online CPU selection powerpc/perf: Consolidate perf_callchain_user_[64|32]() powerpc/pseries/hotplug-cpu: Remove double free in error path powerpc/pseries/mobility: Add pr_debug() for device tree changes powerpc/pseries/mobility: Set pr_fmt() powerpc/cacheinfo: Warn if cache object chain becomes unordered powerpc/cacheinfo: Improve diagnostics about malformed cache lists powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages powerpc/cacheinfo: Set pr_fmt() powerpc: fix function annotations to avoid section mismatch warnings with gcc-10 ...
2 parents 60e76bb + a7aaa2f commit 25d8d4e

File tree

391 files changed

+11048
-5674
lines changed

Some content is hidden

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

391 files changed

+11048
-5674
lines changed

Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_24x7

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ Description: read only
4343
This sysfs interface exposes the number of cores per chip
4444
present in the system.
4545

46+
What: /sys/devices/hv_24x7/interface/cpumask
47+
Date: July 2020
48+
Contact: Linux on PowerPC Developer List <[email protected]>
49+
Description: read only
50+
This sysfs file exposes the cpumask which is designated to make
51+
HCALLs to retrieve hv-24x7 pmu event counter data.
52+
4653
What: /sys/bus/event_source/devices/hv_24x7/event_descs/<event-name>
4754
Date: February 2014
4855
Contact: Linux on PowerPC Developer List <[email protected]>

Documentation/ABI/testing/sysfs-bus-papr-pmem

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,30 @@ Description:
2525
NVDIMM have been scrubbed.
2626
* "locked" : Indicating that NVDIMM contents cant
2727
be modified until next power cycle.
28+
29+
What: /sys/bus/nd/devices/nmemX/papr/perf_stats
30+
Date: May, 2020
31+
KernelVersion: v5.9
32+
Contact: linuxppc-dev <[email protected]>, [email protected],
33+
Description:
34+
(RO) Report various performance stats related to papr-scm NVDIMM
35+
device. Each stat is reported on a new line with each line
36+
composed of a stat-identifier followed by it value. Below are
37+
currently known dimm performance stats which are reported:
38+
39+
* "CtlResCt" : Controller Reset Count
40+
* "CtlResTm" : Controller Reset Elapsed Time
41+
* "PonSecs " : Power-on Seconds
42+
* "MemLife " : Life Remaining
43+
* "CritRscU" : Critical Resource Utilization
44+
* "HostLCnt" : Host Load Count
45+
* "HostSCnt" : Host Store Count
46+
* "HostSDur" : Host Store Duration
47+
* "HostLDur" : Host Load Duration
48+
* "MedRCnt " : Media Read Count
49+
* "MedWCnt " : Media Write Count
50+
* "MedRDur " : Media Read Duration
51+
* "MedWDur " : Media Write Duration
52+
* "CchRHCnt" : Cache Read Hit Count
53+
* "CchWHCnt" : Cache Write Hit Count
54+
* "FastWCnt" : Fast Write Count

Documentation/ABI/testing/sysfs-class-ocxl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,14 @@ Date: January 2018
3333
3434
Description: read/write
3535
Give access the global mmio area for the AFU
36+
37+
What: /sys/class/ocxl/<afu name>/reload_on_reset
38+
Date: February 2020
39+
40+
Description: read/write
41+
Control whether the FPGA is reloaded on a link reset. Enabled
42+
through a vendor-specific logic block on the FPGA.
43+
0 Do not reload FPGA image from flash
44+
1 Reload FPGA image from flash
45+
unavailable
46+
The device does not support this capability

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,10 @@
916916
disable_radix [PPC]
917917
Disable RADIX MMU mode on POWER9
918918

919+
radix_hcall_invalidate=on [PPC/PSERIES]
920+
Disable RADIX GTSE feature and use hcall for TLB
921+
invalidate.
922+
919923
disable_tlbie [PPC]
920924
Disable TLBIE instruction. Currently does not work
921925
with KVM, with HASH MMU, or with coherent accelerators.

Documentation/core-api/cpu_hotplug.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ Command Line Switches
5050

5151
This option is limited to the X86 and S390 architecture.
5252

53-
``cede_offline={"off","on"}``
54-
Use this option to disable/enable putting offlined processors to an extended
55-
``H_CEDE`` state on supported pseries platforms. If nothing is specified,
56-
``cede_offline`` is set to "on".
57-
58-
This option is limited to the PowerPC architecture.
59-
6053
``cpu0_hotplug``
6154
Allow to shutdown CPU0.
6255

Documentation/features/sched/membarrier-sync-core/arch-support.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Architecture requirements
77
#
8-
# * arm/arm64
8+
# * arm/arm64/powerpc
99
#
1010
# Rely on implicit context synchronization as a result of exception return
1111
# when returning from IPI handler, and when returning to user-space.
@@ -45,7 +45,7 @@
4545
| nios2: | TODO |
4646
| openrisc: | TODO |
4747
| parisc: | TODO |
48-
| powerpc: | TODO |
48+
| powerpc: | ok |
4949
| riscv: | TODO |
5050
| s390: | TODO |
5151
| sh: | TODO |

Documentation/memory-barriers.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,20 @@ There are some more advanced barrier functions:
19351935
relaxed I/O accessors and the Documentation/DMA-API.txt file for more
19361936
information on consistent memory.
19371937

1938+
(*) pmem_wmb();
1939+
1940+
This is for use with persistent memory to ensure that stores for which
1941+
modifications are written to persistent storage reached a platform
1942+
durability domain.
1943+
1944+
For example, after a non-temporal write to pmem region, we use pmem_wmb()
1945+
to ensure that stores have reached a platform durability domain. This ensures
1946+
that stores have updated persistent storage before any data access or
1947+
data transfer caused by subsequent instructions is initiated. This is
1948+
in addition to the ordering done by wmb().
1949+
1950+
For load from persistent memory, existing read memory barriers are sufficient
1951+
to ensure read ordering.
19381952

19391953
===============================
19401954
IMPLICIT KERNEL MEMORY BARRIERS

Documentation/powerpc/cpu_families.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ and are supported by arch/powerpc.
99
Book3S (aka sPAPR)
1010
------------------
1111

12-
- Hash MMU
12+
- Hash MMU (except 603 and e300)
13+
- Software loaded TLB (603 and e300)
14+
- Selectable Software loaded TLB in addition to hash MMU (755, 7450, e600)
1315
- Mix of 32 & 64 bit::
1416

1517
+--------------+ +----------------+
@@ -24,9 +26,9 @@ Book3S (aka sPAPR)
2426
| |
2527
| |
2628
v v
27-
+--------------+ +----------------+ +-------+
28-
| 604 | | 750 (G3) | ---> | 750CX |
29-
+--------------+ +----------------+ +-------+
29+
+--------------+ +-----+ +----------------+ +-------+
30+
| 604 | | 755 | <--- | 750 (G3) | ---> | 750CX |
31+
+--------------+ +-----+ +----------------+ +-------+
3032
| | |
3133
| | |
3234
v v v

Documentation/powerpc/mpc52xx.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Linux 2.6.x on MPC52xx family
33
=============================
44

5-
For the latest info, go to http://www.246tNt.com/mpc52xx/
5+
For the latest info, go to https://www.246tNt.com/mpc52xx/
66

77
To compile/use :
88

Documentation/powerpc/syscall64-abi.rst

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,39 @@ Power Architecture 64-bit Linux system call ABI
55
syscall
66
=======
77

8+
Invocation
9+
----------
10+
The syscall is made with the sc instruction, and returns with execution
11+
continuing at the instruction following the sc instruction.
12+
13+
If PPC_FEATURE2_SCV appears in the AT_HWCAP2 ELF auxiliary vector, the
14+
scv 0 instruction is an alternative that may provide better performance,
15+
with some differences to calling sequence.
16+
817
syscall calling sequence\ [1]_ matches the Power Architecture 64-bit ELF ABI
918
specification C function calling sequence, including register preservation
1019
rules, with the following differences.
1120

1221
.. [1] Some syscalls (typically low-level management functions) may have
1322
different calling sequences (e.g., rt_sigreturn).
1423
15-
Parameters and return value
16-
---------------------------
24+
Parameters
25+
----------
1726
The system call number is specified in r0.
1827

1928
There is a maximum of 6 integer parameters to a syscall, passed in r3-r8.
2029

21-
Both a return value and a return error code are returned. cr0.SO is the return
22-
error code, and r3 is the return value or error code. When cr0.SO is clear,
23-
the syscall succeeded and r3 is the return value. When cr0.SO is set, the
24-
syscall failed and r3 is the error code that generally corresponds to errno.
30+
Return value
31+
------------
32+
- For the sc instruction, both a value and an error condition are returned.
33+
cr0.SO is the error condition, and r3 is the return value. When cr0.SO is
34+
clear, the syscall succeeded and r3 is the return value. When cr0.SO is set,
35+
the syscall failed and r3 is the error value (that normally corresponds to
36+
errno).
37+
38+
- For the scv 0 instruction, the return value indicates failure if it is
39+
-4095..-1 (i.e., it is >= -MAX_ERRNO (-4095) as an unsigned comparison),
40+
in which case the error value is the negated return value.
2541

2642
Stack
2743
-----
@@ -34,22 +50,23 @@ Register preservation rules match the ELF ABI calling sequence with the
3450
following differences:
3551

3652
=========== ============= ========================================
53+
--- For the sc instruction, differences with the ELF ABI ---
3754
r0 Volatile (System call number.)
3855
r3 Volatile (Parameter 1, and return value.)
3956
r4-r8 Volatile (Parameters 2-6.)
40-
cr0 Volatile (cr0.SO is the return error condition)
57+
cr0 Volatile (cr0.SO is the return error condition.)
4158
cr1, cr5-7 Nonvolatile
4259
lr Nonvolatile
60+
61+
--- For the scv 0 instruction, differences with the ELF ABI ---
62+
r0 Volatile (System call number.)
63+
r3 Volatile (Parameter 1, and return value.)
64+
r4-r8 Volatile (Parameters 2-6.)
4365
=========== ============= ========================================
4466

4567
All floating point and vector data registers as well as control and status
4668
registers are nonvolatile.
4769

48-
Invocation
49-
----------
50-
The syscall is performed with the sc instruction, and returns with execution
51-
continuing at the instruction following the sc instruction.
52-
5370
Transactional Memory
5471
--------------------
5572
Syscall behavior can change if the processor is in transactional or suspended
@@ -75,6 +92,7 @@ auxiliary vector.
7592
returning to the caller. This case is not well defined or supported, so this
7693
behavior should not be relied upon.
7794

95+
scv 0 syscalls will always behave as PPC_FEATURE2_HTM_NOSC.
7896

7997
vsyscall
8098
========

0 commit comments

Comments
 (0)