Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7246f600 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents e579dde6 700b7ead
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
    |       nios2: | TODO |
    |    openrisc: | TODO |
    |      parisc: | TODO |
    |     powerpc: | TODO |
    |     powerpc: |  ok  |
    |        s390: | TODO |
    |       score: | TODO |
    |          sh: | TODO |
+13 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Introduction
Hardware overview
=================

          POWER8               FPGA
         POWER8/9             FPGA
       +----------+        +---------+
       |          |        |         |
       |   CPU    |        |   AFU   |
@@ -34,7 +34,7 @@ Hardware overview
       |   | CAPP |<------>|         |
       +---+------+  PCIE  +---------+

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

    POWER8 <-----> PSL Version 8 is compliant to the CAIA Version 1.0.
    POWER9 <-----> PSL Version 9 is compliant to the CAIA Version 2.0.
    This PSL Version 9 provides new features such as:
    * Interaction with the nest MMU on the P9 chip.
    * Native DMA support.
    * Supports sending ASB_Notify messages for host thread wakeup.
    * Supports Atomic operations.
    * ....

    Cards with a PSL9 won't work on a POWER8 system and cards with a
    PSL8 won't work on a POWER9 system.

AFU Modes
=========
+17 −17
Original line number Diff line number Diff line
@@ -105,21 +105,21 @@ memory is held.

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

  o Memory Reservation during first kernel

  Low memory                                         Top of memory
  0      boot memory size                                       |
  |           |                       |<--Reserved dump area -->|
  V           V                       |   Permanent Reservation V
  +-----------+----------/ /----------+---+----+-----------+----+
  |           |                       |CPU|HPTE|  DUMP     |ELF |
  +-----------+----------/ /----------+---+----+-----------+----+
  |           |                |<--Reserved dump area -->|      |
  V           V                |   Permanent Reservation |      V
  +-----------+----------/ /---+---+----+-----------+----+------+
  |           |                |CPU|HPTE|  DUMP     |ELF |      |
  +-----------+----------/ /---+---+----+-----------+----+------+
        |                                           ^
        |                                           |
        \                                           /
@@ -135,9 +135,9 @@ crash does occur.
  0      boot memory size                                       |
  |           |<------------- Reserved dump area ----------- -->|
  V           V                                                 V
  +-----------+----------/ /----------+---+----+-----------+----+
  |           |                       |CPU|HPTE|  DUMP     |ELF |
  +-----------+----------/ /----------+---+----+-----------+----+
  +-----------+----------/ /---+---+----+-----------+----+------+
  |           |                |CPU|HPTE|  DUMP     |ELF |      |
  +-----------+----------/ /---+---+----+-----------+----+------+
        |                                              |
        V                                              V
   Used by second                                /proc/vmcore
+2 −1
Original line number Diff line number Diff line
@@ -5310,6 +5310,7 @@ M: Scott Wood <oss@buserror.net>
L:	linuxppc-dev@lists.ozlabs.org
L:	linux-arm-kernel@lists.infradead.org
S:	Maintained
F:	Documentation/devicetree/bindings/powerpc/fsl/
F:	drivers/soc/fsl/
F:	include/linux/fsl/

@@ -7568,7 +7569,7 @@ Q: http://patchwork.ozlabs.org/project/linuxppc-dev/list/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
S:	Supported
F:	Documentation/ABI/stable/sysfs-firmware-opal-*
F:	Documentation/devicetree/bindings/powerpc/opal/
F:	Documentation/devicetree/bindings/powerpc/
F:	Documentation/devicetree/bindings/rtc/rtc-opal.txt
F:	Documentation/devicetree/bindings/i2c/i2c-opal.txt
F:	Documentation/powerpc/
+63 −3
Original line number Diff line number Diff line
@@ -22,6 +22,48 @@ config MMU
	bool
	default y

config ARCH_MMAP_RND_BITS_MAX
	# On Book3S 64, the default virtual address space for 64-bit processes
	# is 2^47 (128TB). As a maximum, allow randomisation to consume up to
	# 32T of address space (2^45), which should ensure a reasonable gap
	# between bottom-up and top-down allocations for applications that
	# consume "normal" amounts of address space. Book3S 64 only supports 64K
	# and 4K page sizes.
	default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
	default 33 if PPC_BOOK3S_64		     # 33 = 45 (32T) - 12 (4K)
	#
	# On all other 64-bit platforms (currently only Book3E), the virtual
	# address space is 2^46 (64TB). Allow randomisation to consume up to 16T
	# of address space (2^44). Only 4K page sizes are supported.
	default 32 if 64BIT	# 32 = 44 (16T) - 12 (4K)
	#
	# For 32-bit, use the compat values, as they're the same.
	default ARCH_MMAP_RND_COMPAT_BITS_MAX

config ARCH_MMAP_RND_BITS_MIN
	# Allow randomisation to consume up to 1GB of address space (2^30).
	default 14 if 64BIT && PPC_64K_PAGES	# 14 = 30 (1GB) - 16 (64K)
	default 18 if 64BIT			# 18 = 30 (1GB) - 12 (4K)
	#
	# For 32-bit, use the compat values, as they're the same.
	default ARCH_MMAP_RND_COMPAT_BITS_MIN

config ARCH_MMAP_RND_COMPAT_BITS_MAX
	# Total virtual address space for 32-bit processes is 2^31 (2GB).
	# Allow randomisation to consume up to 512MB of address space (2^29).
	default 11 if PPC_256K_PAGES	# 11 = 29 (512MB) - 18 (256K)
	default 13 if PPC_64K_PAGES	# 13 = 29 (512MB) - 16 (64K)
	default 15 if PPC_16K_PAGES 	# 15 = 29 (512MB) - 14 (16K)
	default 17			# 17 = 29 (512MB) - 12 (4K)

config ARCH_MMAP_RND_COMPAT_BITS_MIN
	# Total virtual address space for 32-bit processes is 2^31 (2GB).
	# Allow randomisation to consume up to 8MB of address space (2^23).
	default 5 if PPC_256K_PAGES	#  5 = 23 (8MB) - 18 (256K)
	default 7 if PPC_64K_PAGES	#  7 = 23 (8MB) - 16 (64K)
	default 9 if PPC_16K_PAGES	#  9 = 23 (8MB) - 14 (16K)
	default 11			# 11 = 23 (8MB) - 12 (4K)

config HAVE_SETUP_PER_CPU_AREA
	def_bool PPC64

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

config NMI_IPI
	bool
	depends on SMP && (DEBUGGER || KEXEC_CORE)
	default y

config STACKTRACE_SUPPORT
	bool
	default y
@@ -119,6 +166,8 @@ config PPC
	select HAVE_ARCH_AUDITSYSCALL
	select HAVE_ARCH_JUMP_LABEL
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_MMAP_RND_BITS
	select HAVE_ARCH_MMAP_RND_COMPAT_BITS	if COMPAT
	select HAVE_ARCH_SECCOMP_FILTER
	select HAVE_ARCH_TRACEHOOK
	select HAVE_CBPF_JIT			if !PPC64
@@ -141,6 +190,7 @@ config PPC
	select HAVE_IRQ_EXIT_ON_IRQ_STACK
	select HAVE_KERNEL_GZIP
	select HAVE_KPROBES
	select HAVE_KPROBES_ON_FTRACE
	select HAVE_KRETPROBES
	select HAVE_LIVEPATCH			if HAVE_DYNAMIC_FTRACE_WITH_REGS
	select HAVE_MEMBLOCK
@@ -489,7 +539,7 @@ config KEXEC_FILE

config RELOCATABLE
	bool "Build a relocatable kernel"
	depends on (PPC64 && !COMPILE_TEST) || (FLATMEM && (44x || FSL_BOOKE))
	depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
	select NONSTATIC_KERNEL
	select MODULE_REL_CRCS if MODVERSIONS
	help
@@ -523,7 +573,7 @@ config RELOCATABLE_TEST
config CRASH_DUMP
	bool "Build a kdump crash kernel"
	depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
	select RELOCATABLE if (PPC64 && !COMPILE_TEST) || 44x || FSL_BOOKE
	select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
	help
	  Build a kernel suitable for use as a kdump capture kernel.
	  The same kernel binary can be used as production kernel and dump
@@ -585,7 +635,7 @@ config ARCH_SPARSEMEM_ENABLE

config ARCH_SPARSEMEM_DEFAULT
	def_bool y
	depends on (SMP && PPC_PSERIES) || PPC_PS3
	depends on PPC_BOOK3S_64

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

endchoice

config THREAD_SHIFT
	int "Thread shift" if EXPERT
	range 13 15
	default "15" if PPC_256K_PAGES
	default "14" if PPC64
	default "13"
	help
	  Used to define the stack size. The default is almost always what you
	  want. Only change this if you know what you are doing.

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	range 8 9 if PPC64 && PPC_64K_PAGES
Loading