Skip to content

Commit 7246f60

Browse files
committed
Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "Highlights include: - Larger virtual address space on 64-bit server CPUs. By default we use a 128TB virtual address space, but a process can request access to the full 512TB by passing a hint to mmap(). - Support for the new Power9 "XIVE" interrupt controller. - TLB flushing optimisations for the radix MMU on Power9. - Support for CAPI cards on Power9, using the "Coherent Accelerator Interface Architecture 2.0". - The ability to configure the mmap randomisation limits at build and runtime. - Several small fixes and cleanups to the kprobes code, as well as support for KPROBES_ON_FTRACE. - Major improvements to handling of system reset interrupts, correctly treating them as NMIs, giving them a dedicated stack and using a new hypervisor call to trigger them, all of which should aid debugging and robustness. - Many fixes and other minor enhancements. Thanks to: Alastair D'Silva, Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anshuman Khandual, Anton Blanchard, Balbir Singh, Ben Hutchings, Benjamin Herrenschmidt, Bhupesh Sharma, Chris Packham, Christian Zigotzky, Christophe Leroy, Christophe Lombard, Daniel Axtens, David Gibson, Gautham R. Shenoy, Gavin Shan, Geert Uytterhoeven, Guilherme G. Piccoli, Hamish Martin, Hari Bathini, Kees Cook, Laurent Dufour, Madhavan Srinivasan, Mahesh J Salgaonkar, Mahesh Salgaonkar, Masami Hiramatsu, Matt Brown, Matthew R. Ochs, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Pan Xinhui, Paul Mackerras, Rashmica Gupta, Russell Currey, Sukadev Bhattiprolu, Thadeu Lima de Souza Cascardo, Tobin C. Harding, Tyrel Datwyler, Uma Krishnan, Vaibhav Jain, Vipin K Parashar, Yang Shi" * tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (214 commits) powerpc/64s: Power9 has no LPCR[VRMASD] field so don't set it powerpc/powernv: Fix TCE kill on NVLink2 powerpc/mm/radix: Drop support for CPUs without lockless tlbie powerpc/book3s/mce: Move add_taint() later in virtual mode powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body powerpc/smp: Document irq enable/disable after migrating IRQs powerpc/mpc52xx: Don't select user-visible RTAS_PROC powerpc/powernv: Document cxl dependency on special case in pnv_eeh_reset() powerpc/eeh: Clean up and document event handling functions powerpc/eeh: Avoid use after free in eeh_handle_special_event() cxl: Mask slice error interrupts after first occurrence cxl: Route eeh events to all drivers in cxl_pci_error_detected() cxl: Force context lock during EEH flow powerpc/64: Allow CONFIG_RELOCATABLE if COMPILE_TEST powerpc/xmon: Teach xmon oops about radix vectors powerpc/mm/hash: Fix off-by-one in comment about kernel contexts ids powerpc/pseries: Enable VFIO powerpc/powernv: Fix iommu table size calculation hook for small tables powerpc/powernv: Check kzalloc() return value in pnv_pci_table_alloc powerpc: Add arch/powerpc/tools directory ...
2 parents e579dde + 700b7ea commit 7246f60

212 files changed

Lines changed: 8698 additions & 2790 deletions

File tree

Some content is hidden

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

‎Documentation/features/debug/kprobes-on-ftrace/arch-support.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
| nios2: | TODO |
2727
| openrisc: | TODO |
2828
| parisc: | TODO |
29-
| powerpc: | TODO |
29+
| powerpc: | ok |
3030
| s390: | TODO |
3131
| score: | TODO |
3232
| sh: | TODO |

‎Documentation/powerpc/cxl.txt‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Introduction
2121
Hardware overview
2222
=================
2323

24-
POWER8 FPGA
24+
POWER8/9 FPGA
2525
+----------+ +---------+
2626
| | | |
2727
| CPU | | AFU |
@@ -34,7 +34,7 @@ Hardware overview
3434
| | CAPP |<------>| |
3535
+---+------+ PCIE +---------+
3636

37-
The POWER8 chip has a Coherently Attached Processor Proxy (CAPP)
37+
The POWER8/9 chip has a Coherently Attached Processor Proxy (CAPP)
3838
unit which is part of the PCIe Host Bridge (PHB). This is managed
3939
by Linux by calls into OPAL. Linux doesn't directly program the
4040
CAPP.
@@ -59,6 +59,17 @@ Hardware overview
5959
the fault. The context to which this fault is serviced is based on
6060
who owns that acceleration function.
6161

62+
POWER8 <-----> PSL Version 8 is compliant to the CAIA Version 1.0.
63+
POWER9 <-----> PSL Version 9 is compliant to the CAIA Version 2.0.
64+
This PSL Version 9 provides new features such as:
65+
* Interaction with the nest MMU on the P9 chip.
66+
* Native DMA support.
67+
* Supports sending ASB_Notify messages for host thread wakeup.
68+
* Supports Atomic operations.
69+
* ....
70+
71+
Cards with a PSL9 won't work on a POWER8 system and cards with a
72+
PSL8 won't work on a POWER9 system.
6273

6374
AFU Modes
6475
=========

‎Documentation/powerpc/firmware-assisted-dump.txt‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ memory is held.
105105

106106
If there is no waiting dump data, then only the memory required
107107
to hold CPU state, HPTE region, boot memory dump and elfcore
108-
header, is reserved at the top of memory (see Fig. 1). This area
109-
is *not* released: this region will be kept permanently reserved,
110-
so that it can act as a receptacle for a copy of the boot memory
111-
content in addition to CPU state and HPTE region, in the case a
112-
crash does occur.
108+
header, is usually reserved at an offset greater than boot memory
109+
size (see Fig. 1). This area is *not* released: this region will
110+
be kept permanently reserved, so that it can act as a receptacle
111+
for a copy of the boot memory content in addition to CPU state
112+
and HPTE region, in the case a crash does occur.
113113

114114
o Memory Reservation during first kernel
115115

116-
Low memory Top of memory
116+
Low memory Top of memory
117117
0 boot memory size |
118-
| | |<--Reserved dump area -->|
119-
V V | Permanent Reservation V
120-
+-----------+----------/ /----------+---+----+-----------+----+
121-
| | |CPU|HPTE| DUMP |ELF |
122-
+-----------+----------/ /----------+---+----+-----------+----+
118+
| | |<--Reserved dump area -->| |
119+
V V | Permanent Reservation | V
120+
+-----------+----------/ /---+---+----+-----------+----+------+
121+
| | |CPU|HPTE| DUMP |ELF | |
122+
+-----------+----------/ /---+---+----+-----------+----+------+
123123
| ^
124124
| |
125125
\ /
@@ -135,12 +135,12 @@ crash does occur.
135135
0 boot memory size |
136136
| |<------------- Reserved dump area ----------- -->|
137137
V V V
138-
+-----------+----------/ /----------+---+----+-----------+----+
139-
| | |CPU|HPTE| DUMP |ELF |
140-
+-----------+----------/ /----------+---+----+-----------+----+
141-
| |
142-
V V
143-
Used by second /proc/vmcore
138+
+-----------+----------/ /---+---+----+-----------+----+------+
139+
| | |CPU|HPTE| DUMP |ELF | |
140+
+-----------+----------/ /---+---+----+-----------+----+------+
141+
| |
142+
V V
143+
Used by second /proc/vmcore
144144
kernel to boot
145145
Fig. 2
146146

‎MAINTAINERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5310,6 +5310,7 @@ M: Scott Wood <oss@buserror.net>
53105310
L: linuxppc-dev@lists.ozlabs.org
53115311
L: linux-arm-kernel@lists.infradead.org
53125312
S: Maintained
5313+
F: Documentation/devicetree/bindings/powerpc/fsl/
53135314
F: drivers/soc/fsl/
53145315
F: include/linux/fsl/
53155316

@@ -7568,7 +7569,7 @@ Q: http://patchwork.ozlabs.org/project/linuxppc-dev/list/
75687569
T: git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
75697570
S: Supported
75707571
F: Documentation/ABI/stable/sysfs-firmware-opal-*
7571-
F: Documentation/devicetree/bindings/powerpc/opal/
7572+
F: Documentation/devicetree/bindings/powerpc/
75727573
F: Documentation/devicetree/bindings/rtc/rtc-opal.txt
75737574
F: Documentation/devicetree/bindings/i2c/i2c-opal.txt
75747575
F: Documentation/powerpc/

‎arch/powerpc/Kconfig‎

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,48 @@ config MMU
2222
bool
2323
default y
2424

25+
config ARCH_MMAP_RND_BITS_MAX
26+
# On Book3S 64, the default virtual address space for 64-bit processes
27+
# is 2^47 (128TB). As a maximum, allow randomisation to consume up to
28+
# 32T of address space (2^45), which should ensure a reasonable gap
29+
# between bottom-up and top-down allocations for applications that
30+
# consume "normal" amounts of address space. Book3S 64 only supports 64K
31+
# and 4K page sizes.
32+
default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
33+
default 33 if PPC_BOOK3S_64 # 33 = 45 (32T) - 12 (4K)
34+
#
35+
# On all other 64-bit platforms (currently only Book3E), the virtual
36+
# address space is 2^46 (64TB). Allow randomisation to consume up to 16T
37+
# of address space (2^44). Only 4K page sizes are supported.
38+
default 32 if 64BIT # 32 = 44 (16T) - 12 (4K)
39+
#
40+
# For 32-bit, use the compat values, as they're the same.
41+
default ARCH_MMAP_RND_COMPAT_BITS_MAX
42+
43+
config ARCH_MMAP_RND_BITS_MIN
44+
# Allow randomisation to consume up to 1GB of address space (2^30).
45+
default 14 if 64BIT && PPC_64K_PAGES # 14 = 30 (1GB) - 16 (64K)
46+
default 18 if 64BIT # 18 = 30 (1GB) - 12 (4K)
47+
#
48+
# For 32-bit, use the compat values, as they're the same.
49+
default ARCH_MMAP_RND_COMPAT_BITS_MIN
50+
51+
config ARCH_MMAP_RND_COMPAT_BITS_MAX
52+
# Total virtual address space for 32-bit processes is 2^31 (2GB).
53+
# Allow randomisation to consume up to 512MB of address space (2^29).
54+
default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
55+
default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
56+
default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
57+
default 17 # 17 = 29 (512MB) - 12 (4K)
58+
59+
config ARCH_MMAP_RND_COMPAT_BITS_MIN
60+
# Total virtual address space for 32-bit processes is 2^31 (2GB).
61+
# Allow randomisation to consume up to 8MB of address space (2^23).
62+
default 5 if PPC_256K_PAGES # 5 = 23 (8MB) - 18 (256K)
63+
default 7 if PPC_64K_PAGES # 7 = 23 (8MB) - 16 (64K)
64+
default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
65+
default 11 # 11 = 23 (8MB) - 12 (4K)
66+
2567
config HAVE_SETUP_PER_CPU_AREA
2668
def_bool PPC64
2769

@@ -38,6 +80,11 @@ config NR_IRQS
3880
/proc/interrupts. If you configure your system to have too few,
3981
drivers will fail to load or worse - handle with care.
4082

83+
config NMI_IPI
84+
bool
85+
depends on SMP && (DEBUGGER || KEXEC_CORE)
86+
default y
87+
4188
config STACKTRACE_SUPPORT
4289
bool
4390
default y
@@ -119,6 +166,8 @@ config PPC
119166
select HAVE_ARCH_AUDITSYSCALL
120167
select HAVE_ARCH_JUMP_LABEL
121168
select HAVE_ARCH_KGDB
169+
select HAVE_ARCH_MMAP_RND_BITS
170+
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
122171
select HAVE_ARCH_SECCOMP_FILTER
123172
select HAVE_ARCH_TRACEHOOK
124173
select HAVE_CBPF_JIT if !PPC64
@@ -141,6 +190,7 @@ config PPC
141190
select HAVE_IRQ_EXIT_ON_IRQ_STACK
142191
select HAVE_KERNEL_GZIP
143192
select HAVE_KPROBES
193+
select HAVE_KPROBES_ON_FTRACE
144194
select HAVE_KRETPROBES
145195
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
146196
select HAVE_MEMBLOCK
@@ -489,7 +539,7 @@ config KEXEC_FILE
489539

490540
config RELOCATABLE
491541
bool "Build a relocatable kernel"
492-
depends on (PPC64 && !COMPILE_TEST) || (FLATMEM && (44x || FSL_BOOKE))
542+
depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
493543
select NONSTATIC_KERNEL
494544
select MODULE_REL_CRCS if MODVERSIONS
495545
help
@@ -523,7 +573,7 @@ config RELOCATABLE_TEST
523573
config CRASH_DUMP
524574
bool "Build a kdump crash kernel"
525575
depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
526-
select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
576+
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
527577
help
528578
Build a kernel suitable for use as a kdump capture kernel.
529579
The same kernel binary can be used as production kernel and dump
@@ -585,7 +635,7 @@ config ARCH_SPARSEMEM_ENABLE
585635

586636
config ARCH_SPARSEMEM_DEFAULT
587637
def_bool y
588-
depends on (SMP && PPC_PSERIES) || PPC_PS3
638+
depends on PPC_BOOK3S_64
589639

590640
config SYS_SUPPORTS_HUGETLBFS
591641
bool
@@ -677,6 +727,16 @@ config PPC_256K_PAGES
677727

678728
endchoice
679729

730+
config THREAD_SHIFT
731+
int "Thread shift" if EXPERT
732+
range 13 15
733+
default "15" if PPC_256K_PAGES
734+
default "14" if PPC64
735+
default "13"
736+
help
737+
Used to define the stack size. The default is almost always what you
738+
want. Only change this if you know what you are doing.
739+
680740
config FORCE_MAX_ZONEORDER
681741
int "Maximum zone order"
682742
range 8 9 if PPC64 && PPC_64K_PAGES

‎arch/powerpc/Makefile‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64
136136
endif
137137

138138
ifdef CONFIG_MPROFILE_KERNEL
139-
ifeq ($(shell $(srctree)/arch/powerpc/scripts/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__),OK)
139+
ifeq ($(shell $(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__),OK)
140140
CC_FLAGS_FTRACE := -pg -mprofile-kernel
141141
KBUILD_CPPFLAGS += -DCC_USING_MPROFILE_KERNEL
142142
else
@@ -274,17 +274,6 @@ PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2)
274274

275275
boot := arch/$(ARCH)/boot
276276

277-
ifeq ($(CONFIG_RELOCATABLE),y)
278-
quiet_cmd_relocs_check = CALL $<
279-
cmd_relocs_check = $(CONFIG_SHELL) $< "$(OBJDUMP)" "$(obj)/vmlinux"
280-
281-
PHONY += relocs_check
282-
relocs_check: arch/powerpc/relocs_check.sh vmlinux
283-
$(call cmd,relocs_check)
284-
285-
zImage: relocs_check
286-
endif
287-
288277
$(BOOT_TARGETS1): vmlinux
289278
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
290279
$(BOOT_TARGETS2): vmlinux

‎arch/powerpc/Makefile.postlink‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ===========================================================================
2+
# Post-link powerpc pass
3+
# ===========================================================================
4+
#
5+
# 1. Check that vmlinux relocations look sane
6+
7+
PHONY := __archpost
8+
__archpost:
9+
10+
include include/config/auto.conf
11+
include scripts/Kbuild.include
12+
13+
quiet_cmd_relocs_check = CHKREL $@
14+
cmd_relocs_check = $(CONFIG_SHELL) $(srctree)/arch/powerpc/tools/relocs_check.sh "$(OBJDUMP)" "$@"
15+
16+
# `@true` prevents complaint when there is nothing to be done
17+
18+
vmlinux: FORCE
19+
@true
20+
ifdef CONFIG_RELOCATABLE
21+
$(call if_changed,relocs_check)
22+
endif
23+
24+
%.ko: FORCE
25+
@true
26+
27+
clean:
28+
@true
29+
30+
PHONY += FORCE clean
31+
32+
FORCE:
33+
34+
.PHONY: $(PHONY)

‎arch/powerpc/configs/powernv_defconfig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CONFIG_BLK_DEV_INITRD=y
3333
CONFIG_BPF_SYSCALL=y
3434
# CONFIG_COMPAT_BRK is not set
3535
CONFIG_PROFILING=y
36-
CONFIG_OPROFILE=y
36+
CONFIG_OPROFILE=m
3737
CONFIG_KPROBES=y
3838
CONFIG_JUMP_LABEL=y
3939
CONFIG_MODULES=y
@@ -261,7 +261,7 @@ CONFIG_NILFS2_FS=m
261261
CONFIG_AUTOFS4_FS=m
262262
CONFIG_FUSE_FS=m
263263
CONFIG_OVERLAY_FS=m
264-
CONFIG_ISO9660_FS=m
264+
CONFIG_ISO9660_FS=y
265265
CONFIG_UDF_FS=m
266266
CONFIG_MSDOS_FS=y
267267
CONFIG_VFAT_FS=m
@@ -306,7 +306,7 @@ CONFIG_CRYPTO_TEST=m
306306
CONFIG_CRYPTO_CCM=m
307307
CONFIG_CRYPTO_PCBC=m
308308
CONFIG_CRYPTO_HMAC=y
309-
CONFIG_CRYPT_CRC32C_VPMSUM=m
309+
CONFIG_CRYPTO_CRC32C_VPMSUM=m
310310
CONFIG_CRYPTO_MD5_PPC=m
311311
CONFIG_CRYPTO_MICHAEL_MIC=m
312312
CONFIG_CRYPTO_SHA256=y

‎arch/powerpc/configs/ppc64_defconfig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIG_BLK_DEV_INITRD=y
1919
CONFIG_BPF_SYSCALL=y
2020
# CONFIG_COMPAT_BRK is not set
2121
CONFIG_PROFILING=y
22-
CONFIG_OPROFILE=y
22+
CONFIG_OPROFILE=m
2323
CONFIG_KPROBES=y
2424
CONFIG_JUMP_LABEL=y
2525
CONFIG_MODULES=y
@@ -290,7 +290,7 @@ CONFIG_NILFS2_FS=m
290290
CONFIG_AUTOFS4_FS=m
291291
CONFIG_FUSE_FS=m
292292
CONFIG_OVERLAY_FS=m
293-
CONFIG_ISO9660_FS=m
293+
CONFIG_ISO9660_FS=y
294294
CONFIG_UDF_FS=m
295295
CONFIG_MSDOS_FS=y
296296
CONFIG_VFAT_FS=m
@@ -339,7 +339,7 @@ CONFIG_PPC_EARLY_DEBUG=y
339339
CONFIG_CRYPTO_TEST=m
340340
CONFIG_CRYPTO_PCBC=m
341341
CONFIG_CRYPTO_HMAC=y
342-
CONFIG_CRYPT_CRC32C_VPMSUM=m
342+
CONFIG_CRYPTO_CRC32C_VPMSUM=m
343343
CONFIG_CRYPTO_MD5_PPC=m
344344
CONFIG_CRYPTO_MICHAEL_MIC=m
345345
CONFIG_CRYPTO_SHA256=y

‎arch/powerpc/configs/pseries_defconfig‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ CONFIG_BLK_DEV_INITRD=y
3434
CONFIG_BPF_SYSCALL=y
3535
# CONFIG_COMPAT_BRK is not set
3636
CONFIG_PROFILING=y
37-
CONFIG_OPROFILE=y
37+
CONFIG_OPROFILE=m
3838
CONFIG_KPROBES=y
3939
CONFIG_JUMP_LABEL=y
4040
CONFIG_MODULES=y
@@ -259,7 +259,7 @@ CONFIG_NILFS2_FS=m
259259
CONFIG_AUTOFS4_FS=m
260260
CONFIG_FUSE_FS=m
261261
CONFIG_OVERLAY_FS=m
262-
CONFIG_ISO9660_FS=m
262+
CONFIG_ISO9660_FS=y
263263
CONFIG_UDF_FS=m
264264
CONFIG_MSDOS_FS=y
265265
CONFIG_VFAT_FS=m
@@ -303,7 +303,7 @@ CONFIG_XMON=y
303303
CONFIG_CRYPTO_TEST=m
304304
CONFIG_CRYPTO_PCBC=m
305305
CONFIG_CRYPTO_HMAC=y
306-
CONFIG_CRYPT_CRC32C_VPMSUM=m
306+
CONFIG_CRYPTO_CRC32C_VPMSUM=m
307307
CONFIG_CRYPTO_MD5_PPC=m
308308
CONFIG_CRYPTO_MICHAEL_MIC=m
309309
CONFIG_CRYPTO_SHA256=y

0 commit comments

Comments
 (0)