aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip/irq-armada-370-xp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 12:01:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 12:01:01 -0500
commit9e66645d72d3c395da92b0f8855c787f4b5f0e89 (patch)
tree61b94adb6c32340c45b6d984837556b6b845e983 /drivers/irqchip/irq-armada-370-xp.c
parentecb50f0afd35a51ef487e8a54b976052eb03d729 (diff)
parent74faaf7aa64c76b60db0f5c994fd43a46be772ce (diff)
Merge branch 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq domain updates from Thomas Gleixner: "The real interesting irq updates: - Support for hierarchical irq domains: For complex interrupt routing scenarios where more than one interrupt related chip is involved we had no proper representation in the generic interrupt infrastructure so far. That made people implement rather ugly constructs in their nested irq chip implementations. The main offenders are x86 and arm/gic. To distangle that mess we have now hierarchical irqdomains which seperate the various interrupt chips and connect them via the hierarchical domains. That keeps the domain specific details internal to the particular hierarchy level and removes the criss/cross referencing of chip internals. The resulting hierarchy for a complex x86 system will look like this: vector mapped: 74 msi-0 mapped: 2 dmar-ir-1 mapped: 69 ioapic-1 mapped: 4 ioapic-0 mapped: 20 pci-msi-2 mapped: 45 dmar-ir-0 mapped: 3 ioapic-2 mapped: 1 pci-msi-1 mapped: 2 htirq mapped: 0 Neither ioapic nor pci-msi know about the dmar interrupt remapping between themself and the vector domain. If interrupt remapping is disabled ioapic and pci-msi become direct childs of the vector domain. In hindsight we should have done that years ago, but in hindsight we always know better :) - Support for generic MSI interrupt domain handling We have more and more non PCI related MSI interrupts, so providing a generic infrastructure for this is better than having all affected architectures implementing their own private hacks. - Support for PCI-MSI interrupt domain handling, based on the generic MSI support. This part carries the pci/msi branch from Bjorn Helgaas pci tree to avoid a massive conflict. The PCI/MSI parts are acked by Bjorn. I have two more branches on top of this. The full conversion of x86 to hierarchical domains and a partial conversion of arm/gic" * 'irq-irqdomain-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits) genirq: Move irq_chip_write_msi_msg() helper to core PCI/MSI: Allow an msi_controller to be associated to an irq domain PCI/MSI: Provide mechanism to alloc/free MSI/MSIX interrupt from irqdomain PCI/MSI: Enhance core to support hierarchy irqdomain PCI/MSI: Move cached entry functions to irq core genirq: Provide default callbacks for msi_domain_ops genirq: Introduce msi_domain_alloc/free_irqs() asm-generic: Add msi.h genirq: Add generic msi irq domain support genirq: Introduce callback irq_chip.irq_write_msi_msg genirq: Work around __irq_set_handler vs stacked domains ordering issues irqdomain: Introduce helper function irq_domain_add_hierarchy() irqdomain: Implement a method to automatically call parent domains alloc/free genirq: Introduce helper irq_domain_set_info() to reduce duplicated code genirq: Split out flow handler typedefs into seperate header file genirq: Add IRQ_SET_MASK_OK_DONE to support stacked irqchip genirq: Introduce irq_chip.irq_compose_msi_msg() to support stacked irqchip genirq: Add more helper functions to support stacked irq_chip genirq: Introduce helper functions to support stacked irq_chip irqdomain: Do irq_find_mapping and set_type for hierarchy irqdomain in case OF ...
Diffstat (limited to 'drivers/irqchip/irq-armada-370-xp.c')
-rw-r--r--drivers/irqchip/irq-armada-370-xp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
index a3fd2b37ddb6..463c235acbdc 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -132,7 +132,7 @@ static void armada_370_xp_free_msi(int hwirq)
132 mutex_unlock(&msi_used_lock); 132 mutex_unlock(&msi_used_lock);
133} 133}
134 134
135static int armada_370_xp_setup_msi_irq(struct msi_chip *chip, 135static int armada_370_xp_setup_msi_irq(struct msi_controller *chip,
136 struct pci_dev *pdev, 136 struct pci_dev *pdev,
137 struct msi_desc *desc) 137 struct msi_desc *desc)
138{ 138{
@@ -159,11 +159,11 @@ static int armada_370_xp_setup_msi_irq(struct msi_chip *chip,
159 msg.address_hi = 0; 159 msg.address_hi = 0;
160 msg.data = 0xf00 | (hwirq + 16); 160 msg.data = 0xf00 | (hwirq + 16);
161 161
162 write_msi_msg(virq, &msg); 162 pci_write_msi_msg(virq, &msg);
163 return 0; 163 return 0;
164} 164}
165 165
166static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, 166static void armada_370_xp_teardown_msi_irq(struct msi_controller *chip,
167 unsigned int irq) 167 unsigned int irq)
168{ 168{
169 struct irq_data *d = irq_get_irq_data(irq); 169 struct irq_data *d = irq_get_irq_data(irq);
@@ -175,10 +175,10 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
175 175
176static struct irq_chip armada_370_xp_msi_irq_chip = { 176static struct irq_chip armada_370_xp_msi_irq_chip = {
177 .name = "armada_370_xp_msi_irq", 177 .name = "armada_370_xp_msi_irq",
178 .irq_enable = unmask_msi_irq, 178 .irq_enable = pci_msi_unmask_irq,
179 .irq_disable = mask_msi_irq, 179 .irq_disable = pci_msi_mask_irq,
180 .irq_mask = mask_msi_irq, 180 .irq_mask = pci_msi_mask_irq,
181 .irq_unmask = unmask_msi_irq, 181 .irq_unmask = pci_msi_unmask_irq,
182}; 182};
183 183
184static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq, 184static int armada_370_xp_msi_map(struct irq_domain *domain, unsigned int virq,
@@ -198,7 +198,7 @@ static const struct irq_domain_ops armada_370_xp_msi_irq_ops = {
198static int armada_370_xp_msi_init(struct device_node *node, 198static int armada_370_xp_msi_init(struct device_node *node,
199 phys_addr_t main_int_phys_base) 199 phys_addr_t main_int_phys_base)
200{ 200{
201 struct msi_chip *msi_chip; 201 struct msi_controller *msi_chip;
202 u32 reg; 202 u32 reg;
203 int ret; 203 int ret;
204 204