Skip to content

Commit 96685f8

Browse files
committed
Merge tag 'powerpc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - A series from Nick adding ARCH_WANT_IRQS_OFF_ACTIVATE_MM & selecting it for powerpc, as well as a related fix for sparc. - Remove support for PowerPC 601. - Some fixes for watchpoints & addition of a new ptrace flag for detecting ISA v3.1 (Power10) watchpoint features. - A fix for kernels using 4K pages and the hash MMU on bare metal Power9 systems with > 16TB of RAM, or RAM on the 2nd node. - A basic idle driver for shallow stop states on Power10. - Tweaks to our sched domains code to better inform the scheduler about the hardware topology on Power9/10, where two SMT4 cores can be presented by firmware as an SMT8 core. - A series doing further reworks & cleanups of our EEH code. - Addition of a filter for RTAS (firmware) calls done via sys_rtas(), to prevent root from overwriting kernel memory. - Other smaller features, fixes & cleanups. Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Athira Rajeev, Biwen Li, Cameron Berkenpas, Cédric Le Goater, Christophe Leroy, Christoph Hellwig, Colin Ian King, Daniel Axtens, David Dai, Finn Thain, Frederic Barrat, Gautham R. Shenoy, Greg Kurz, Gustavo Romero, Ira Weiny, Jason Yan, Joel Stanley, Jordan Niethe, Kajol Jain, Konrad Rzeszutek Wilk, Laurent Dufour, Leonardo Bras, Liu Shixin, Luca Ceresoli, Madhavan Srinivasan, Mahesh Salgaonkar, Nathan Lynch, Nicholas Mc Guire, Nicholas Piggin, Nick Desaulniers, Oliver O'Halloran, Pedro Miraglia Franco de Carvalho, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Ravi Bangoria, Russell Currey, Satheesh Rajendran, Scott Cheloha, Segher Boessenkool, Srikar Dronamraju, Stan Johnson, Stephen Kitt, Stephen Rothwell, Thiago Jung Bauermann, Tyrel Datwyler, Vaibhav Jain, Vaidyanathan Srinivasan, Vasant Hegde, Wang Wensheng, Wolfram Sang, Yang Yingliang, zhengbin. * tag 'powerpc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (228 commits) Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed" selftests/powerpc: Fix eeh-basic.sh exit codes cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_reboot_notifier powerpc/time: Make get_tb() common to PPC32 and PPC64 powerpc/time: Make get_tbl() common to PPC32 and PPC64 powerpc/time: Remove get_tbu() powerpc/time: Avoid using get_tbl() and get_tbu() internally powerpc/time: Make mftb() common to PPC32 and PPC64 powerpc/time: Rename mftbl() to mftb() powerpc/32s: Remove #ifdef CONFIG_PPC_BOOK3S_32 in head_book3s_32.S powerpc/32s: Rename head_32.S to head_book3s_32.S powerpc/32s: Setup the early hash table at all time. powerpc/time: Remove ifdef in get_dec() and set_dec() powerpc: Remove get_tb_or_rtc() powerpc: Remove __USE_RTC() powerpc: Tidy up a bit after removal of PowerPC 601. powerpc: Remove support for PowerPC 601 powerpc: Remove PowerPC 601 powerpc: Drop SYNC_601() ISYNC_601() and SYNC() powerpc: Remove CONFIG_PPC601_SYNC_FIX ...
2 parents c4cf498 + ffd0b25 commit 96685f8

File tree

223 files changed

+3245
-2491
lines changed

Some content is hidden

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

223 files changed

+3245
-2491
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
What: /sys/bus/event_source/devices/hv_24x7/format
2+
Date: September 2020
3+
Contact: Linux on PowerPC Developer List <[email protected]>
4+
Description: Read-only. Attribute group to describe the magic bits
5+
that go into perf_event_attr.config for a particular pmu.
6+
(See ABI/testing/sysfs-bus-event_source-devices-format).
7+
8+
Each attribute under this group defines a bit range of the
9+
perf_event_attr.config. All supported attributes are listed
10+
below.
11+
12+
chip = "config:16-31"
13+
core = "config:16-31"
14+
domain = "config:0-3"
15+
lpar = "config:0-15"
16+
offset = "config:32-63"
17+
vcpu = "config:16-31"
18+
19+
For example,
20+
21+
PM_PB_CYC = "domain=1,offset=0x80,chip=?,lpar=0x0"
22+
23+
In this event, '?' after chip specifies that
24+
this value will be provided by user while running this event.
25+
126
What: /sys/bus/event_source/devices/hv_24x7/interface/catalog
227
Date: February 2014
328
Contact: Linux on PowerPC Developer List <[email protected]>

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
What: /sys/bus/event_source/devices/hv_gpci/format
2+
Date: September 2020
3+
Contact: Linux on PowerPC Developer List <[email protected]>
4+
Description: Read-only. Attribute group to describe the magic bits
5+
that go into perf_event_attr.config for a particular pmu.
6+
(See ABI/testing/sysfs-bus-event_source-devices-format).
7+
8+
Each attribute under this group defines a bit range of the
9+
perf_event_attr.config. All supported attributes are listed
10+
below.
11+
12+
counter_info_version = "config:16-23"
13+
length = "config:24-31"
14+
partition_id = "config:32-63"
15+
request = "config:0-31"
16+
sibling_part_id = "config:32-63"
17+
hw_chip_id = "config:32-63"
18+
offset = "config:32-63"
19+
phys_processor_idx = "config:32-63"
20+
secondary_index = "config:0-15"
21+
starting_index = "config:32-63"
22+
23+
For example,
24+
25+
processor_core_utilization_instructions_completed = "request=0x94,
26+
phys_processor_idx=?,counter_info_version=0x8,
27+
length=8,offset=0x18"
28+
29+
In this event, '?' after phys_processor_idx specifies this value
30+
this value will be provided by user while running this event.
31+
132
What: /sys/bus/event_source/devices/hv_gpci/interface/collect_privileged
233
Date: February 2014
334
Contact: Linux on PowerPC Developer List <[email protected]>
@@ -41,3 +72,10 @@ Contact: Linux on PowerPC Developer List <[email protected]>
4172
Description:
4273
A number indicating the latest version of the gpci interface
4374
that the kernel is aware of.
75+
76+
What: /sys/devices/hv_gpci/cpumask
77+
Date: October 2020
78+
Contact: Linux on PowerPC Developer List <[email protected]>
79+
Description: read only
80+
This sysfs file exposes the cpumask which is designated to make
81+
HCALLs to retrieve hv-gpci pmu event counter data.

Documentation/powerpc/isa-versions.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Mapping of some CPU versions to relevant ISA versions.
77
========= ====================================================================
88
CPU Architecture version
99
========= ====================================================================
10+
Power10 Power ISA v3.1
1011
Power9 Power ISA v3.0B
1112
Power8 Power ISA v2.07
1213
Power7 Power ISA v2.06
@@ -32,6 +33,7 @@ Key Features
3233
========== ==================
3334
CPU VMX (aka. Altivec)
3435
========== ==================
36+
Power10 Yes
3537
Power9 Yes
3638
Power8 Yes
3739
Power7 Yes
@@ -47,6 +49,7 @@ PPC970 Yes
4749
========== ====
4850
CPU VSX
4951
========== ====
52+
Power10 Yes
5053
Power9 Yes
5154
Power8 Yes
5255
Power7 Yes
@@ -62,6 +65,7 @@ PPC970 No
6265
========== ====================================
6366
CPU Transactional Memory
6467
========== ====================================
68+
Power10 No (* see Power ISA v3.1, "Appendix A. Notes on the Removal of Transactional Memory from the Architecture")
6569
Power9 Yes (* see transactional_memory.txt)
6670
Power8 Yes
6771
Power7 No

Documentation/powerpc/ptrace.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ features will have bits indicating whether there is support for::
4646
#define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4
4747
#define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8
4848
#define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10
49+
#define PPC_DEBUG_FEATURE_DATA_BP_ARCH_31 0x20
4950

5051
2. PTRACE_SETHWDEBUG
5152

arch/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,13 @@ config MMU_GATHER_NO_GATHER
420420
bool
421421
depends on MMU_GATHER_TABLE_FREE
422422

423+
config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
424+
bool
425+
help
426+
Temporary select until all architectures can be converted to have
427+
irqs disabled over activate_mm. Architectures that do IPI based TLB
428+
shootdowns should enable this.
429+
423430
config ARCH_HAVE_NMI_SAFE_CMPXCHG
424431
bool
425432

arch/powerpc/Kconfig

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ config HAVE_SETUP_PER_CPU_AREA
5959
def_bool PPC64
6060

6161
config NEED_PER_CPU_EMBED_FIRST_CHUNK
62-
def_bool PPC64
62+
def_bool y if PPC64
63+
64+
config NEED_PER_CPU_PAGE_FIRST_CHUNK
65+
def_bool y if PPC64
6366

6467
config NR_IRQS
6568
int "Number of virtual interrupt numbers"
@@ -148,6 +151,7 @@ config PPC
148151
select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
149152
select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS
150153
select ARCH_WANT_IPC_PARSE_VERSION
154+
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
151155
select ARCH_WEAK_RELEASE_ACQUIRE
152156
select BINFMT_ELF
153157
select BUILDTIME_TABLE_SORT
@@ -964,7 +968,7 @@ config PPC_MEM_KEYS
964968
config PPC_SECURE_BOOT
965969
prompt "Enable secure boot support"
966970
bool
967-
depends on PPC_POWERNV
971+
depends on PPC_POWERNV || PPC_PSERIES
968972
depends on IMA_ARCH_POLICY
969973
imply IMA_SECURE_AND_OR_TRUSTED_BOOT
970974
help
@@ -984,6 +988,19 @@ config PPC_SECVAR_SYSFS
984988
read/write operations on these variables. Say Y if you have
985989
secure boot enabled and want to expose variables to userspace.
986990

991+
config PPC_RTAS_FILTER
992+
bool "Enable filtering of RTAS syscalls"
993+
default y
994+
depends on PPC_RTAS
995+
help
996+
The RTAS syscall API has security issues that could be used to
997+
compromise system integrity. This option enforces restrictions on the
998+
RTAS calls and arguments passed by userspace programs to mitigate
999+
these issues.
1000+
1001+
Say Y unless you know what you are doing and the filter is causing
1002+
problems for you.
1003+
9871004
endmenu
9881005

9891006
config ISA_DMA_API

arch/powerpc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ KBUILD_CFLAGS += $(cpu-as-y)
264264
KBUILD_AFLAGS += $(aflags-y)
265265
KBUILD_CFLAGS += $(cflags-y)
266266

267-
head-y := arch/powerpc/kernel/head_$(BITS).o
267+
head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
268+
head-$(CONFIG_PPC_BOOK3S_32) := arch/powerpc/kernel/head_book3s_32.o
268269
head-$(CONFIG_PPC_8xx) := arch/powerpc/kernel/head_8xx.o
269270
head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
270271
head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o

arch/powerpc/Makefile.postlink

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ quiet_cmd_relocs_check = CHKREL $@
1818
ifdef CONFIG_PPC_BOOK3S_64
1919
cmd_relocs_check = \
2020
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@" ; \
21-
$(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$@"
21+
$(BASH) $(srctree)/arch/powerpc/tools/unrel_branch_check.sh "$(OBJDUMP)" "$(NM)" "$@"
2222
else
2323
cmd_relocs_check = \
2424
$(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$(NM)" "$@"

arch/powerpc/boot/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Based on coffboot by Paul Mackerras
88
# Simplified for ppc64 by Todd Inglett
99
#
10-
# NOTE: this code is built for 32 bit in ELF32 format even though
10+
# NOTE: this code may be built for 32 bit in ELF32 format even though
1111
# it packages a 64 bit kernel. We do this to simplify the
1212
# bootloader and increase compatibility with OpenFirmware.
1313
#

arch/powerpc/boot/dts/fsl/t1024rdb.dts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
rtc@68 {
162162
compatible = "dallas,ds1339";
163163
reg = <0x68>;
164-
interrupts = <0x1 0x1 0 0>;
165164
};
166165
};
167166

0 commit comments

Comments
 (0)