lkml.org 
[lkml]   [2014]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[Patch Part2 v3 00/24] Enable hierarchy irqdomian on x86 platforms
Date
We plan to restructure x86 interrupt code based on hierarchy irqdomain,
that is to build irqdomains for CPU vector, interrupt remapping unit,
IOAPIC, MSI and HPET etc and organize those irqdomains in hierarchy mode.
Each irqdomain manages corresponding interrupt controller and talks to
parent interrupt controller through public irqdomain interfaces. We also
support stacked irq_chip based on hierarchy irqdomain. It will make the
x86 interrupt architecture much more clear and more easy to maintain
with hierarchy irqdomain and stacked irq_chip. It may also help ARM
interrupt management architecture too.

This is the second patch set to enable support of hierarchy irqdomain
on x86 platforms. It depends on the first part at:
https://lkml.org/lkml/2014/10/27/122
And you may access it at:
https://github.com/jiangliu/linux.git irqdomain/p2v3

And there will be a third patch set to convert IOAPIC driver to support
hierarchy irqdomain and clean up code.

The first patch extends irqdomain interfaces to support hierarchy
irqdomain. Hope this interface could be used by other architectures too,
such as ARM/ARM64.
The second patch introduces two helper functions to support stacked
irq_chip.
Patch 3-9 implements an irqdomain to manange CPU interrupt vectors, and
it's the root irqdomain for x86 platforms.
Patch 10-13 converts Intel and AMD interrupt remapping drivers to
support hierarchy irqdomain.
Patch 14-16 converts HPET and MSI to support hierarchy irqdomain.
Patch 17-20 cleans up unsued code in x86 arch and interrupt remapping
drivers.
Patch 21-24 converts DMAR, HTIRQ and UV to support hierarchy irqdomain.

We have tested this patchset on Intel 32-bit and 64-bit systems. And it
also passes Fengguang's 0day tests. But helps are need for testing:
1) AMD interrupt remapping
2) AMD HT_IRQ
3) UV platform

V2->V3:
1) Fix bugs in handling OF irqdomain
2) Add documentation
3) Rebase to v3.18-rc2
V1->V2
1) Add hierarchy iredomain support of DMAR IRQ and UV IRQ.
2) Fix bugs reported by Joe C.
3) Address all review comments from Thomas
4) Fix a bug found during tests
5) Fix errors and warning found by 0day tests

Jiang Liu (24):
irqdomain: Introduce new interfaces to support hierarchy irqdomains
genirq: Introduce helper functions to support stacked irq_chip
x86, irq: Save destination CPU ID in irq_cfg
x86, irq: Use hierarchy irqdomain to manage CPU interrupt vectors
x86, hpet: Use new irqdomain interfaces to allocate/free IRQ
x86, MSI: Use new irqdomain interfaces to allocate/free IRQ
x86, uv: Use new irqdomain interfaces to allocate/free IRQ
x86, htirq: Use new irqdomain interfaces to allocate/free IRQ
x86, dmar: Use new irqdomain interfaces to allocate/free IRQ
x86: irq_remapping: Introduce new interfaces to support hierarchy
irqdomain
iommu/vt-d: Change prototypes to prepare for enabling hierarchy
irqdomain
iommu/vt-d: Enhance Intel IR driver to suppport hierarchy irqdomain
iommu/amd: Enhance AMD IR driver to suppport hierarchy irqdomain
x86, hpet: Enhance HPET IRQ to support hierarchy irqdomain
x86, MSI: Use hierarchy irqdomain to manage MSI interrupts
x86, irq: Directly call native_compose_msi_msg() for DMAR IRQ
iommu/vt-d: Clean up unused MSI related code
iommu/amd: Clean up unused MSI related code
x86: irq_remapping: Clean up unused MSI related code
x86, irq: Clean up unused MSI related code and interfaces
iommu/vt-d: Refine the interfaces to create IRQ for DMAR unit
x86, irq: Use hierarchy irqdomain to manage DMAR interrupts
x86, htirq: Use hierarchy irqdomain to manage Hypertransport
interrupts
x86, uv: Use hierarchy irqdomain to manage UV interrupts

Documentation/IRQ-domain.txt | 71 +++++
arch/ia64/include/asm/irq_remapping.h | 2 -
arch/ia64/kernel/msi_ia64.c | 30 +-
arch/x86/Kconfig | 3 +-
arch/x86/include/asm/hpet.h | 16 +-
arch/x86/include/asm/hw_irq.h | 82 +++++
arch/x86/include/asm/irq_remapping.h | 85 ++++-
arch/x86/include/asm/pci.h | 5 -
arch/x86/include/asm/x86_init.h | 4 -
arch/x86/kernel/apic/htirq.c | 178 ++++++++---
arch/x86/kernel/apic/io_apic.c | 3 -
arch/x86/kernel/apic/msi.c | 545 +++++++++++++++++++++++++--------
arch/x86/kernel/apic/vector.c | 160 +++++++++-
arch/x86/kernel/hpet.c | 57 +---
arch/x86/kernel/x86_init.c | 2 -
arch/x86/platform/uv/uv_irq.c | 301 +++++++-----------
drivers/iommu/amd_iommu.c | 388 ++++++++++++++++++-----
drivers/iommu/amd_iommu_init.c | 4 +
drivers/iommu/amd_iommu_proto.h | 9 +
drivers/iommu/amd_iommu_types.h | 5 +
drivers/iommu/dmar.c | 19 +-
drivers/iommu/intel_irq_remapping.c | 470 +++++++++++++++++++---------
drivers/iommu/irq_remapping.c | 227 +++++---------
drivers/iommu/irq_remapping.h | 23 +-
drivers/pci/htirq.c | 48 +--
include/linux/dmar.h | 3 +-
include/linux/htirq.h | 22 +-
include/linux/intel-iommu.h | 4 +
include/linux/irq.h | 10 +
include/linux/irqdomain.h | 81 +++++
kernel/irq/Kconfig | 4 +
kernel/irq/chip.c | 20 ++
kernel/irq/irqdomain.c | 373 +++++++++++++++++++++-
33 files changed, 2319 insertions(+), 935 deletions(-)

--
1.7.10.4



\
 
 \ /
  Last update: 2014-10-28 10:01    [W:0.329 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site