Merge tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2016 17:12:41 +0000 (10:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2016 17:12:41 +0000 (10:12 -0700)
Pull powerpc updates from Michael Ellerman:
 "Highlights:
   - Support for Power ISA 3.0 (Power9) Radix Tree MMU from Aneesh Kumar K.V
   - Live patching support for ppc64le (also merged via livepatching.git)

  Various cleanups & minor fixes from:
   - Aaro Koskinen, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V,
     Chris Smart, Daniel Axtens, Frederic Barrat, Gavin Shan, Ian Munsie,
     Lennart Sorensen, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring,
     Michael Ellerman, Oliver O'Halloran, Paul Gortmaker, Paul Mackerras,
     Rashmica Gupta, Russell Currey, Suraj Jitindar Singh, Thiago Jung
     Bauermann, Valentin Rothberg, Vipin K Parashar.

  General:
   - Update LMB associativity index during DLPAR add/remove from Nathan
     Fontenot
   - Fix branching to OOL handlers in relocatable kernel from Hari Bathini
   - Add support for userspace Power9 copy/paste from Chris Smart
   - Always use STRICT_MM_TYPECHECKS from Michael Ellerman
   - Add mask of possible MMU features from Michael Ellerman

  PCI:
   - Enable pass through of NVLink to guests from Alexey Kardashevskiy
   - Cleanups in preparation for powernv PCI hotplug from Gavin Shan
   - Don't report error in eeh_pe_reset_and_recover() from Gavin Shan
   - Restore initial state in eeh_pe_reset_and_recover() from Gavin Shan
   - Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
     from Guilherme G Piccoli
   - Remove the dependency on EEH struct in DDW mechanism from Guilherme
     G Piccoli

  selftests:
   - Test cp_abort during context switch from Chris Smart
   - Add several tests for transactional memory support from Rashmica
     Gupta

  perf:
   - Add support for sampling interrupt register state from Anju T
   - Add support for unwinding perf-stackdump from Chandan Kumar

  cxl:
   - Configure the PSL for two CAPI ports on POWER8NVL from Philippe
     Bergheaud
   - Allow initialization on timebase sync failures from Frederic Barrat
   - Increase timeout for detection of AFU mmio hang from Frederic
     Barrat
   - Handle num_of_processes larger than can fit in the SPA from Ian
     Munsie
   - Ensure PSL interrupt is configured for contexts with no AFU IRQs
     from Ian Munsie
   - Add kernel API to allow a context to operate with relocate disabled
     from Ian Munsie
   - Check periodically the coherent platform function's state from
     Christophe Lombard

  Freescale:
   - Updates from Scott: "Contains 86xx fixes, minor device tree fixes,
     an erratum workaround, and a kconfig dependency fix."

* tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (192 commits)
  powerpc/86xx: Fix PCI interrupt map definition
  powerpc/86xx: Move pci1 definition to the include file
  powerpc/fsl: Fix build of the dtb embedded kernel images
  powerpc/fsl: Fix rcpm compatible string
  powerpc/fsl: Remove FSL_SOC dependency from FSL_LBC
  powerpc/fsl-pci: Add a workaround for PCI 5 errata
  powerpc/fsl: Fix SPI compatible on t208xrdb and t1040rdb
  powerpc/powernv/npu: Add PE to PHB's list
  powerpc/powernv: Fix insufficient memory allocation
  powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism
  Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
  powerpc/eeh: Drop unnecessary label in eeh_pe_change_owner()
  powerpc/eeh: Ignore handlers in eeh_pe_reset_and_recover()
  powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover()
  powerpc/eeh: Don't report error in eeh_pe_reset_and_recover()
  Revert "powerpc/powernv: Exclude root bus in pnv_pci_reset_secondary_bus()"
  powerpc/powernv/npu: Enable NVLink pass through
  powerpc/powernv/npu: Rework TCE Kill handling
  powerpc/powernv/npu: Add set/unset window helpers
  powerpc/powernv/ioda2: Export debug helper pe_level_printk()
  ...

15 files changed:
1  2 
MAINTAINERS
arch/powerpc/Kconfig
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/kernel/mce.c
arch/powerpc/kernel/prom.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/perf/callchain.c
drivers/cpufreq/pmac32-cpufreq.c
drivers/infiniband/hw/qib/qib_file_ops.c
drivers/misc/cxl/context.c
drivers/misc/cxl/cxl.h
drivers/misc/cxl/native.c
tools/perf/config/Makefile

diff --cc MAINTAINERS
Simple merge
Simple merge
@@@ -265,9 -820,86 +820,87 @@@ static inline int pmd_protnone(pmd_t pm
  #define __HAVE_ARCH_PMD_WRITE
  #define pmd_write(pmd)                pte_write(pmd_pte(pmd))
  
+ #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
+ extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
+ extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
+ extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
+                      pmd_t *pmdp, pmd_t pmd);
+ extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
+                                pmd_t *pmd);
+ extern int hash__has_transparent_hugepage(void);
+ static inline int has_transparent_hugepage(void)
+ {
+       if (radix_enabled())
+               return radix__has_transparent_hugepage();
+       return hash__has_transparent_hugepage();
+ }
++#define has_transparent_hugepage has_transparent_hugepage
+ static inline unsigned long
+ pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
+                   unsigned long clr, unsigned long set)
+ {
+       if (radix_enabled())
+               return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set);
+       return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set);
+ }
+ static inline int pmd_large(pmd_t pmd)
+ {
+       return !!(pmd_val(pmd) & _PAGE_PTE);
+ }
+ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
+ {
+       return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
+ }
+ /*
+  * For radix we should always find H_PAGE_HASHPTE zero. Hence
+  * the below will work for radix too
+  */
+ static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,
+                                             unsigned long addr, pmd_t *pmdp)
+ {
+       unsigned long old;
+       if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0)
+               return 0;
+       old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0);
+       return ((old & _PAGE_ACCESSED) != 0);
+ }
+ #define __HAVE_ARCH_PMDP_SET_WRPROTECT
+ static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr,
+                                     pmd_t *pmdp)
+ {
+       if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0)
+               return;
+       pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0);
+ }
+ static inline int pmd_trans_huge(pmd_t pmd)
+ {
+       if (radix_enabled())
+               return radix__pmd_trans_huge(pmd);
+       return hash__pmd_trans_huge(pmd);
+ }
+ #define __HAVE_ARCH_PMD_SAME
+ static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
+ {
+       if (radix_enabled())
+               return radix__pmd_same(pmd_a, pmd_b);
+       return hash__pmd_same(pmd_a, pmd_b);
+ }
  static inline pmd_t pmd_mkhuge(pmd_t pmd)
  {
-       return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_THP_HUGE));
+       if (radix_enabled())
+               return radix__pmd_mkhuge(pmd);
+       return hash__pmd_mkhuge(pmd);
  }
  
  #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
Simple merge
@@@ -153,20 -153,20 +154,21 @@@ static struct ibm_pa_feature 
        unsigned char   pabit;          /* bit number (big-endian) */
        unsigned char   invert;         /* if 1, pa bit set => clear feature */
  } ibm_pa_features[] __initdata = {
 -      {0, 0, PPC_FEATURE_HAS_MMU,     0, 0, 0},
 -      {0, 0, PPC_FEATURE_HAS_FPU,     0, 1, 0},
 -      {CPU_FTR_CTRL, 0, 0,            0, 3, 0},
 -      {CPU_FTR_NOEXECUTE, 0, 0,       0, 6, 0},
 -      {CPU_FTR_NODSISRALIGN, 0, 0,    1, 1, 1},
 -      {0, MMU_FTR_CI_LARGE_PAGE, 0,   1, 2, 0},
 -      {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0},
 +      {0, 0, PPC_FEATURE_HAS_MMU, 0,          0, 0, 0},
 +      {0, 0, PPC_FEATURE_HAS_FPU, 0,          0, 1, 0},
 +      {CPU_FTR_CTRL, 0, 0, 0,                 0, 3, 0},
 +      {CPU_FTR_NOEXECUTE, 0, 0, 0,            0, 6, 0},
 +      {CPU_FTR_NODSISRALIGN, 0, 0, 0,         1, 1, 1},
 +      {0, MMU_FTR_CI_LARGE_PAGE, 0, 0,                1, 2, 0},
 +      {CPU_FTR_REAL_LE, 0, PPC_FEATURE_TRUE_LE, 0, 5, 0, 0},
        /*
 -       * If the kernel doesn't support TM (ie. CONFIG_PPC_TRANSACTIONAL_MEM=n),
 -       * we don't want to turn on CPU_FTR_TM here, so we use CPU_FTR_TM_COMP
 -       * which is 0 if the kernel doesn't support TM.
 +       * If the kernel doesn't support TM (ie CONFIG_PPC_TRANSACTIONAL_MEM=n),
 +       * we don't want to turn on TM here, so we use the *_COMP versions
 +       * which are 0 if the kernel doesn't support TM.
         */
 -      {CPU_FTR_TM_COMP, 0, 0,         22, 0, 0},
 -      {0, MMU_FTR_RADIX, 0,           40, 0, 0},
 +      {CPU_FTR_TM_COMP, 0, 0,
 +       PPC_FEATURE2_HTM_COMP|PPC_FEATURE2_HTM_NOSC_COMP, 22, 0, 0},
++      {0, MMU_FTR_RADIX, 0, 0,                40, 0, 0},
  };
  
  static void __init scan_features(unsigned long node, const unsigned char *ftrs,
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge