1. 24 4月, 2015 5 次提交
    • J
      irq_remapping: Remove unused function irq_remapping_print_chip() · 0cddfc79
      Jiang Liu 提交于
      Now there's no user of irq_remapping_print_chip() anymore, so remove it.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: iommu@lists.linux-foundation.org
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Link: http://lkml.kernel.org/r/1428905519-23704-29-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      0cddfc79
    • J
      irq_remapping: Clean up unused MSI related code · 7a53a121
      Jiang Liu 提交于
      Now MSI interrupt has been converted to new hierarchical irqdomain
      interfaces, so remove legacy MSI related code and interfaces.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Yijing Wang <wangyijing@huawei.com>
      Link: http://lkml.kernel.org/r/1428905519-23704-18-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      7a53a121
    • J
      x86/MSI: Use hierarchical irqdomains to manage MSI interrupts · 52f518a3
      Jiang Liu 提交于
      Enhance MSI code to support hierarchical irqdomains, it helps to make
      the architecture more clear.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Link: http://lkml.kernel.org/r/1428905519-23704-14-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      52f518a3
    • J
      irq_remapping: Introduce new interfaces to support hierarchical irqdomains · 947045a2
      Jiang Liu 提交于
      Introduce new interfaces for interrupt remapping drivers to support
      hierarchical irqdomains:
      
      1) irq_remapping_get_ir_irq_domain(): get irqdomain associated with an
         interrupt remapping unit. IOAPIC/HPET drivers use this interface to
         get parent interrupt remapping irqdomain.
      
      2) irq_remapping_get_irq_domain(): get irqdomain for an IRQ allocation.
         This is mainly used to support MSI irqdomain. We must build one MSI
         irqdomain for each interrupt remapping unit. MSI driver calls this
         interface to get MSI irqdomain associated with an IR irqdomain which
         manages the PCI devices. In a further step we will store the irqdomain
         pointer in the device struct to avoid this call in the irq allocation
         path.
      
      Architecture specific hooks:
      1) arch_get_ir_parent_domain(): get parent irqdomain for IR irqdomain,
         which is x86_vector_domain on x86 platforms.
      2) arch_create_msi_irq_domain(): create an MSI irqdomain associated with
         the interrupt remapping unit.
      
      We also add following callbacks into struct irq_remap_ops:
      	struct irq_domain *(*get_ir_irq_domain)(struct irq_alloc_info *);
      	struct irq_domain *(*get_irq_domain)(struct irq_alloc_info *);
      
      Once all clients of IR have been converted to the new hierarchical irqdomain
      interfaces, we will:
      1) Remove set_ioapic_entry, set_affinity, free_irq, compose_msi_msg,
         msi_alloc_irq, msi_setup_irq, setup_hpet_msi from struct remap_osp
      2) Remove setup_ioapic_remapped_entry, free_remapped_irq,
         compose_remapped_msi_msg, setup_hpet_msi_remapped, setup_remapped_irq.
      3) Simplify x86_io_apic_ops and x86_msi.
      
      We can achieve a way clearer architecture with all these changes
      applied.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Acked-by: NJoerg Roedel <jroedel@suse.de>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Link: http://lkml.kernel.org/r/1428905519-23704-9-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      947045a2
    • J
      x86/dmar: Use new irqdomain interfaces to allocate/free IRQ · a62b32cd
      Jiang Liu 提交于
      Use new irqdomain interfaces to allocate/free IRQ for DMAR and interrupt
      remapping, so we can remove GENERIC_IRQ_LEGACY_ALLOC_HWIRQ later.
      
      The private definitions of irq_alloc_hwirqs()/irq_free_hwirqs() are a
      temporary solution, they will be removed once we have converted the
      interrupt remapping driver to use irqdomain framework.
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Cohen <david.a.cohen@linux.intel.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dimitri Sivanich <sivanich@sgi.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Link: http://lkml.kernel.org/r/1428905519-23704-8-git-send-email-jiang.liu@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      a62b32cd
  2. 15 1月, 2015 5 次提交
  3. 16 12月, 2014 1 次提交
  4. 23 11月, 2014 1 次提交
  5. 26 9月, 2014 1 次提交
    • Y
      iommu/irq_remapping: Fix the regression of hpet irq remapping · 5fc24d8c
      Yijing Wang 提交于
      Commit 71054d88 ("x86, hpet: Introduce x86_msi_ops.setup_hpet_msi")
      introduced x86_msi_ops.setup_hpet_msi to setup hpet MSI irq
      when irq remapping enabled. This caused a regression of
      hpet MSI irq remapping.
      
      Original code flow before commit 71054d88:
      hpet_setup_msi_irq()
      	arch_setup_hpet_msi()
      		setup_hpet_msi_remapped()
      			remap_ops->setup_hpet_msi()
      				alloc_irte()
      		msi_compose_msg()
      		hpet_msi_write()
      		...
      
      Current code flow after commit 71054d88:
      hpet_setup_msi_irq()
      	x86_msi.setup_hpet_msi()
      		setup_hpet_msi_remapped()
      			intel_setup_hpet_msi()
      				alloc_irte()
      
      Currently, we only call alloc_irte() for hpet MSI, but
      do not composed and wrote its msg...
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      5fc24d8c
  6. 16 5月, 2014 1 次提交
  7. 09 1月, 2014 1 次提交
  8. 30 12月, 2013 1 次提交
  9. 04 6月, 2013 2 次提交
    • A
      x86/MSI: Conserve interrupt resources when using multiple-MSIs · 13da7a34
      Alexander Gordeev 提交于
      Current multiple-MSI implementation does not take into account actual
      number of requested MSIs and always rounds that number to a larger
      power-of-two value.  Yet, the number of MSIs a PCI device could send (and
      therefore the number of messages a device driver could request) may be
      smaller.  As result, resources allocated for extra MSIs are just wasted.
      
      This update takes advantage of 'msi_desc::nvec_used' field introduced with
      generic MSI code to track the number of requested and used MSIs.  As
      result, resources associated with interrupts are conserved.  Of those
      resources most noticeable are x86 interrupt vectors.
      
      The initial version of this fix also conserved IRTEs, but Jan noticed that
      a malfunctioning PCI device might send a message number it did not claim
      and thus refer to an IRTE it does not own.  To avoid this security hole,
      as many IRTEs are reserved as the device could possibly send.
      
      [bhelgaas: changelog, rename to "nvec_used"]
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NJoerg Roedel <joro@8bytes.org>
      13da7a34
    • A
      x86/MSI: Conserve interrupt resources when using multiple-MSIs · 5fec9451
      Alexander Gordeev 提交于
      Current multiple-MSI implementation does not take into account actual
      number of requested MSIs and always rounds that number to a larger
      power-of-two value.  Yet, the number of MSIs a PCI device could send (and
      therefore the number of messages a device driver could request) may be
      smaller.  As result, resources allocated for extra MSIs are just wasted.
      
      This update takes advantage of 'msi_desc::nvec_used' field introduced with
      generic MSI code to track the number of requested and used MSIs.  As
      result, resources associated with interrupts are conserved.  Of those
      resources most noticeable are x86 interrupt vectors.
      
      The initial version of this fix also conserved IRTEs, but Jan noticed that
      a malfunctioning PCI device might send a message number it did not claim
      and thus refer to an IRTE it does not own.  To avoid this security hole,
      as many IRTEs are reserved as the device could possibly send.
      
      [bhelgaas: changelog, rename to "nvec_used"]
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      5fec9451
  10. 18 4月, 2013 1 次提交
    • N
      iommu/vt-d: add quirk for broken interrupt remapping on 55XX chipsets · 03bbcb2e
      Neil Horman 提交于
      A few years back intel published a spec update:
      http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
      
      For the 5520 and 5500 chipsets which contained an errata (specificially errata
      53), which noted that these chipsets can't properly do interrupt remapping, and
      as a result the recommend that interrupt remapping be disabled in bios.  While
      many vendors have a bios update to do exactly that, not all do, and of course
      not all users update their bios to a level that corrects the problem.  As a
      result, occasionally interrupts can arrive at a cpu even after affinity for that
      interrupt has be moved, leading to lost or spurrious interrupts (usually
      characterized by the message:
      kernel: do_IRQ: 7.71 No irq handler for vector (irq -1)
      
      There have been several incidents recently of people seeing this error, and
      investigation has shown that they have system for which their BIOS level is such
      that this feature was not properly turned off.  As such, it would be good to
      give them a reminder that their systems are vulnurable to this problem.  For
      details of those that reported the problem, please see:
      https://bugzilla.redhat.com/show_bug.cgi?id=887006
      
      [ Joerg: Removed CONFIG_IRQ_REMAP ifdef from early-quirks.c ]
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: Prarit Bhargava <prarit@redhat.com>
      CC: Don Zickus <dzickus@redhat.com>
      CC: Don Dutile <ddutile@redhat.com>
      CC: Bjorn Helgaas <bhelgaas@google.com>
      CC: Asit Mallick <asit.k.mallick@intel.com>
      CC: David Woodhouse <dwmw2@infradead.org>
      CC: linux-pci@vger.kernel.org
      CC: Joerg Roedel <joro@8bytes.org>
      CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: Arkadiusz Miśkiewicz <arekm@maven.pl>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      03bbcb2e
  11. 26 3月, 2013 1 次提交
  12. 28 1月, 2013 13 次提交
  13. 28 9月, 2012 1 次提交
  14. 17 7月, 2012 1 次提交
  15. 15 6月, 2012 1 次提交
  16. 08 5月, 2012 1 次提交
  17. 07 5月, 2012 3 次提交