1. 17 4月, 2015 6 次提交
    • A
      powerpc/mm/thp: Return pte address if we find trans_splitting. · 7d6e7f7f
      Aneesh Kumar K.V 提交于
      For THP that is marked trans splitting, we return the pte.
      This require the callers to handle the pmd_trans_splitting scenario,
      if they care. All the current callers are either looking at pfn or
      write_ok, hence we don't need to update them.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      7d6e7f7f
    • A
      powerpc/mm/thp: Make page table walk safe against thp split/collapse · 691e95fd
      Aneesh Kumar K.V 提交于
      We can disable a THP split or a hugepage collapse by disabling irq.
      We do send IPI to all the cpus in the early part of split/collapse,
      and disabling local irq ensure we don't make progress with
      split/collapse. If the THP is getting split we return NULL from
      find_linux_pte_or_hugepte(). For all the current callers it should be ok.
      We need to be careful if we want to use returned pte_t pointer outside
      the irq disabled region. W.r.t to THP split, the pfn remains the same,
      but then a hugepage collapse will result in a pfn change. There are
      few steps we can take to avoid a hugepage collapse.One way is to take page
      reference inside the irq disable region. Other option is to take
      mmap_sem so that a parallel collapse will not happen. We can also
      disable collapse by taking pmd_lock. Another method used by kvm
      subsystem is to check whether we had a mmu_notifer update in between
      using mmu_notifier_retry().
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      691e95fd
    • A
      KVM: PPC: Remove page table walk helpers · dac56570
      Aneesh Kumar K.V 提交于
      This patch remove helpers which we had used only once in the code.
      Limiting page table walk variants help in ensuring that we won't
      end up with code walking page table with wrong assumptions.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      dac56570
    • A
      KVM: PPC: Use READ_ONCE when dereferencing pte_t pointer · 5e1d44ae
      Aneesh Kumar K.V 提交于
      pte can get updated from other CPUs as part of multiple activities
      like THP split, huge page collapse, unmap. We need to make sure we
      don't reload the pte value again and again for different checks.
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5e1d44ae
    • M
    • L
      Merge tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux · d19d5efd
      Linus Torvalds 提交于
      Pull powerpc updates from Michael Ellerman:
      
       - Numerous minor fixes, cleanups etc.
      
       - More EEH work from Gavin to remove its dependency on device_nodes.
      
       - Memory hotplug implemented entirely in the kernel from Nathan
         Fontenot.
      
       - Removal of redundant CONFIG_PPC_OF by Kevin Hao.
      
       - Rewrite of VPHN parsing logic & tests from Greg Kurz.
      
       - A fix from Nish Aravamudan to reduce memory usage by clamping
         nodes_possible_map.
      
       - Support for pstore on powernv from Hari Bathini.
      
       - Removal of old powerpc specific byte swap routines by David Gibson.
      
       - Fix from Vasant Hegde to prevent the flash driver telling you it was
         flashing your firmware when it wasn't.
      
       - Patch from Ben Herrenschmidt to add an OPAL heartbeat driver.
      
       - Fix for an oops causing get/put_cpu_var() imbalance in perf by Jan
         Stancek.
      
       - Some fixes for migration from Tyrel Datwyler.
      
       - A new syscall to switch the cpu endian by Michael Ellerman.
      
       - Large series from Wei Yang to implement SRIOV, reviewed and acked by
         Bjorn.
      
       - A fix for the OPAL sensor driver from Cédric Le Goater.
      
       - Fixes to get STRICT_MM_TYPECHECKS building again by Michael Ellerman.
      
       - Large series from Daniel Axtens to make our PCI hooks per PHB rather
         than per machine.
      
       - Small patch from Sam Bobroff to explicitly abort non-suspended
         transactions on syscalls, plus a test to exercise it.
      
       - Numerous reworks and fixes for the 24x7 PMU from Sukadev Bhattiprolu.
      
       - Small patch to enable the hard lockup detector from Anton Blanchard.
      
       - Fix from Dave Olson for missing L2 cache information on some CPUs.
      
       - Some fixes from Michael Ellerman to get Cell machines booting again.
      
       - Freescale updates from Scott: Highlights include BMan device tree
         nodes, an MSI erratum workaround, a couple minor performance
         improvements, config updates, and misc fixes/cleanup.
      
      * tag 'powerpc-4.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (196 commits)
        powerpc/powermac: Fix build error seen with powermac smp builds
        powerpc/pseries: Fix compile of memory hotplug without CONFIG_MEMORY_HOTREMOVE
        powerpc: Remove PPC32 code from pseries specific find_and_init_phbs()
        powerpc/cell: Fix iommu breakage caused by controller_ops change
        powerpc/eeh: Fix crash in eeh_add_device_early() on Cell
        powerpc/perf: Cap 64bit userspace backtraces to PERF_MAX_STACK_DEPTH
        powerpc/perf/hv-24x7: Fail 24x7 initcall if create_events_from_catalog() fails
        powerpc/pseries: Correct memory hotplug locking
        powerpc: Fix missing L2 cache size in /sys/devices/system/cpu
        powerpc: Add ppc64 hard lockup detector support
        oprofile: Disable oprofile NMI timer on ppc64
        powerpc/perf/hv-24x7: Add missing put_cpu_var()
        powerpc/perf/hv-24x7: Break up single_24x7_request
        powerpc/perf/hv-24x7: Define update_event_count()
        powerpc/perf/hv-24x7: Whitespace cleanup
        powerpc/perf/hv-24x7: Define add_event_to_24x7_request()
        powerpc/perf/hv-24x7: Rename hv_24x7_event_update
        powerpc/perf/hv-24x7: Move debug prints to separate function
        powerpc/perf/hv-24x7: Drop event_24x7_request()
        powerpc/perf/hv-24x7: Use pr_devel() to log message
        ...
      
      Conflicts:
      	tools/testing/selftests/powerpc/Makefile
      	tools/testing/selftests/powerpc/tm/Makefile
      d19d5efd
  2. 16 4月, 2015 34 次提交