Skip to content

Commit 7ae7715

Browse files
committed
Merge tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Support for userspace to send requests directly to the on-chip GZIP accelerator on Power9. - Rework of our lockless page table walking (__find_linux_pte()) to make it safe against parallel page table manipulations without relying on an IPI for serialisation. - A series of fixes & enhancements to make our machine check handling more robust. - Lots of plumbing to add support for "prefixed" (64-bit) instructions on Power10. - Support for using huge pages for the linear mapping on 8xx (32-bit). - Remove obsolete Xilinx PPC405/PPC440 support, and an associated sound driver. - Removal of some obsolete 40x platforms and associated cruft. - Initial support for booting on Power10. - Lots of other small features, cleanups & fixes. Thanks to: Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan, Andrey Abramov, Aneesh Kumar K.V, Balamuruhan S, Bharata B Rao, Bulent Abali, Cédric Le Goater, Chen Zhou, Christian Zigotzky, Christophe JAILLET, Christophe Leroy, Dmitry Torokhov, Emmanuel Nicolet, Erhard F., Gautham R. Shenoy, Geoff Levand, George Spelvin, Greg Kurz, Gustavo A. R. Silva, Gustavo Walbon, Haren Myneni, Hari Bathini, Joel Stanley, Jordan Niethe, Kajol Jain, Kees Cook, Leonardo Bras, Madhavan Srinivasan., Mahesh Salgaonkar, Markus Elfring, Michael Neuling, Michal Simek, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Pingfan Liu, Qian Cai, Ram Pai, Raphael Moreira Zinsly, Ravi Bangoria, Sam Bobroff, Sandipan Das, Segher Boessenkool, Stephen Rothwell, Sukadev Bhattiprolu, Tyrel Datwyler, Wolfram Sang, Xiongfeng Wang. * tag 'powerpc-5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (299 commits) powerpc/pseries: Make vio and ibmebus initcalls pseries specific cxl: Remove dead Kconfig options powerpc: Add POWER10 architected mode powerpc/dt_cpu_ftrs: Add MMA feature powerpc/dt_cpu_ftrs: Enable Prefixed Instructions powerpc/dt_cpu_ftrs: Advertise support for ISA v3.1 if selected powerpc: Add support for ISA v3.1 powerpc: Add new HWCAP bits powerpc/64s: Don't set FSCR bits in INIT_THREAD powerpc/64s: Save FSCR to init_task.thread.fscr after feature init powerpc/64s: Don't let DT CPU features set FSCR_DSCR powerpc/64s: Don't init FSCR_DSCR in __init_FSCR() powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG powerpc/module_64: Use special stub for _mcount() with -mprofile-kernel powerpc/module_64: Simplify check for -mprofile-kernel ftrace relocations powerpc/module_64: Consolidate ftrace code powerpc/32: Disable KASAN with pages bigger than 16k powerpc/uaccess: Don't set KUEP by default on book3s/32 powerpc/uaccess: Don't set KUAP by default on book3s/32 powerpc/8xx: Reduce time spent in allow_user_access() and friends ...
2 parents 084623e + 1395375 commit 7ae7715

File tree

343 files changed

+10395
-8589
lines changed

Some content is hidden

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

343 files changed

+10395
-8589
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,27 @@ Description:
2222
Exposes the "version" field of the 24x7 catalog. This is also
2323
extractable from the provided binary "catalog" sysfs entry.
2424

25+
What: /sys/devices/hv_24x7/interface/sockets
26+
Date: May 2020
27+
Contact: Linux on PowerPC Developer List <[email protected]>
28+
Description: read only
29+
This sysfs interface exposes the number of sockets present in the
30+
system.
31+
32+
What: /sys/devices/hv_24x7/interface/chipspersocket
33+
Date: May 2020
34+
Contact: Linux on PowerPC Developer List <[email protected]>
35+
Description: read only
36+
This sysfs interface exposes the number of chips per socket
37+
present in the system.
38+
39+
What: /sys/devices/hv_24x7/interface/coresperchip
40+
Date: May 2020
41+
Contact: Linux on PowerPC Developer List <[email protected]>
42+
Description: read only
43+
This sysfs interface exposes the number of cores per chip
44+
present in the system.
45+
2546
What: /sys/bus/event_source/devices/hv_24x7/event_descs/<event-name>
2647
Date: February 2014
2748
Contact: Linux on PowerPC Developer List <[email protected]>

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,3 +574,42 @@ Description: Secure Virtual Machine
574574
If 1, it means the system is using the Protected Execution
575575
Facility in POWER9 and newer processors. i.e., it is a Secure
576576
Virtual Machine.
577+
578+
What: /sys/devices/system/cpu/cpuX/purr
579+
Date: Apr 2005
580+
Contact: Linux for PowerPC mailing list <[email protected]>
581+
Description: PURR ticks for this CPU since the system boot.
582+
583+
The Processor Utilization Resources Register (PURR) is
584+
a 64-bit counter which provides an estimate of the
585+
resources used by the CPU thread. The contents of this
586+
register increases monotonically. This sysfs interface
587+
exposes the number of PURR ticks for cpuX.
588+
589+
What: /sys/devices/system/cpu/cpuX/spurr
590+
Date: Dec 2006
591+
Contact: Linux for PowerPC mailing list <[email protected]>
592+
Description: SPURR ticks for this CPU since the system boot.
593+
594+
The Scaled Processor Utilization Resources Register
595+
(SPURR) is a 64-bit counter that provides a frequency
596+
invariant estimate of the resources used by the CPU
597+
thread. The contents of this register increases
598+
monotonically. This sysfs interface exposes the number
599+
of SPURR ticks for cpuX.
600+
601+
What: /sys/devices/system/cpu/cpuX/idle_purr
602+
Date: Apr 2020
603+
Contact: Linux for PowerPC mailing list <[email protected]>
604+
Description: PURR ticks for cpuX when it was idle.
605+
606+
This sysfs interface exposes the number of PURR ticks
607+
for cpuX when it was idle.
608+
609+
What: /sys/devices/system/cpu/cpuX/idle_spurr
610+
Date: Apr 2020
611+
Contact: Linux for PowerPC mailing list <[email protected]>
612+
Description: SPURR ticks for cpuX when it was idle.
613+
614+
This sysfs interface exposes the number of SPURR ticks
615+
for cpuX when it was idle.

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,11 @@
874874
can be useful when debugging issues that require an SLB
875875
miss to occur.
876876

877+
stress_slb [PPC]
878+
Limits the number of kernel SLB entries, and flushes
879+
them frequently to increase the rate of SLB faults
880+
on kernel addresses.
881+
877882
disable= [IPV6]
878883
See Documentation/networking/ipv6.rst.
879884

Documentation/devicetree/bindings/xilinx.txt

Lines changed: 0 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -86,149 +86,6 @@
8686
xlnx,use-parity = <0>;
8787
};
8888

89-
Some IP cores actually implement 2 or more logical devices. In
90-
this case, the device should still describe the whole IP core with
91-
a single node and add a child node for each logical device. The
92-
ranges property can be used to translate from parent IP-core to the
93-
registers of each device. In addition, the parent node should be
94-
compatible with the bus type 'xlnx,compound', and should contain
95-
#address-cells and #size-cells, as with any other bus. (Note: this
96-
makes the assumption that both logical devices have the same bus
97-
binding. If this is not true, then separate nodes should be used
98-
for each logical device). The 'cell-index' property can be used to
99-
enumerate logical devices within an IP core. For example, the
100-
following is the system.mhs entry for the dual ps2 controller found
101-
on the ml403 reference design.
102-
103-
BEGIN opb_ps2_dual_ref
104-
PARAMETER INSTANCE = opb_ps2_dual_ref_0
105-
PARAMETER HW_VER = 1.00.a
106-
PARAMETER C_BASEADDR = 0xA9000000
107-
PARAMETER C_HIGHADDR = 0xA9001FFF
108-
BUS_INTERFACE SOPB = opb_v20_0
109-
PORT Sys_Intr1 = ps2_1_intr
110-
PORT Sys_Intr2 = ps2_2_intr
111-
PORT Clkin1 = ps2_clk_rx_1
112-
PORT Clkin2 = ps2_clk_rx_2
113-
PORT Clkpd1 = ps2_clk_tx_1
114-
PORT Clkpd2 = ps2_clk_tx_2
115-
PORT Rx1 = ps2_d_rx_1
116-
PORT Rx2 = ps2_d_rx_2
117-
PORT Txpd1 = ps2_d_tx_1
118-
PORT Txpd2 = ps2_d_tx_2
119-
END
120-
121-
It would result in the following device tree nodes:
122-
123-
opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
124-
#address-cells = <1>;
125-
#size-cells = <1>;
126-
compatible = "xlnx,compound";
127-
ranges = <0 a9000000 2000>;
128-
// If this device had extra parameters, then they would
129-
// go here.
130-
ps2@0 {
131-
compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
132-
reg = <0 40>;
133-
interrupt-parent = <&opb_intc_0>;
134-
interrupts = <3 0>;
135-
cell-index = <0>;
136-
};
137-
ps2@1000 {
138-
compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
139-
reg = <1000 40>;
140-
interrupt-parent = <&opb_intc_0>;
141-
interrupts = <3 0>;
142-
cell-index = <0>;
143-
};
144-
};
145-
146-
Also, the system.mhs file defines bus attachments from the processor
147-
to the devices. The device tree structure should reflect the bus
148-
attachments. Again an example; this system.mhs fragment:
149-
150-
BEGIN ppc405_virtex4
151-
PARAMETER INSTANCE = ppc405_0
152-
PARAMETER HW_VER = 1.01.a
153-
BUS_INTERFACE DPLB = plb_v34_0
154-
BUS_INTERFACE IPLB = plb_v34_0
155-
END
156-
157-
BEGIN opb_intc
158-
PARAMETER INSTANCE = opb_intc_0
159-
PARAMETER HW_VER = 1.00.c
160-
PARAMETER C_BASEADDR = 0xD1000FC0
161-
PARAMETER C_HIGHADDR = 0xD1000FDF
162-
BUS_INTERFACE SOPB = opb_v20_0
163-
END
164-
165-
BEGIN opb_uart16550
166-
PARAMETER INSTANCE = opb_uart16550_0
167-
PARAMETER HW_VER = 1.00.d
168-
PARAMETER C_BASEADDR = 0xa0000000
169-
PARAMETER C_HIGHADDR = 0xa0001FFF
170-
BUS_INTERFACE SOPB = opb_v20_0
171-
END
172-
173-
BEGIN plb_v34
174-
PARAMETER INSTANCE = plb_v34_0
175-
PARAMETER HW_VER = 1.02.a
176-
END
177-
178-
BEGIN plb_bram_if_cntlr
179-
PARAMETER INSTANCE = plb_bram_if_cntlr_0
180-
PARAMETER HW_VER = 1.00.b
181-
PARAMETER C_BASEADDR = 0xFFFF0000
182-
PARAMETER C_HIGHADDR = 0xFFFFFFFF
183-
BUS_INTERFACE SPLB = plb_v34_0
184-
END
185-
186-
BEGIN plb2opb_bridge
187-
PARAMETER INSTANCE = plb2opb_bridge_0
188-
PARAMETER HW_VER = 1.01.a
189-
PARAMETER C_RNG0_BASEADDR = 0x20000000
190-
PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
191-
PARAMETER C_RNG1_BASEADDR = 0x60000000
192-
PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
193-
PARAMETER C_RNG2_BASEADDR = 0x80000000
194-
PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
195-
PARAMETER C_RNG3_BASEADDR = 0xC0000000
196-
PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
197-
BUS_INTERFACE SPLB = plb_v34_0
198-
BUS_INTERFACE MOPB = opb_v20_0
199-
END
200-
201-
Gives this device tree (some properties removed for clarity):
202-
203-
plb@0 {
204-
#address-cells = <1>;
205-
#size-cells = <1>;
206-
compatible = "xlnx,plb-v34-1.02.a";
207-
device_type = "ibm,plb";
208-
ranges; // 1:1 translation
209-
210-
plb_bram_if_cntrl_0: bram@ffff0000 {
211-
reg = <ffff0000 10000>;
212-
}
213-
214-
opb@20000000 {
215-
#address-cells = <1>;
216-
#size-cells = <1>;
217-
ranges = <20000000 20000000 20000000
218-
60000000 60000000 20000000
219-
80000000 80000000 40000000
220-
c0000000 c0000000 20000000>;
221-
222-
opb_uart16550_0: serial@a0000000 {
223-
reg = <a00000000 2000>;
224-
};
225-
226-
opb_intc_0: interrupt-controller@d1000fc0 {
227-
reg = <d1000fc0 20>;
228-
};
229-
};
230-
};
231-
23289
That covers the general approach to binding xilinx IP cores into the
23390
device tree. The following are bindings for specific devices:
23491

Documentation/powerpc/bootwrapper.rst

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -70,28 +70,6 @@ Currently, the following image format targets exist:
7070
kernel with this image type and it depends entirely on
7171
the embedded device tree for all information.
7272

73-
The simpleImage is useful for booting systems with
74-
an unknown firmware interface or for booting from
75-
a debugger when no firmware is present (such as on
76-
the Xilinx Virtex platform). The only assumption that
77-
simpleImage makes is that RAM is correctly initialized
78-
and that the MMU is either off or has RAM mapped to
79-
base address 0.
80-
81-
simpleImage also supports inserting special platform
82-
specific initialization code to the start of the bootup
83-
sequence. The virtex405 platform uses this feature to
84-
ensure that the cache is invalidated before caching
85-
is enabled. Platform specific initialization code is
86-
added as part of the wrapper script and is keyed on
87-
the image target name. For example, all
88-
simpleImage.virtex405-* targets will add the
89-
virtex405-head.S initialization code (This also means
90-
that the dts file for virtex405 targets should be
91-
named (virtex405-<board>.dts). Search the wrapper
92-
script for 'virtex405' and see the file
93-
arch/powerpc/boot/virtex405-head.S for details.
94-
9573
treeImage.%; Image format for used with OpenBIOS firmware found
9674
on some ppc4xx hardware. This image embeds a device
9775
tree blob inside the image.
@@ -116,10 +94,8 @@ Image types which embed a device tree blob (simpleImage, dtbImage, treeImage,
11694
and cuImage) all generate the device tree blob from a file in the
11795
arch/powerpc/boot/dts/ directory. The Makefile selects the correct device
11896
tree source based on the name of the target. Therefore, if the kernel is
119-
built with 'make treeImage.walnut simpleImage.virtex405-ml403', then the
120-
build system will use arch/powerpc/boot/dts/walnut.dts to build
121-
treeImage.walnut and arch/powerpc/boot/dts/virtex405-ml403.dts to build
122-
the simpleImage.virtex405-ml403.
97+
built with 'make treeImage.walnut', then the build system will use
98+
arch/powerpc/boot/dts/walnut.dts to build treeImage.walnut.
12399

124100
Two special targets called 'zImage' and 'zImage.initrd' also exist. These
125101
targets build all the default images as selected by the kernel configuration.

Documentation/powerpc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ powerpc
3030
syscall64-abi
3131
transactional_memory
3232
ultravisor
33+
vas-api
3334

3435
.. only:: subproject and html
3536

Documentation/powerpc/transactional_memory.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,30 @@ POWER9N DD2.2.
245245
Guest migration from POWER8 to POWER9 will work with POWER9N DD2.2 and
246246
POWER9C DD1.2. Since earlier POWER9 processors don't support TM
247247
emulation, migration from POWER8 to POWER9 is not supported there.
248+
249+
Kernel implementation
250+
=====================
251+
252+
h/rfid mtmsrd quirk
253+
-------------------
254+
255+
As defined in the ISA, rfid has a quirk which is useful in early
256+
exception handling. When in a userspace transaction and we enter the
257+
kernel via some exception, MSR will end up as TM=0 and TS=01 (ie. TM
258+
off but TM suspended). Regularly the kernel will want change bits in
259+
the MSR and will perform an rfid to do this. In this case rfid can
260+
have SRR0 TM = 0 and TS = 00 (ie. TM off and non transaction) and the
261+
resulting MSR will retain TM = 0 and TS=01 from before (ie. stay in
262+
suspend). This is a quirk in the architecture as this would normally
263+
be a transition from TS=01 to TS=00 (ie. suspend -> non transactional)
264+
which is an illegal transition.
265+
266+
This quirk is described the architecture in the definition of rfid
267+
with these lines:
268+
269+
if (MSR 29:31 ¬ = 0b010 | SRR1 29:31 ¬ = 0b000) then
270+
MSR 29:31 <- SRR1 29:31
271+
272+
hrfid and mtmsrd have the same quirk.
273+
274+
The Linux kernel uses this quirk in it's early exception handling.

0 commit comments

Comments
 (0)