1. 17 3月, 2015 4 次提交
    • N
      powerpc/pseries: Implement memory hotplug add in the kernel · 5f97b2a0
      Nathan Fontenot 提交于
      This patch adds the ability to do memory hotplug add in the kernel.
      
      Currently the operation to hotplug add memory is handled by the drmgr
      command which performs the operation by performing some work in user-space
      and making requests to the kernel to handle other pieces. By moving all
      of the work to the kernel we can do the add faster, and provide a common
      code path to do memory hotplug for both the PowerVM and PowerKVM environments.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5f97b2a0
    • N
      powerpc/pseries: Create new device hotplug entry point · 999e2dad
      Nathan Fontenot 提交于
      The current hotplug (or dlpar) of devices (the process is generally the
      same for memory, cpu, and pci) on PowerVM systems is initiated
      from the HMC, which communicates the request to the partitions through
      the RSCT framework. The RSCT framework then invokes the drmgr command.
      The drmgr command performs the hotplug operation by doing some pieces,
      such as most of the rtas calls and device tree parsing, in userspace
      and make requests to the kernel to online/offline the device, update the
      device tree and add/remove the device.
      
      For PowerKVM the approach for device hotplug is to follow what is currently
      being done for pci hotplug. A hotplug request is initiated from the host.
      QEMU then generates an EPOW interrupt to the guest which causes the guest
      to make the rtas,check-exception call. In QEMU, the rtas,check-exception call
      returns a rtas hotplug event to the guest.
      
      Please note that the current pci hotplug path for PowerKVM involves the
      kernel receiving the rtas hotplug event, passing it to rtas_errd in
      userspace, and having rtas_errd invoke drmgr. The drmgr command then
      handles the request as described above for PowerVM systems.
      
      There is no need for this circuitous route, we should just handle the entire
      hotplug of devices in the kernel. What I am planning is to enable this
      by moving the code to handle hotplug from drmgr into the kernel to
      provide a single path for handling device hotplug for both PowerVM and
      PowerKVM systems. This patch provides the common iframework and entry point.
      For PowerKVM a future update to the kernel rtas code will recognize rtas
      hotplug events returned from rtas,check-exception calls and use the common
      entry point to handle hotplug of the device.
      
      For PowerVM systems, This patch creates /sys/kernel/dlpar that can be
      used by the drmgr command to initiate hotplug requests. In order to do
      this a string of the format "<resource> <action> <id_type> <id>" is
      written to this file. The string consists of a resource (cpu, memory, pci,
      phb), an action (add or remove), an id_type (count, drc index, drc name),
      and the corresponding id. The kernel will parse the string and create a
      rtas hotplug section that can be passed to the common entry point for
      handling hotplug requests.
      
      It should be noted that there is no chance of updating how we receive
      hotplug (dlpar) requests from the HMC on PowerVM systems.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      999e2dad
    • N
      powerpc/pseries: Declare the acquire/release drc index routines · 5e51d3c2
      Nathan Fontenot 提交于
      Add declarations for dlpar_{acquire,release}_drc(...)
      
      They are already marked non-static but were missing a prototype/
      
      [BenH: Added extern to be consistent with the rest of the file]
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5e51d3c2
    • N
      powerpc/pseries: Define rtas hotplug event sections · 366d395c
      Nathan Fontenot 提交于
      In order to handle device hotplug in the kernel on pseries the hotplug
      request will be communicated in the kernel in the form of a
      rtas hotplug event. This patch adds the definition of rtas hotplug event
      sections.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      366d395c
  2. 06 3月, 2015 3 次提交
  3. 05 3月, 2015 1 次提交
  4. 04 3月, 2015 3 次提交
    • J
      x86/PCI/ACPI: Ignore resources consumed by host bridge itself · 63f1789e
      Jiang Liu 提交于
      When parsing resources for PCI host bridge, we should ignore resources
      consumed by host bridge itself and only report window resources available
      to child PCI busses.
      
      Fixes: 593669c2 (x86/PCI/ACPI: Use common ACPI resource interfaces ...)
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      63f1789e
    • N
      powerpc/iommu: Remove IOMMU device references via bus notifier · 4ad04e59
      Nishanth Aravamudan 提交于
      After d905c5df ("PPC: POWERNV: move iommu_add_device earlier"), the
      refcnt on the kobject backing the IOMMU group for a PCI device is
      elevated by each call to pci_dma_dev_setup_pSeriesLP() (via
      set_iommu_table_base_and_group). When we go to dlpar a multi-function
      PCI device out:
      
              iommu_reconfig_notifier ->
                      iommu_free_table ->
                              iommu_group_put
                              BUG_ON(tbl->it_group)
      
      We trip this BUG_ON, because there are still references on the table, so
      it is not freed. Fix this by moving the powernv bus notifier to common
      code and calling it for both powernv and pseries.
      
      Fixes: d905c5df ("PPC: POWERNV: move iommu_add_device earlier")
      Signed-off-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
      Tested-by: NNishanth Aravamudan <nacc@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      4ad04e59
    • M
      powerpc/smp: Wait until secondaries are active & online · 875ebe94
      Michael Ellerman 提交于
      Anton has a busy ppc64le KVM box where guests sometimes hit the infamous
      "kernel BUG at kernel/smpboot.c:134!" issue during boot:
      
        BUG_ON(td->cpu != smp_processor_id());
      
      Basically a per CPU hotplug thread scheduled on the wrong CPU. The oops
      output confirms it:
      
        CPU: 0
        Comm: watchdog/130
      
      The problem is that we aren't ensuring the CPU active bit is set for the
      secondary before allowing the master to continue on. The master unparks
      the secondary CPU's kthreads and the scheduler looks for a CPU to run
      on. It calls select_task_rq() and realises the suggested CPU is not in
      the cpus_allowed mask. It then ends up in select_fallback_rq(), and
      since the active bit isnt't set we choose some other CPU to run on.
      
      This seems to have been introduced by 6acbfb96 "sched: Fix hotplug
      vs. set_cpus_allowed_ptr()", which changed from setting active before
      online to setting active after online. However that was in turn fixing a
      bug where other code assumed an active CPU was also online, so we can't
      just revert that fix.
      
      The simplest fix is just to spin waiting for both active & online to be
      set. We already have a barrier prior to set_cpu_online() (which also
      sets active), to ensure all other setup is completed before online &
      active are set.
      
      Fixes: 6acbfb96 ("sched: Fix hotplug vs. set_cpus_allowed_ptr()")
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      875ebe94
  5. 03 3月, 2015 3 次提交
  6. 01 3月, 2015 2 次提交
    • K
      mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines · c07af4f1
      Kirill A. Shutemov 提交于
      Core mm expects __PAGETABLE_{PUD,PMD}_FOLDED to be defined if these page
      table levels folded.  Usually, these defines are provided by
      <asm-generic/pgtable-nopmd.h> and <asm-generic/pgtable-nopud.h>.
      
      But some architectures fold page table levels in a custom way.  They
      need to define these macros themself.  This patch adds missing defines.
      
      The patch fixes mm->nr_pmds underflow and eliminates dead __pmd_alloc()
      and __pud_alloc() on architectures without these page table levels.
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c07af4f1
    • A
      net: smc91x: use run-time configuration on all ARM machines · b70661c7
      Arnd Bergmann 提交于
      The smc91x driver traditionally gets configured at compile-time
      for whichever hardware it runs on. This no longer works on
      ARM as we continue to move to building all-in-one kernels.
      
      Most ARM configurations with this driver already use run-time
      configuration through DT or through platform_data, but a
      few have not been converted yet.
      
      I've checked all ARM boards that use this driver in their
      legacy board files, and converted the ones that were using
      compile-time configuration in smc91x.h to behave like the
      other ones and provide the interrupt polarity along with
      the MMIO configuration (width, stride) at platform device
      creation time.
      
      In particular, these combinations were previously selectable
      in Kconfig but in fact broken:
      
      - sa1100 assabet plus pleb
      - msm combined with any other armv6/v7 platform
      - pxa-idp combined with any non-DMA pxa variant
      - LogicPD PXA270 combined with any other pxa
      - nomadik combined with any other armv4/v5 platform,
        e.g. versatile.
      
      None of these seem critical enough to warrant a backport
      to stable, but it would be nice to clean this up for good.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      ----
      I would like the patch to get merged through netdev, after
      Robert and/or Linus have verified it on at least some hardware.
      
      There are a few other non-ARM platforms using this driver,
      I could do the same patch for those if we want to take
      it further.
      
       arch/arm/mach-msm/board-halibut.c    |   8 ++++-
       arch/arm/mach-msm/board-qsd8x50.c    |   8 ++++-
       arch/arm/mach-pxa/idp.c              |   5 +++
       arch/arm/mach-pxa/lpd270.c           |   8 ++++-
       arch/arm/mach-realview/core.c        |   7 ++++
       arch/arm/mach-realview/realview_eb.c |   2 +-
       arch/arm/mach-sa1100/neponset.c      |   6 ++++
       arch/arm/mach-sa1100/pleb.c          |   7 ++++
       drivers/net/ethernet/smsc/smc91x.c   |   9 +++--
       drivers/net/ethernet/smsc/smc91x.h   | 114 ++----------------------------------------------------------
       10 files changed, 57 insertions(+), 117 deletions(-)
      Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b70661c7
  7. 28 2月, 2015 4 次提交
  8. 27 2月, 2015 10 次提交
  9. 26 2月, 2015 2 次提交
  10. 25 2月, 2015 8 次提交