1. 26 9月, 2017 1 次提交
  2. 30 7月, 2017 1 次提交
  3. 16 2月, 2017 1 次提交
    • A
      genirq/msi: Add stubs for get_cached_msi_msg/pci_write_msi_msg · 2f44e29c
      Arnd Bergmann 提交于
      A bug fix to the MSIx handling in vfio added references to functions
      that may not be defined if MSI is disabled in the kernel, resulting in
      this link error:
      
      drivers/built-in.o: In function `vfio_msi_set_vector_signal':
      :(.text+0x450808): undefined reference to `get_cached_msi_msg'
      :(.text+0x45080c): undefined reference to `write_msi_msg'
      
      As suggested by Alex Williamson, add stub implementations for
      get_cached_msi_msg() and pci_write_msi_msg().
      
      In case this bugfix gets backported, please note that the #ifdef
      has changed over time, originally both functions were implemented
      in drivers/pci/msi.c and controlled by CONFIG_PCI_MSI, while nowadays
      get_cached_msi_msg() is part of the generic MSI support and can be
      used without PCI.
      
      Fixes: b8f02af0 ("vfio/pci: Restore MSIx message prior to enabling")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Link: http://lkml.kernel.org/r/1413190208.4202.34.camel@ul30vt.home
      Link: http://lkml.kernel.org/r/20170214215343.3307861-1-arnd@arndb.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      2f44e29c
  4. 11 2月, 2017 2 次提交
  5. 15 9月, 2016 1 次提交
  6. 09 8月, 2016 1 次提交
  7. 04 7月, 2016 2 次提交
  8. 08 2月, 2016 1 次提交
  9. 08 1月, 2016 1 次提交
  10. 16 12月, 2015 3 次提交
    • M
      platform-msi: Allow creation of a MSI-based stacked irq domain · 552c494a
      Marc Zyngier 提交于
      We almost have all the needed bits requiredable to create a irq domain
      on top of a MSI domain.
      
      For this, we enable a few things:
      - the virq is stored in the msi_desc
      - device, msi_alloc_info and domain-specific data
        are stored in the platform_priv_data structure
      - we introduce a new API for platform-msi:
      
        /* Create a MSI-based domain */
        struct irq_domain *
        platform_msi_create_device_domain(struct device *dev,
                                          unsigned int nvec,
                                          irq_write_msi_msg_t write_msi_msg,
                                          const struct irq_domain_ops *ops,
                                          void *host_data);
      
        /* Allocate MSIs in an MSI domain */
        int platform_msi_domain_alloc(struct irq_domain *domain,
      				unsigned int virq,
      				unsigned int nr_irqs);
      
        /* Free MSIs from an MSI domain */
        void platform_msi_domain_free(struct irq_domain *domain,
      				unsigned int virq,
      				unsigned int nvec);
      
        /* Obtain the host data passed to platform_msi_create_device_domain */
        void *platform_msi_get_host_data(struct irq_domain *domain);
      
      platform_msi_create_device_domain() is a hybrid of irqdomain creation
      and interrupt allocation, creating a domain backed by the MSIs associated
      to a device. IRQs can then be allocated in that domain using
      platform_msi_domain_alloc().
      
      This now allows a wired irq to MSI bridge to be created.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      552c494a
    • M
      genirq/msi: Add msi_domain_populate_irqs · 2145ac93
      Marc Zyngier 提交于
      To be able to allocate interrupts from the MSI layer down,
      add a new msi_domain_populate_irqs entry point.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      2145ac93
    • M
      genirq/msi: Make the .prepare callback reusable · b2eba39b
      Marc Zyngier 提交于
      The .prepare callbacks are so far only called from msi_domain_alloc_irqs.
      In order to reuse that code, split that code and create a
      msi_domain_prepare_irqs function that the existing code can call into.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      b2eba39b
  11. 16 10月, 2015 2 次提交
  12. 14 10月, 2015 1 次提交
  13. 19 9月, 2015 1 次提交
  14. 30 7月, 2015 2 次提交
    • M
      PCI/MSI: Drop domain field from msi_controller · f075915a
      Marc Zyngier 提交于
      The only three users of that field are not using the msi_controller
      structure anymore, so drop it altogether.
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Cc: Ma Jun <majun258@huawei.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Duc Dang <dhdang@apm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1438091186-10244-20-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      f075915a
    • M
      drivers/base: Add MSI domain support for non-PCI devices · c09fcc4b
      Marc Zyngier 提交于
      With the msi_list and the msi_domain properties now being at the
      generic device level, it is starting to be relatively easy to offer
      a generic way of providing non-PCI MSIs.
      
      The two major hurdles with this idea are:
      
      - Lack of global ID that identifies a device: this is worked around by
        having a global ID allocator for each device that gets enrolled in
        the platform MSI subsystem
      
      - Lack of standard way to write the message in the generating device.
        This is solved by mandating driver code to provide a write_msg
        callback, so that everyone can have their own square wheel
      
      Apart from that, the API is fairly straightforward:
      
      - platform_msi_create_irq_domain creates an MSI domain that gets
        tagged with DOMAIN_BUS_PLATFORM_MSI
      
      - platform_msi_domain_alloc_irqs allocate MSIs for a given device,
        populating the msi_list
      
      - platform_msi_domain_free_irqs does what is written on the tin
      
      [ tglx: Created a seperate struct platform_msi_desc and added
        	kerneldoc entries ]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Cc: <linux-arm-kernel@lists.infradead.org>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Cc: Ma Jun <majun258@huawei.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Duc Dang <dhdang@apm.com>
      Cc: Hanjun Guo <hanjun.guo@linaro.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1438091186-10244-10-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      c09fcc4b
  15. 23 7月, 2015 5 次提交
  16. 24 11月, 2014 1 次提交
  17. 23 11月, 2014 9 次提交
  18. 12 11月, 2014 3 次提交
  19. 07 11月, 2014 1 次提交
    • Y
      PCI/MSI: Add pci_msi_ignore_mask to prevent writes to MSI/MSI-X Mask Bits · 38737d82
      Yijing Wang 提交于
      MSI-X vector Mask Bits are in MSI-X Tables in PCI memory space.  Xen PV
      guests can't write to those tables.  MSI vector Mask Bits are in PCI
      configuration space.  Xen PV guests can write to config space, but those
      writes are ignored.
      
      Commit 0e4ccb15 ("PCI: Add x86_msi.msi_mask_irq() and
      msix_mask_irq()") added a way to override default_mask_msi_irqs() and
      default_mask_msix_irqs() so they can be no-ops in Xen guests, but this is
      more complicated than necessary.
      
      Add "pci_msi_ignore_mask" in the core PCI MSI code.  If set,
      default_mask_msi_irqs() and default_mask_msix_irqs() return without doing
      anything.  This is less flexible, but much simpler.
      
      [bhelgaas: changelog]
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NDavid Vrabel <david.vrabel@citrix.com>
      CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: xen-devel@lists.xenproject.org
      38737d82
  20. 02 10月, 2014 1 次提交