Commit 7ae77150 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 084623e4 1395375c
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -22,6 +22,27 @@ Description:
		Exposes the "version" field of the 24x7 catalog. This is also
		extractable from the provided binary "catalog" sysfs entry.

What:		/sys/devices/hv_24x7/interface/sockets
Date:		May 2020
Contact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description:	read only
		This sysfs interface exposes the number of sockets present in the
		system.

What:		/sys/devices/hv_24x7/interface/chipspersocket
Date:		May 2020
Contact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description:	read only
		This sysfs interface exposes the number of chips per socket
		present in the system.

What:		/sys/devices/hv_24x7/interface/coresperchip
Date:		May 2020
Contact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
Description:	read only
		This sysfs interface exposes the number of cores per chip
		present in the system.

What:		/sys/bus/event_source/devices/hv_24x7/event_descs/<event-name>
Date:		February 2014
Contact:	Linux on PowerPC Developer List <linuxppc-dev@lists.ozlabs.org>
+39 −0
Original line number Diff line number Diff line
@@ -574,3 +574,42 @@ Description: Secure Virtual Machine
		If 1, it means the system is using the Protected Execution
		Facility in POWER9 and newer processors. i.e., it is a Secure
		Virtual Machine.

What: 		/sys/devices/system/cpu/cpuX/purr
Date:		Apr 2005
Contact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
Description:	PURR ticks for this CPU since the system boot.

		The Processor Utilization Resources Register (PURR) is
		a 64-bit counter which provides an estimate of the
		resources used by the CPU thread. The contents of this
		register increases monotonically. This sysfs interface
		exposes the number of PURR ticks for cpuX.

What: 		/sys/devices/system/cpu/cpuX/spurr
Date:		Dec 2006
Contact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
Description:	SPURR ticks for this CPU since the system boot.

		The Scaled Processor Utilization Resources Register
		(SPURR) is a 64-bit counter that provides a frequency
		invariant estimate of the resources used by the CPU
		thread. The contents of this register increases
		monotonically. This sysfs interface exposes the number
		of SPURR ticks for cpuX.

What: 		/sys/devices/system/cpu/cpuX/idle_purr
Date:		Apr 2020
Contact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
Description:	PURR ticks for cpuX when it was idle.

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

What: 		/sys/devices/system/cpu/cpuX/idle_spurr
Date:		Apr 2020
Contact:	Linux for PowerPC mailing list <linuxppc-dev@ozlabs.org>
Description:	SPURR ticks for cpuX when it was idle.

		This sysfs interface exposes the number of SPURR ticks
		for cpuX when it was idle.
+5 −0
Original line number Diff line number Diff line
@@ -874,6 +874,11 @@
			can be useful when debugging issues that require an SLB
			miss to occur.

	stress_slb	[PPC]
			Limits the number of kernel SLB entries, and flushes
			them frequently to increase the rate of SLB faults
			on kernel addresses.

	disable=	[IPV6]
			See Documentation/networking/ipv6.rst.

+0 −143
Original line number Diff line number Diff line
@@ -86,149 +86,6 @@
		xlnx,use-parity = <0>;
	};

   Some IP cores actually implement 2 or more logical devices.  In
   this case, the device should still describe the whole IP core with
   a single node and add a child node for each logical device.  The
   ranges property can be used to translate from parent IP-core to the
   registers of each device.  In addition, the parent node should be
   compatible with the bus type 'xlnx,compound', and should contain
   #address-cells and #size-cells, as with any other bus.  (Note: this
   makes the assumption that both logical devices have the same bus
   binding.  If this is not true, then separate nodes should be used
   for each logical device).  The 'cell-index' property can be used to
   enumerate logical devices within an IP core.  For example, the
   following is the system.mhs entry for the dual ps2 controller found
   on the ml403 reference design.

	BEGIN opb_ps2_dual_ref
		PARAMETER INSTANCE = opb_ps2_dual_ref_0
		PARAMETER HW_VER = 1.00.a
		PARAMETER C_BASEADDR = 0xA9000000
		PARAMETER C_HIGHADDR = 0xA9001FFF
		BUS_INTERFACE SOPB = opb_v20_0
		PORT Sys_Intr1 = ps2_1_intr
		PORT Sys_Intr2 = ps2_2_intr
		PORT Clkin1 = ps2_clk_rx_1
		PORT Clkin2 = ps2_clk_rx_2
		PORT Clkpd1 = ps2_clk_tx_1
		PORT Clkpd2 = ps2_clk_tx_2
		PORT Rx1 = ps2_d_rx_1
		PORT Rx2 = ps2_d_rx_2
		PORT Txpd1 = ps2_d_tx_1
		PORT Txpd2 = ps2_d_tx_2
	END

   It would result in the following device tree nodes:

	opb_ps2_dual_ref_0: opb-ps2-dual-ref@a9000000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "xlnx,compound";
		ranges = <0 a9000000 2000>;
		// If this device had extra parameters, then they would
		// go here.
		ps2@0 {
			compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
			reg = <0 40>;
			interrupt-parent = <&opb_intc_0>;
			interrupts = <3 0>;
			cell-index = <0>;
		};
		ps2@1000 {
			compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
			reg = <1000 40>;
			interrupt-parent = <&opb_intc_0>;
			interrupts = <3 0>;
			cell-index = <0>;
		};
	};

   Also, the system.mhs file defines bus attachments from the processor
   to the devices.  The device tree structure should reflect the bus
   attachments.  Again an example; this system.mhs fragment:

	BEGIN ppc405_virtex4
		PARAMETER INSTANCE = ppc405_0
		PARAMETER HW_VER = 1.01.a
		BUS_INTERFACE DPLB = plb_v34_0
		BUS_INTERFACE IPLB = plb_v34_0
	END

	BEGIN opb_intc
		PARAMETER INSTANCE = opb_intc_0
		PARAMETER HW_VER = 1.00.c
		PARAMETER C_BASEADDR = 0xD1000FC0
		PARAMETER C_HIGHADDR = 0xD1000FDF
		BUS_INTERFACE SOPB = opb_v20_0
	END

	BEGIN opb_uart16550
		PARAMETER INSTANCE = opb_uart16550_0
		PARAMETER HW_VER = 1.00.d
		PARAMETER C_BASEADDR = 0xa0000000
		PARAMETER C_HIGHADDR = 0xa0001FFF
		BUS_INTERFACE SOPB = opb_v20_0
	END

	BEGIN plb_v34
		PARAMETER INSTANCE = plb_v34_0
		PARAMETER HW_VER = 1.02.a
	END

	BEGIN plb_bram_if_cntlr
		PARAMETER INSTANCE = plb_bram_if_cntlr_0
		PARAMETER HW_VER = 1.00.b
		PARAMETER C_BASEADDR = 0xFFFF0000
		PARAMETER C_HIGHADDR = 0xFFFFFFFF
		BUS_INTERFACE SPLB = plb_v34_0
	END

	BEGIN plb2opb_bridge
		PARAMETER INSTANCE = plb2opb_bridge_0
		PARAMETER HW_VER = 1.01.a
		PARAMETER C_RNG0_BASEADDR = 0x20000000
		PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
		PARAMETER C_RNG1_BASEADDR = 0x60000000
		PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
		PARAMETER C_RNG2_BASEADDR = 0x80000000
		PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
		PARAMETER C_RNG3_BASEADDR = 0xC0000000
		PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
		BUS_INTERFACE SPLB = plb_v34_0
		BUS_INTERFACE MOPB = opb_v20_0
	END

   Gives this device tree (some properties removed for clarity):

	plb@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "xlnx,plb-v34-1.02.a";
		device_type = "ibm,plb";
		ranges; // 1:1 translation

		plb_bram_if_cntrl_0: bram@ffff0000 {
			reg = <ffff0000 10000>;
		}

		opb@20000000 {
			#address-cells = <1>;
			#size-cells = <1>;
			ranges = <20000000 20000000 20000000
				  60000000 60000000 20000000
				  80000000 80000000 40000000
				  c0000000 c0000000 20000000>;

			opb_uart16550_0: serial@a0000000 {
				reg = <a00000000 2000>;
			};

			opb_intc_0: interrupt-controller@d1000fc0 {
				reg = <d1000fc0 20>;
			};
		};
	};

   That covers the general approach to binding xilinx IP cores into the
   device tree.  The following are bindings for specific devices:

+2 −26
Original line number Diff line number Diff line
@@ -70,28 +70,6 @@ Currently, the following image format targets exist:
			kernel with this image type and it depends entirely on
			the embedded device tree for all information.

			The simpleImage is useful for booting systems with
			an unknown firmware interface or for booting from
			a debugger when no firmware is present (such as on
			the Xilinx Virtex platform).  The only assumption that
			simpleImage makes is that RAM is correctly initialized
			and that the MMU is either off or has RAM mapped to
			base address 0.

			simpleImage also supports inserting special platform
			specific initialization code to the start of the bootup
			sequence.  The virtex405 platform uses this feature to
			ensure that the cache is invalidated before caching
			is enabled.  Platform specific initialization code is
			added as part of the wrapper script and is keyed on
			the image target name.  For example, all
			simpleImage.virtex405-* targets will add the
			virtex405-head.S initialization code (This also means
			that the dts file for virtex405 targets should be
			named (virtex405-<board>.dts).  Search the wrapper
			script for 'virtex405' and see the file
			arch/powerpc/boot/virtex405-head.S for details.

   treeImage.%;		Image format for used with OpenBIOS firmware found
			on some ppc4xx hardware.  This image embeds a device
			tree blob inside the image.
@@ -116,10 +94,8 @@ Image types which embed a device tree blob (simpleImage, dtbImage, treeImage,
and cuImage) all generate the device tree blob from a file in the
arch/powerpc/boot/dts/ directory.  The Makefile selects the correct device
tree source based on the name of the target.  Therefore, if the kernel is
built with 'make treeImage.walnut simpleImage.virtex405-ml403', then the
build system will use arch/powerpc/boot/dts/walnut.dts to build
treeImage.walnut and arch/powerpc/boot/dts/virtex405-ml403.dts to build
the simpleImage.virtex405-ml403.
built with 'make treeImage.walnut', then the build system will use
arch/powerpc/boot/dts/walnut.dts to build treeImage.walnut.

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