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

Commit a92f63cd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc fixes from Michael Ellerman:
 "Mostly fairly minor, of note are:

   - Fix percpu allocations to be NUMA aware

   - Limit 4k page size config to 64TB virtual address space

   - Avoid needlessly restoring FP and vector registers

  Thanks to Aneesh Kumar K.V, Breno Leitao, Christophe Leroy, Frederic
  Barrat, Madhavan Srinivasan, Michael Bringmann, Nicholas Piggin,
  Vaibhav Jain"

* tag 'powerpc-4.12-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/book3s64: Move PPC_DT_CPU_FTRs and enable it by default
  powerpc/mm/4k: Limit 4k page size config to 64TB virtual address space
  cxl: Fix error path on bad ioctl
  powerpc/perf: Fix Power9 test_adder fields
  powerpc/numa: Fix percpu allocations to be NUMA aware
  cxl: Avoid double free_irq() for psl,slice interrupts
  powerpc/kernel: Initialize load_tm on task creation
  powerpc/kernel: Fix FP and vector register restoration
  powerpc/64: Reclaim CPU_FTR_SUBCORE
  powerpc/hotplug-mem: Fix missing endian conversion of aa_index
  powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function
  powerpc/spufs: Fix coredump of SPU contexts
  powerpc/64s: Add dt_cpu_ftrs boot time setup option
parents 788a73f4 c6ee9619
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -866,6 +866,15 @@

	dscc4.setup=	[NET]

	dt_cpu_ftrs=	[PPC]
			Format: {"off" | "known"}
			Control how the dt_cpu_ftrs device-tree binding is
			used for CPU feature discovery and setup (if it
			exists).
			off: Do not use it, fall back to legacy cpu table.
			known: Do not pass through unknown features to guests
			or userspace, only those that the kernel is aware of.

	dump_apple_properties	[X86]
			Dump name and content of EFI device properties on
			x86 Macs.  Useful for driver authors to determine
+0 −16
Original line number Diff line number Diff line
@@ -380,22 +380,6 @@ source "arch/powerpc/platforms/Kconfig"

menu "Kernel options"

config PPC_DT_CPU_FTRS
	bool "Device-tree based CPU feature discovery & setup"
	depends on PPC_BOOK3S_64
	default n
	help
	  This enables code to use a new device tree binding for describing CPU
	  compatibility and features. Saying Y here will attempt to use the new
	  binding if the firmware provides it. Currently only the skiboot
	  firmware provides this binding.
	  If you're not sure say Y.

config PPC_CPUFEATURES_ENABLE_UNKNOWN
	bool "cpufeatures pass through unknown features to guest/userspace"
	depends on PPC_DT_CPU_FTRS
	default y

config HIGHMEM
	bool "High memory support"
	depends on PPC32
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
#define H_PTE_INDEX_SIZE  9
#define H_PMD_INDEX_SIZE  7
#define H_PUD_INDEX_SIZE  9
#define H_PGD_INDEX_SIZE  12
#define H_PGD_INDEX_SIZE  9

#ifndef __ASSEMBLY__
#define H_PTE_TABLE_SIZE	(sizeof(pte_t) << H_PTE_INDEX_SIZE)
+1 −2
Original line number Diff line number Diff line
@@ -214,7 +214,6 @@ enum {
#define CPU_FTR_DAWR			LONG_ASM_CONST(0x0400000000000000)
#define CPU_FTR_DABRX			LONG_ASM_CONST(0x0800000000000000)
#define CPU_FTR_PMAO_BUG		LONG_ASM_CONST(0x1000000000000000)
#define CPU_FTR_SUBCORE			LONG_ASM_CONST(0x2000000000000000)
#define CPU_FTR_POWER9_DD1		LONG_ASM_CONST(0x4000000000000000)

#ifndef __ASSEMBLY__
@@ -463,7 +462,7 @@ enum {
	    CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \
	    CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \
	    CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \
	    CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP | CPU_FTR_SUBCORE)
	    CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP)
#define CPU_FTRS_POWER8E (CPU_FTRS_POWER8 | CPU_FTR_PMAO_BUG)
#define CPU_FTRS_POWER8_DD1 (CPU_FTRS_POWER8 & ~CPU_FTR_DBELL)
#define CPU_FTRS_POWER9 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
+12 −13
Original line number Diff line number Diff line
@@ -110,13 +110,18 @@ void release_thread(struct task_struct *);
#define TASK_SIZE_128TB (0x0000800000000000UL)
#define TASK_SIZE_512TB (0x0002000000000000UL)

#ifdef CONFIG_PPC_BOOK3S_64
/*
 * For now 512TB is only supported with book3s and 64K linux page size.
 */
#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_PPC_64K_PAGES)
/*
 * Max value currently used:
 */
#define TASK_SIZE_USER64		TASK_SIZE_512TB
#define DEFAULT_MAP_WINDOW_USER64	TASK_SIZE_128TB
#else
#define TASK_SIZE_USER64		TASK_SIZE_64TB
#define DEFAULT_MAP_WINDOW_USER64	TASK_SIZE_64TB
#endif

/*
@@ -132,7 +137,7 @@ void release_thread(struct task_struct *);
 * space during mmap's.
 */
#define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(TASK_SIZE_USER32 / 4))
#define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(TASK_SIZE_128TB / 4))
#define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(DEFAULT_MAP_WINDOW_USER64 / 4))

#define TASK_UNMAPPED_BASE ((is_32bit_task()) ? \
		TASK_UNMAPPED_BASE_USER32 : TASK_UNMAPPED_BASE_USER64 )
@@ -144,20 +149,14 @@ void release_thread(struct task_struct *);
 */
#ifdef CONFIG_PPC_BOOK3S_64
#define DEFAULT_MAP_WINDOW	((is_32bit_task()) ?			\
				 TASK_SIZE_USER32 : TASK_SIZE_128TB)
				 TASK_SIZE_USER32 : DEFAULT_MAP_WINDOW_USER64)
#else
#define DEFAULT_MAP_WINDOW	TASK_SIZE
#endif

#ifdef __powerpc64__

#ifdef CONFIG_PPC_BOOK3S_64
/* Limit stack to 128TB */
#define STACK_TOP_USER64 TASK_SIZE_128TB
#else
#define STACK_TOP_USER64 TASK_SIZE_USER64
#endif

#define STACK_TOP_USER64 DEFAULT_MAP_WINDOW_USER64
#define STACK_TOP_USER32 TASK_SIZE_USER32

#define STACK_TOP (is_32bit_task() ? \
Loading