Commit 6c3ac113 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull powerpc updates from Michael Ellerman:
 "Notable changes:

   - Enable THREAD_INFO_IN_TASK to move thread_info off the stack.

   - A big series from Christoph reworking our DMA code to use more of
     the generic infrastructure, as he said:
       "This series switches the powerpc port to use the generic swiotlb
        and noncoherent dma ops, and to use more generic code for the
        coherent direct mapping, as well as removing a lot of dead
        code."

   - Increase our vmalloc space to 512T with the Hash MMU on modern
     CPUs, allowing us to support machines with larger amounts of total
     RAM or distance between nodes.

   - Two series from Christophe, one to optimise TLB miss handlers on
     6xx, and another to optimise the way STRICT_KERNEL_RWX is
     implemented on some 32-bit CPUs.

   - Support for KCOV coverage instrumentation which means we can run
     syzkaller and discover even more bugs in our code.

  And as always many clean-ups, reworks and minor fixes etc.

  Thanks to: Alan Modra, Alexey Kardashevskiy, Alistair Popple, Andrea
  Arcangeli, Andrew Donnellan, Aneesh Kumar K.V, Aravinda Prasad, Balbir
  Singh, Brajeswar Ghosh, Breno Leitao, Christian Lamparter, Christian
  Zigotzky, Christophe Leroy, Christoph Hellwig, Corentin Labbe, Daniel
  Axtens, David Gibson, Diana Craciun, Firoz Khan, Gustavo A. R. Silva,
  Igor Stoppa, Joe Lawrence, Joel Stanley, Jonathan Neuschäfer, Jordan
  Niethe, Laurent Dufour, Madhavan Srinivasan, Mahesh Salgaonkar, Mark
  Cave-Ayland, Masahiro Yamada, Mathieu Malaterre, Matteo Croce, Meelis
  Roos, Michael W. Bringmann, Nathan Chancellor, Nathan Fontenot,
  Nicholas Piggin, Nick Desaulniers, Nicolai Stange, Oliver O'Halloran,
  Paul Mackerras, Peter Xu, PrasannaKumar Muralidharan, Qian Cai,
  Rashmica Gupta, Reza Arbab, Robert P. J. Day, Russell Currey,
  Sabyasachi Gupta, Sam Bobroff, Sandipan Das, Sergey Senozhatsky,
  Souptick Joarder, Stewart Smith, Tyrel Datwyler, Vaibhav Jain,
  YueHaibing"

* tag 'powerpc-5.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (200 commits)
  powerpc/32: Clear on-stack exception marker upon exception return
  powerpc: Remove export of save_stack_trace_tsk_reliable()
  powerpc/mm: fix "section_base" set but not used
  powerpc/mm: Fix "sz" set but not used warning
  powerpc/mm: Check secondary hash page table
  powerpc: remove nargs from __SYSCALL
  powerpc/64s: Fix unrelocated interrupt trampoline address test
  powerpc/powernv/ioda: Fix locked_vm counting for memory used by IOMMU tables
  powerpc/fsl: Fix the flush of branch predictor.
  powerpc/powernv: Make opal log only readable by root
  powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc
  powerpc/powernv: move OPAL call wrapper tracing and interrupt handling to C
  powerpc/64s: Fix data interrupts vs d-side MCE reentrancy
  powerpc/64s: Prepare to handle data interrupts vs d-side MCE reentrancy
  powerpc/64s: system reset interrupt preserve HSRRs
  powerpc/64s: Fix HV NMI vs HV interrupt recoverability test
  powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search
  powerpc/hugetlb: Handle mmap_min_addr correctly in get_unmapped_area callback
  selftests/powerpc: Remove duplicate header
  powerpc sstep: Add support for modsd, modud instructions
  ...
parents d72cb8c7 9580b71b
Loading
Loading
Loading
Loading
+66 −13
Original line number Diff line number Diff line
@@ -119,9 +119,6 @@ config GENERIC_HWEIGHT
	bool
	default y

config ARCH_HAS_DMA_SET_COHERENT_MASK
        bool

config PPC
	bool
	default y
@@ -131,10 +128,10 @@ config PPC
	select ARCH_32BIT_OFF_T if PPC32
	select ARCH_HAS_DEBUG_VIRTUAL
	select ARCH_HAS_DEVMEM_IS_ALLOWED
	select ARCH_HAS_DMA_SET_COHERENT_MASK
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_FORTIFY_SOURCE
	select ARCH_HAS_GCOV_PROFILE_ALL
	select ARCH_HAS_KCOV
	select ARCH_HAS_PHYS_TO_DMA
	select ARCH_HAS_PMEM_API                if PPC64
	select ARCH_HAS_PTE_SPECIAL
@@ -203,7 +200,7 @@ config PPC
	select HAVE_IOREMAP_PROT
	select HAVE_IRQ_EXIT_ON_IRQ_STACK
	select HAVE_KERNEL_GZIP
	select HAVE_KERNEL_XZ			if PPC_BOOK3S
	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
	select HAVE_KPROBES
	select HAVE_KPROBES_ON_FTRACE
	select HAVE_KRETPROBES
@@ -222,7 +219,7 @@ config PPC
	select HAVE_PERF_USER_STACK_DUMP
	select HAVE_RCU_TABLE_FREE		if SMP
	select HAVE_REGS_AND_STACK_ACCESS_API
	select HAVE_RELIABLE_STACKTRACE		if PPC64 && CPU_LITTLE_ENDIAN
	select HAVE_RELIABLE_STACKTRACE		if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
	select HAVE_SYSCALL_TRACEPOINTS
	select HAVE_VIRT_CPU_ACCOUNTING
	select HAVE_IRQ_TIME_ACCOUNTING
@@ -243,6 +240,7 @@ config PPC
	select RTC_LIB
	select SPARSE_IRQ
	select SYSCTL_EXCEPTION_TRACE
	select THREAD_INFO_IN_TASK
	select VIRT_TO_BUS			if !PPC64
	#
	# Please keep this list sorted alphabetically.
@@ -253,9 +251,6 @@ config PPC_BARRIER_NOSPEC
    default y
    depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E

config GENERIC_CSUM
	def_bool n

config EARLY_PRINTK
	bool
	default y
@@ -475,9 +470,6 @@ config ARCH_CPU_PROBE_RELEASE
config ARCH_ENABLE_MEMORY_HOTPLUG
	def_bool y

config ARCH_HAS_WALK_MEMORY
	def_bool y

config ARCH_ENABLE_MEMORY_HOTREMOVE
	def_bool y

@@ -693,7 +685,7 @@ config PPC_16K_PAGES

config PPC_64K_PAGES
	bool "64k page size"
	depends on !PPC_FSL_BOOK3E && (44x || PPC_BOOK3S_64 || PPC_BOOK3E_64)
	depends on 44x || PPC_BOOK3S_64
	select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64

config PPC_256K_PAGES
@@ -711,6 +703,13 @@ config PPC_256K_PAGES

endchoice

config PPC_PAGE_SHIFT
	int
	default 18 if PPC_256K_PAGES
	default 16 if PPC_64K_PAGES
	default 14 if PPC_16K_PAGES
	default 12

config THREAD_SHIFT
	int "Thread shift" if EXPERT
	range 13 15
@@ -721,6 +720,59 @@ config THREAD_SHIFT
	  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 ETEXT_SHIFT_BOOL
	bool "Set custom etext alignment" if STRICT_KERNEL_RWX && \
					     (PPC_BOOK3S_32 || PPC_8xx)
	depends on ADVANCED_OPTIONS
	help
	  This option allows you to set the kernel end of text alignment. When
	  RAM is mapped by blocks, the alignment needs to fit the size and
	  number of possible blocks. The default should be OK for most configs.

	  Say N here unless you know what you are doing.

config ETEXT_SHIFT
	int "_etext shift" if ETEXT_SHIFT_BOOL
	range 17 28 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
	range 19 23 if STRICT_KERNEL_RWX && PPC_8xx
	default 17 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
	default 19 if STRICT_KERNEL_RWX && PPC_8xx
	default PPC_PAGE_SHIFT
	help
	  On Book3S 32 (603+), IBATs are used to map kernel text.
	  Smaller is the alignment, greater is the number of necessary IBATs.

	  On 8xx, large pages (512kb or 8M) are used to map kernel linear
	  memory. Aligning to 8M reduces TLB misses as only 8M pages are used
	  in that case.

config DATA_SHIFT_BOOL
	bool "Set custom data alignment" if STRICT_KERNEL_RWX && \
					    (PPC_BOOK3S_32 || PPC_8xx)
	depends on ADVANCED_OPTIONS
	help
	  This option allows you to set the kernel data alignment. When
	  RAM is mapped by blocks, the alignment needs to fit the size and
	  number of possible blocks. The default should be OK for most configs.

	  Say N here unless you know what you are doing.

config DATA_SHIFT
	int "Data shift" if DATA_SHIFT_BOOL
	default 24 if STRICT_KERNEL_RWX && PPC64
	range 17 28 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
	range 19 23 if STRICT_KERNEL_RWX && PPC_8xx
	default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
	default 23 if STRICT_KERNEL_RWX && PPC_8xx
	default PPC_PAGE_SHIFT
	help
	  On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
	  Smaller is the alignment, greater is the number of necessary DBATs.

	  On 8xx, large pages (512kb or 8M) are used to map kernel linear
	  memory. Aligning to 8M reduces TLB misses as only 8M pages are used
	  in that case.

config FORCE_MAX_ZONEORDER
	int "Maximum zone order"
	range 8 9 if PPC64 && PPC_64K_PAGES
@@ -887,6 +939,7 @@ config FSL_SOC

config FSL_PCI
 	bool
	select ARCH_HAS_DMA_SET_MASK
	select PPC_INDIRECT_PCI
	select PCI_QUIRKS

+0 −4
Original line number Diff line number Diff line
@@ -361,10 +361,6 @@ config PPC_PTDUMP

	  If you are unsure, say N.

config PPC_HTDUMP
	def_bool y
	depends on PPC_PTDUMP && PPC_BOOK3S_64

config PPC_FAST_ENDIAN_SWITCH
	bool "Deprecated fast endian-switch syscall"
        depends on DEBUG_KERNEL && PPC_BOOK3S_64
+9 −2
Original line number Diff line number Diff line
@@ -213,9 +213,9 @@ endif
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)

KBUILD_CPPFLAGS	+= -Iarch/$(ARCH) $(asinstr)
KBUILD_AFLAGS	+= -Iarch/$(ARCH) $(AFLAGS-y)
KBUILD_AFLAGS	+= $(AFLAGS-y)
KBUILD_CFLAGS	+= $(call cc-option,-msoft-float)
KBUILD_CFLAGS	+= -pipe -Iarch/$(ARCH) $(CFLAGS-y)
KBUILD_CFLAGS	+= -pipe $(CFLAGS-y)
CPP		= $(CC) -E $(KBUILD_CFLAGS)

CHECKFLAGS	+= -m$(BITS) -D__powerpc__ -D__powerpc$(BITS)__
@@ -427,6 +427,13 @@ else
endif
endif

ifdef CONFIG_SMP
prepare: task_cpu_prepare

task_cpu_prepare: prepare0
	$(eval KBUILD_CFLAGS += -D_TASK_CPU=$(shell awk '{if ($$2 == "TASK_CPU") print $$3;}' include/generated/asm-offsets.h))
endif

# Check toolchain versions:
# - gcc-4.6 is the minimum kernel-wide version so nothing required.
checkbin:
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@ subdir-y += fsl

dtstree		:= $(srctree)/$(src)
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
dtb-$(CONFIG_XILINX_VIRTEX440_GENERIC_BOARD) += virtex440-ml507.dtb virtex440-ml510.dtb
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
			d-cache-size = <32768>;
			dcr-controller;
			dcr-access-method = "native";
			status = "ok";
			status = "okay";
		};
		cpu@1 {
			device_type = "cpu";
Loading