Skip to content

Commit 128a9d4

Browse files
committed
Automatic merge of 'next' into merge (2024-05-08 22:44)
2 parents ec2d9f1 + 98ec6d3 commit 128a9d4

File tree

113 files changed

+1376
-333
lines changed

Some content is hidden

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

113 files changed

+1376
-333
lines changed

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ What: /sys/devices/system/cpu/cpuX/cpufreq/throttle_stats
423423
/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset
424424
Date: March 2016
425425
Contact: Linux kernel mailing list <[email protected]>
426-
Linux for PowerPC mailing list <[email protected]>
426+
Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
427427
Description: POWERNV CPUFreq driver's frequency throttle stats directory and
428428
attributes
429429

@@ -473,7 +473,7 @@ What: /sys/devices/system/cpu/cpufreq/policyX/throttle_stats
473473
/sys/devices/system/cpu/cpufreq/policyX/throttle_stats/occ_reset
474474
Date: March 2016
475475
Contact: Linux kernel mailing list <[email protected]>
476-
Linux for PowerPC mailing list <[email protected]>
476+
Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
477477
Description: POWERNV CPUFreq driver's frequency throttle stats directory and
478478
attributes
479479

@@ -608,7 +608,7 @@ Description: Umwait control
608608
What: /sys/devices/system/cpu/svm
609609
Date: August 2019
610610
Contact: Linux kernel mailing list <[email protected]>
611-
Linux for PowerPC mailing list <[email protected]>
611+
Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
612612
Description: Secure Virtual Machine
613613

614614
If 1, it means the system is using the Protected Execution
@@ -617,7 +617,7 @@ Description: Secure Virtual Machine
617617

618618
What: /sys/devices/system/cpu/cpuX/purr
619619
Date: Apr 2005
620-
Contact: Linux for PowerPC mailing list <[email protected]>
620+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
621621
Description: PURR ticks for this CPU since the system boot.
622622

623623
The Processor Utilization Resources Register (PURR) is
@@ -628,7 +628,7 @@ Description: PURR ticks for this CPU since the system boot.
628628

629629
What: /sys/devices/system/cpu/cpuX/spurr
630630
Date: Dec 2006
631-
Contact: Linux for PowerPC mailing list <[email protected]>
631+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
632632
Description: SPURR ticks for this CPU since the system boot.
633633

634634
The Scaled Processor Utilization Resources Register
@@ -640,15 +640,15 @@ Description: SPURR ticks for this CPU since the system boot.
640640

641641
What: /sys/devices/system/cpu/cpuX/idle_purr
642642
Date: Apr 2020
643-
Contact: Linux for PowerPC mailing list <[email protected]>
643+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
644644
Description: PURR ticks for cpuX when it was idle.
645645

646646
This sysfs interface exposes the number of PURR ticks
647647
for cpuX when it was idle.
648648

649649
What: /sys/devices/system/cpu/cpuX/idle_spurr
650650
Date: Apr 2020
651-
Contact: Linux for PowerPC mailing list <[email protected]>
651+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
652652
Description: SPURR ticks for cpuX when it was idle.
653653

654654
This sysfs interface exposes the number of SPURR ticks

Documentation/ABI/testing/sysfs-firmware-opal-powercap

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/firmware/opal/powercap
22
Date: August 2017
3-
Contact: Linux for PowerPC mailing list <[email protected]>
3+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
44
Description: Powercap directory for Powernv (P8, P9) servers
55

66
Each folder in this directory contains a
@@ -11,7 +11,7 @@ What: /sys/firmware/opal/powercap/system-powercap
1111
/sys/firmware/opal/powercap/system-powercap/powercap-max
1212
/sys/firmware/opal/powercap/system-powercap/powercap-current
1313
Date: August 2017
14-
Contact: Linux for PowerPC mailing list <[email protected]>
14+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
1515
Description: System powercap directory and attributes applicable for
1616
Powernv (P8, P9) servers
1717

Documentation/ABI/testing/sysfs-firmware-opal-psr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/firmware/opal/psr
22
Date: August 2017
3-
Contact: Linux for PowerPC mailing list <[email protected]>
3+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
44
Description: Power-Shift-Ratio directory for Powernv P9 servers
55

66
Power-Shift-Ratio allows to provide hints the firmware
@@ -10,7 +10,7 @@ Description: Power-Shift-Ratio directory for Powernv P9 servers
1010

1111
What: /sys/firmware/opal/psr/cpu_to_gpu_X
1212
Date: August 2017
13-
Contact: Linux for PowerPC mailing list <[email protected]>
13+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
1414
Description: PSR sysfs attributes for Powernv P9 servers
1515

1616
Power-Shift-Ratio between CPU and GPU for a given chip

Documentation/ABI/testing/sysfs-firmware-opal-sensor-groups

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/firmware/opal/sensor_groups
22
Date: August 2017
3-
Contact: Linux for PowerPC mailing list <[email protected]>
3+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
44
Description: Sensor groups directory for POWER9 powernv servers
55

66
Each folder in this directory contains a sensor group
@@ -11,7 +11,7 @@ Description: Sensor groups directory for POWER9 powernv servers
1111

1212
What: /sys/firmware/opal/sensor_groups/<sensor_group_name>/clear
1313
Date: August 2017
14-
Contact: Linux for PowerPC mailing list <[email protected]>
14+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
1515
Description: Sysfs file to clear the min-max of all the sensors
1616
belonging to the group.
1717

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /sys/firmware/papr/energy_scale_info
22
Date: February 2022
3-
Contact: Linux for PowerPC mailing list <[email protected]>
3+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
44
Description: Directory hosting a set of platform attributes like
55
energy/frequency on Linux running as a PAPR guest.
66

@@ -10,20 +10,20 @@ Description: Directory hosting a set of platform attributes like
1010

1111
What: /sys/firmware/papr/energy_scale_info/<id>
1212
Date: February 2022
13-
Contact: Linux for PowerPC mailing list <[email protected]>
13+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
1414
Description: Energy, frequency attributes directory for POWERVM servers
1515

1616
What: /sys/firmware/papr/energy_scale_info/<id>/desc
1717
Date: February 2022
18-
Contact: Linux for PowerPC mailing list <[email protected]>
18+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
1919
Description: String description of the energy attribute of <id>
2020

2121
What: /sys/firmware/papr/energy_scale_info/<id>/value
2222
Date: February 2022
23-
Contact: Linux for PowerPC mailing list <[email protected]>
23+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
2424
Description: Numeric value of the energy attribute of <id>
2525

2626
What: /sys/firmware/papr/energy_scale_info/<id>/value_desc
2727
Date: February 2022
28-
Contact: Linux for PowerPC mailing list <[email protected]>
28+
Contact: Linux for PowerPC mailing list <linuxppc-dev@lists.ozlabs.org>
2929
Description: String value of the energy attribute of <id>

Documentation/arch/powerpc/dexcr.rst

+139-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,145 @@ state for a process.
3636
Configuration
3737
=============
3838

39-
The DEXCR is currently unconfigurable. All threads are run with the
40-
NPHIE aspect enabled.
39+
prctl
40+
-----
41+
42+
A process can control its own userspace DEXCR value using the
43+
``PR_PPC_GET_DEXCR`` and ``PR_PPC_SET_DEXCR`` pair of
44+
:manpage:`prctl(2)` commands. These calls have the form::
45+
46+
prctl(PR_PPC_GET_DEXCR, unsigned long which, 0, 0, 0);
47+
prctl(PR_PPC_SET_DEXCR, unsigned long which, unsigned long ctrl, 0, 0);
48+
49+
The possible 'which' and 'ctrl' values are as follows. Note there is no relation
50+
between the 'which' value and the DEXCR aspect's index.
51+
52+
.. flat-table::
53+
:header-rows: 1
54+
:widths: 2 7 1
55+
56+
* - ``prctl()`` which
57+
- Aspect name
58+
- Aspect index
59+
60+
* - ``PR_PPC_DEXCR_SBHE``
61+
- Speculative Branch Hint Enable (SBHE)
62+
- 0
63+
64+
* - ``PR_PPC_DEXCR_IBRTPD``
65+
- Indirect Branch Recurrent Target Prediction Disable (IBRTPD)
66+
- 3
67+
68+
* - ``PR_PPC_DEXCR_SRAPD``
69+
- Subroutine Return Address Prediction Disable (SRAPD)
70+
- 4
71+
72+
* - ``PR_PPC_DEXCR_NPHIE``
73+
- Non-Privileged Hash Instruction Enable (NPHIE)
74+
- 5
75+
76+
.. flat-table::
77+
:header-rows: 1
78+
:widths: 2 8
79+
80+
* - ``prctl()`` ctrl
81+
- Meaning
82+
83+
* - ``PR_PPC_DEXCR_CTRL_EDITABLE``
84+
- This aspect can be configured with PR_PPC_SET_DEXCR (get only)
85+
86+
* - ``PR_PPC_DEXCR_CTRL_SET``
87+
- This aspect is set / set this aspect
88+
89+
* - ``PR_PPC_DEXCR_CTRL_CLEAR``
90+
- This aspect is clear / clear this aspect
91+
92+
* - ``PR_PPC_DEXCR_CTRL_SET_ONEXEC``
93+
- This aspect will be set after exec / set this aspect after exec
94+
95+
* - ``PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``
96+
- This aspect will be clear after exec / clear this aspect after exec
97+
98+
Note that
99+
100+
* which is a plain value, not a bitmask. Aspects must be worked with individually.
101+
102+
* ctrl is a bitmask. ``PR_PPC_GET_DEXCR`` returns both the current and onexec
103+
configuration. For example, ``PR_PPC_GET_DEXCR`` may return
104+
``PR_PPC_DEXCR_CTRL_EDITABLE | PR_PPC_DEXCR_CTRL_SET |
105+
PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC``. This would indicate the aspect is currently
106+
set, it will be cleared when you run exec, and you can change this with the
107+
``PR_PPC_SET_DEXCR`` prctl.
108+
109+
* The set/clear terminology refers to setting/clearing the bit in the DEXCR.
110+
For example::
111+
112+
prctl(PR_PPC_SET_DEXCR, PR_PPC_DEXCR_IBRTPD, PR_PPC_DEXCR_CTRL_SET, 0, 0);
113+
114+
will set the IBRTPD aspect bit in the DEXCR, causing indirect branch prediction
115+
to be disabled.
116+
117+
* The status returned by ``PR_PPC_GET_DEXCR`` represents what value the process
118+
would like applied. It does not include any alternative overrides, such as if
119+
the hypervisor is enforcing the aspect be set. To see the true DEXCR state
120+
software should read the appropriate SPRs directly.
121+
122+
* The aspect state when starting a process is copied from the parent's state on
123+
:manpage:`fork(2)`. The state is reset to a fixed value on
124+
:manpage:`execve(2)`. The PR_PPC_SET_DEXCR prctl() can control both of these
125+
values.
126+
127+
* The ``*_ONEXEC`` controls do not change the current process's DEXCR.
128+
129+
Use ``PR_PPC_SET_DEXCR`` with one of ``PR_PPC_DEXCR_CTRL_SET`` or
130+
``PR_PPC_DEXCR_CTRL_CLEAR`` to edit a given aspect.
131+
132+
Common error codes for both getting and setting the DEXCR are as follows:
133+
134+
.. flat-table::
135+
:header-rows: 1
136+
:widths: 2 8
137+
138+
* - Error
139+
- Meaning
140+
141+
* - ``EINVAL``
142+
- The DEXCR is not supported by the kernel.
143+
144+
* - ``ENODEV``
145+
- The aspect is not recognised by the kernel or not supported by the
146+
hardware.
147+
148+
``PR_PPC_SET_DEXCR`` may also report the following error codes:
149+
150+
.. flat-table::
151+
:header-rows: 1
152+
:widths: 2 8
153+
154+
* - Error
155+
- Meaning
156+
157+
* - ``EINVAL``
158+
- The ctrl value contains unrecognised flags.
159+
160+
* - ``EINVAL``
161+
- The ctrl value contains mutually conflicting flags (e.g.,
162+
``PR_PPC_DEXCR_CTRL_SET | PR_PPC_DEXCR_CTRL_CLEAR``)
163+
164+
* - ``EPERM``
165+
- This aspect cannot be modified with prctl() (check for the
166+
PR_PPC_DEXCR_CTRL_EDITABLE flag with PR_PPC_GET_DEXCR).
167+
168+
* - ``EPERM``
169+
- The process does not have sufficient privilege to perform the operation.
170+
For example, clearing NPHIE on exec is a privileged operation (a process
171+
can still clear its own NPHIE aspect without privileges).
172+
173+
This interface allows a process to control its own DEXCR aspects, and also set
174+
the initial DEXCR value for any children in its process tree (up to the next
175+
child to use an ``*_ONEXEC`` control). This allows fine-grained control over the
176+
default value of the DEXCR, for example allowing containers to run with different
177+
default values.
41178

42179

43180
coredump and ptrace

arch/powerpc/Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)
114114

115115
ifdef CONFIG_PPC64
116116
ifndef CONFIG_PPC_KERNEL_PCREL
117-
ifeq ($(call cc-option-yn,-mcmodel=medium),y)
118117
# -mcmodel=medium breaks modules because it uses 32bit offsets from
119118
# the TOC pointer to create pointers where possible. Pointers into the
120119
# percpu data area are created by this method.
@@ -124,9 +123,6 @@ ifeq ($(call cc-option-yn,-mcmodel=medium),y)
124123
# kernel percpu data space (starting with 0xc...). We need a full
125124
# 64bit relocation for this to work, hence -mcmodel=large.
126125
KBUILD_CFLAGS_MODULE += -mcmodel=large
127-
else
128-
export NO_MINIMAL_TOC := -mno-minimal-toc
129-
endif
130126
endif
131127
endif
132128

@@ -139,7 +135,7 @@ CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
139135
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
140136
endif
141137
endif
142-
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
138+
CFLAGS-$(CONFIG_PPC64) += -mcmodel=medium
143139
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
144140
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mlong-double-128)
145141

arch/powerpc/boot/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ DTC_FLAGS ?= -p 1024
108108
# these files into the build dir, fix up any includes and ensure that dependent
109109
# files are copied in the right order.
110110

111-
# these need to be seperate variables because they are copied out of different
112-
# directories in the kernel tree. Sure you COULd merge them, but it's a
111+
# these need to be separate variables because they are copied out of different
112+
# directories in the kernel tree. Sure you COULD merge them, but it's a
113113
# cure-is-worse-than-disease situation.
114114
zlib-decomp-$(CONFIG_KERNEL_GZIP) := decompress_inflate.c
115115
zlib-$(CONFIG_KERNEL_GZIP) := inffast.c inflate.c inftrees.c

arch/powerpc/boot/decompress.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static void print_err(char *s)
101101
* @input_size: length of the input buffer
102102
* @outbuf: output buffer
103103
* @output_size: length of the output buffer
104-
* @skip number of output bytes to ignore
104+
* @_skip: number of output bytes to ignore
105105
*
106106
* This function takes compressed data from inbuf, decompresses and write it to
107107
* outbuf. Once output_size bytes are written to the output buffer, or the

arch/powerpc/boot/dts/acadia.dts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
reg = <0xef602800 0x60>;
173173
interrupt-parent = <&UIC0>;
174174
interrupts = <0x4 0x4>;
175-
/* This thing is a bit weird. It has it's own UIC
175+
/* This thing is a bit weird. It has its own UIC
176176
* that it uses to generate snapshot triggers. We
177177
* don't really support this device yet, and it needs
178178
* work to figure this out.

arch/powerpc/boot/dts/fsl/b4si-post.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
&ifc {
5151
#address-cells = <2>;
5252
#size-cells = <1>;
53-
compatible = "fsl,ifc", "simple-bus";
53+
compatible = "fsl,ifc";
5454
interrupts = <25 2 0 0>;
5555
};
5656

arch/powerpc/boot/dts/fsl/bsc9131rdb.dts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
device_type = "memory";
1616
};
1717

18-
board_ifc: ifc: ifc@ff71e000 {
18+
board_ifc: ifc: memory-controller@ff71e000 {
1919
/* NAND Flash on board */
2020
ranges = <0x0 0x0 0x0 0xff800000 0x00004000>;
2121
reg = <0x0 0xff71e000 0x0 0x2000>;

arch/powerpc/boot/dts/fsl/bsc9131si-post.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
&ifc {
3636
#address-cells = <2>;
3737
#size-cells = <1>;
38-
compatible = "fsl,ifc", "simple-bus";
38+
compatible = "fsl,ifc";
3939
interrupts = <16 2 0 0 20 2 0 0>;
4040
};
4141

arch/powerpc/boot/dts/fsl/bsc9132qds.dts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
device_type = "memory";
1616
};
1717

18-
ifc: ifc@ff71e000 {
18+
ifc: memory-controller@ff71e000 {
1919
/* NOR, NAND Flash on board */
2020
ranges = <0x0 0x0 0x0 0x88000000 0x08000000
2121
0x1 0x0 0x0 0xff800000 0x00010000>;

arch/powerpc/boot/dts/fsl/bsc9132si-post.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
&ifc {
3636
#address-cells = <2>;
3737
#size-cells = <1>;
38-
compatible = "fsl,ifc", "simple-bus";
38+
compatible = "fsl,ifc";
3939
/* FIXME: Test whether interrupts are split */
4040
interrupts = <16 2 0 0 20 2 0 0>;
4141
};

0 commit comments

Comments
 (0)