Merge tag 'powerpc-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 May 2017 18:36:44 +0000 (11:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 May 2017 18:36:44 +0000 (11:36 -0700)
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
  ...

22 files changed:
1  2 
Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
MAINTAINERS
arch/powerpc/Kconfig
arch/powerpc/configs/ppc64_defconfig
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/include/asm/thread_info.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/idle_book3s.S
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/vmlinux.lds.S
arch/powerpc/mm/init_64.c
drivers/misc/cxl/pci.c
drivers/vfio/vfio_iommu_spapr_tce.c
include/linux/kprobes.h
include/linux/of.h
include/uapi/linux/perf_event.h
kernel/kprobes.c
tools/include/uapi/linux/perf_event.h
tools/testing/selftests/powerpc/Makefile

diff --cc MAINTAINERS
Simple merge
index 053382616533a808b0736fe0f04c2e5cf2db9d1c,67ee6731f4e9bd21e5661f7ace965b4f94a430f7..f07f727cbfd211cdf29375cd6ad3faa7012b0652
@@@ -117,8 -164,11 +164,10 @@@ config PP
        select GENERIC_STRNLEN_USER
        select GENERIC_TIME_VSYSCALL_OLD
        select HAVE_ARCH_AUDITSYSCALL
 -      select HAVE_ARCH_HARDENED_USERCOPY
        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
Simple merge
index ed3beadd2cc515d1b8a99b4836b3f06c1a97a87c,38c5c0b33af992ce9d48018b96c4bd44ddbd902d..183d73b6ed99f464801603573661aa4488fba3e9
@@@ -265,12 -266,9 +266,9 @@@ END_FTR_SECTION_NESTED(ftr,ftr,943
  #define BRANCH_TO_COMMON(reg, label)                                  \
        b       label
  
 -#define BRANCH_LINK_TO_FAR(reg, label)                                        \
 +#define BRANCH_LINK_TO_FAR(label)                                     \
        bl      label
  
- #define BRANCH_TO_KVM(reg, label)                                     \
-       b       label
  #define __BRANCH_TO_KVM_EXIT(area, label)                             \
        ld      r9,area+EX_R9(r13);                                     \
        b       label
Simple merge
Simple merge
index 6fd08219248db7485a6d5c8227dee83664d29b38,0cdee271dd932e613f7dcbf70897a37d072425a2..07d4e0ad60db5b1a1f2cd5da08763a3acea7ea3b
@@@ -444,28 -533,19 +533,33 @@@ pnv_restore_hyp_resource_arch207
   *
   * r13 - PACA
   * cr3 - gt if waking up with partial/complete hypervisor state loss
+  *
+  * If ISA300:
   * cr4 - gt or eq if waking up from complete hypervisor state loss.
+  *
+  * If ISA207:
+  * r4 - PACA_THREAD_IDLE_STATE
   */
- _GLOBAL(pnv_wakeup_tb_loss)
+ pnv_wakeup_tb_loss:
        ld      r1,PACAR1(r13)
        /*
 -       * Before entering any idle state, the NVGPRs are saved in the stack
 -       * and they are restored before switching to the process context. Hence
 -       * until they are restored, they are free to be used.
 +       * Before entering any idle state, the NVGPRs are saved in the stack.
 +       * If there was a state loss, or PACA_NAPSTATELOST was set, then the
 +       * NVGPRs are restored. If we are here, it is likely that state is lost,
 +       * but not guaranteed -- neither ISA207 nor ISA300 tests to reach
 +       * here are the same as the test to restore NVGPRS:
 +       * PACA_THREAD_IDLE_STATE test for ISA207, PSSCR test for ISA300,
 +       * and SRR1 test for restoring NVGPRs.
 +       *
 +       * We are about to clobber NVGPRs now, so set NAPSTATELOST to
 +       * guarantee they will always be restored. This might be tightened
 +       * with careful reading of specs (particularly for ISA300) but this
 +       * is already a slow wakeup path and it's simpler to be safe.
 +       */
 +      li      r0,1
 +      stb     r0,PACA_NAPSTATELOST(r13)
 +
 +      /*
         *
         * Save SRR1 and LR in NVGPRs as they might be clobbered in
         * opal_call() (called in CHECK_HMI_INTERRUPT). SRR1 is required
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d733479a10eeebc79250cf3905437a082b7300c9,406889889ce55336102a3547f87f248aeaf4d340..7367e0ec6f8188973a0ee63539cd9a8485e47585
@@@ -1391,14 -1395,16 +1395,14 @@@ bool within_kprobe_blacklist(unsigned l
   * This returns encoded errors if it fails to look up symbol or invalid
   * combination of parameters.
   */
 -static kprobe_opcode_t *kprobe_addr(struct kprobe *p)
 +static kprobe_opcode_t *_kprobe_addr(kprobe_opcode_t *addr,
 +                      const char *symbol_name, unsigned int offset)
  {
 -      kprobe_opcode_t *addr = p->addr;
 -
 -      if ((p->symbol_name && p->addr) ||
 -          (!p->symbol_name && !p->addr))
 +      if ((symbol_name && addr) || (!symbol_name && !addr))
                goto invalid;
  
 -      if (p->symbol_name) {
 -              addr = kprobe_lookup_name(p->symbol_name, p->offset);
 +      if (symbol_name) {
-               kprobe_lookup_name(symbol_name, addr);
++              addr = kprobe_lookup_name(symbol_name, offset);
                if (!addr)
                        return ERR_PTR(-ENOENT);
        }
Simple merge