1. 25 3月, 2015 1 次提交
  2. 19 3月, 2015 1 次提交
    • Y
      PCI: Assign resources before drivers claim devices (pci_scan_root_bus()) · b97ea289
      Yijing Wang 提交于
      Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
      devices on it, and called pci_bus_add_devices(), which made the devices
      available for drivers to claim them.
      
      Most callers assigned resources to devices after pci_scan_root_bus()
      returns, which may be after drivers have claimed the devices.  This is
      incorrect; the PCI core should not change device resources while a driver
      is managing the device.
      
      Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
      resource assignment in the callers.
      
      Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
      after pci_scan_root_bus(), so we only need to remove the first call:
      
        pci_common_init_dev
          pcibios_init_hw
            pci_scan_root_bus
              pci_bus_add_devices        # first call
          pci_bus_assign_resources
          pci_bus_add_devices            # second call
      
      [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
      return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
      return early if xtensa platform_pcibios_fixup() fails]
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      CC: Matt Turner <mattst88@gmail.com>
      CC: David Howells <dhowells@redhat.com>
      CC: Tony Luck <tony.luck@intel.com>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Ralf Baechle <ralf@linux-mips.org>
      CC: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Chris Metcalf <cmetcalf@ezchip.com>
      CC: Chris Zankel <chris@zankel.net>
      CC: Max Filippov <jcmvbkbc@gmail.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      b97ea289
  3. 28 2月, 2015 2 次提交
  4. 21 1月, 2015 1 次提交
  5. 23 11月, 2014 3 次提交
    • T
      PCI/MSI: Rename mask/unmask_msi_irq treewide · 280510f1
      Thomas Gleixner 提交于
      The PCI/MSI irq chip callbacks mask/unmask_msi_irq have been renamed
      to pci_msi_mask/unmask_irq to mark them PCI specific. Rename all usage
      sites. The conversion helper functions are kept around to avoid
      conflicts in next and will be removed after merging into mainline.
      
      Coccinelle assisted conversion. No functional change.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: x86@kernel.org
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Murali Karicheri <m-karicheri2@ti.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Mohit Kumar <mohit.kumar@st.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Michal Simek <michal.simek@xilinx.com>
      Cc: Yijing Wang <wangyijing@huawei.com>
      280510f1
    • T
      PCI/MSI: Rename mask/unmask_msi_irq et al · 23ed8d57
      Thomas Gleixner 提交于
      mask/unmask_msi_irq and __mask_msi/msix_irq are PCI/MSI specific
      functions and should be named accordingly. This is a preparatory patch
      to support MSI on non PCI devices.
      
      Rename mask/unmask_msi_irq to pci_msi_mask/unmask_irq and document the
      functions. Provide conversion helpers.
      
      Rename __mask_msi/msix_irq to __pci_msi/msix_desc_mask so its clear
      that they operated on msi_desc. Fixup the only user outside of
      pci/msi.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      23ed8d57
    • J
      PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg() · 83a18912
      Jiang Liu 提交于
      Rename write_msi_msg() to pci_write_msi_msg() to mark it as PCI
      specific.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      83a18912
  6. 12 11月, 2014 1 次提交
  7. 03 11月, 2014 2 次提交
    • M
      s390/pci: add sparse annotations · 5b9f2081
      Martin Schwidefsky 提交于
      Fix the following warnings from the sparse code checker:
      
      arch/s390/include/asm/pci_io.h:165:49: warning: cast removes address space of expression
      arch/s390/pci/pci.c:476:44: warning: cast removes address space of expression
      arch/s390/pci/pci.c:491:36: warning: incorrect type in argument 2 (different address spaces)
      arch/s390/pci/pci.c:491:36:    expected void [noderef] <asn:2>*addr
      arch/s390/pci/pci.c:491:36:    got void *<noident>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5b9f2081
    • S
      s390/pci: improve irq number check for msix · b19148f6
      Sebastian Ott 提交于
      s390s arch_setup_msi_irqs function ensures that we don't return with
      more irqs than the PCI architecture allows and that a single PCI
      function doesn't consume more irqs than the kernel is configured for.
      
      At least the last check doesn't help much and should take the sum of
      all irqs into account. Since that's already done by irq_alloc_desc
      we can remove this check.
      
      As for the first check we should use the value provided by the
      firmware which can be less than what the PCI architecture allows.
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b19148f6
  8. 22 7月, 2014 1 次提交
  9. 16 7月, 2014 1 次提交
    • Y
      s390/MSI: Use standard mask and unmask funtions · 8fb878c5
      Yijing Wang 提交于
      MSI irqchip in s390 has its own mask and unmask MSI irq
      functions, zpci_enable_irq() and zpci_disable_irq().
      They mask and unmask MSI irq in standard ways, no arch
      special. MSI driver provides two global standard functions
      mask_msi_irq() and unmask_msi_irq(). Local zpci_enable_irq()
      and zpci_disable_irq() are almost the same as the standard
      two. the difference is local mask/unmask functions
      read the mask status before mask and unmask everytime.
      Then change the value and rewrite to hardware. In standard
      functions, save the mask status after mask and unmask msi
      irq, and use the cached status to change the mask status.
      When we mask or unmask a MSI irq, we always cache its
      mask status except we know need not to cache it, like in
      pci_msi_shutdown. So use the standard functions to replace
      the local is safe.
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      [sebott: fixed inverted function pointers]
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8fb878c5
  10. 23 5月, 2014 1 次提交
  11. 20 5月, 2014 1 次提交
  12. 16 5月, 2014 1 次提交
  13. 20 3月, 2014 1 次提交
    • B
      s390/PCI: Use generic pci_enable_resources() · d7533232
      Bjorn Helgaas 提交于
      The generic pci_enable_resources() does essentially the same thing as the
      code in the s390 version of pcibios_enable_device().
      
      There are differences, but I don't think any of them are a problem.  The
      generic code:
      
        - Checks everything up to PCI_NUM_RESOURCES, not PCI_BAR_COUNT (6), so
          we'll now check the ROM resource, IOV resources, and bridge windows.
      
        - Checks for res->flags & IORESOURCE_UNSET.  The s390 code never sets
          IORESOURCE_UNSET, so this isn't a problem.
      
        - Checks res->parent.  The s390 pcibios_add_device() calls
          pci_claim_resource() on all BARs (except ROM, IOV, and bridge windows)
          so this isn't a problem either.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      d7533232
  14. 21 12月, 2013 2 次提交
  15. 16 12月, 2013 2 次提交
  16. 15 11月, 2013 2 次提交
  17. 24 10月, 2013 3 次提交
  18. 30 8月, 2013 5 次提交
  19. 22 8月, 2013 3 次提交
  20. 27 6月, 2013 4 次提交
  21. 10 6月, 2013 1 次提交
  22. 26 4月, 2013 1 次提交