aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-04irqchip/gic: Ensure gic_cpu_if_up/down() programs correct GIC instanceJon Hunter3-8/+14
Commit 3228950621d9 ("irqchip: gic: Preserve gic V2 bypass bits in cpu ctrl register") added a new function, gic_cpu_if_up(), to program the GIC CPU_CTRL register. This function assumes that there is only one GIC instance present and hence always uses the chip data for the primary GIC controller. Although it is not common for there to be a secondary, some devices do support a secondary. Therefore, fix this by passing gic_cpu_if_up() a pointer to the appropriate chip data structure. Similarly, the function gic_cpu_if_down() only assumes that there is a single GIC instance present. Update this function so that an instance number is passed for the appropriate GIC and return an error code on failure. The vexpress TC2 (which has a single GIC) is currently the only user of this function and so update it accordingly. Note that because the TC2 only has a single GIC, the call to gic_cpu_if_down() should always be successful. Signed-off-by: Jon Hunter <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Russell King <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-08-04irqchip/gic: Only allow the primary GIC to set the CPU mapJon Hunter1-18/+25
The gic_init_bases() function initialises an array that stores the mapping between the GIC and CPUs. This array is a global array that is unconditionally initialised on every call to gic_init_bases(). Although, it is not common for there to be more than one GIC instance, there are some devices that do support nested GIC controllers and gic_init_bases() can be called more than once. A 2nd call to gic_init_bases() will clear the previous CPU mapping and will only setup the mapping again for the CPU calling gic_init_bases(). Fix this by only allowing the CPU map to be configured for the primary GIC. For secondary GICs the CPU map is not relevant because these GICs do not directly route the interrupts to the main CPU(s) but to other GICs or devices. Signed-off-by: Jon Hunter <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Russell King <[email protected]> Cc: Nicolas Pitre <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-08-01PCI/MSI: pci-xgene-msi: Consolidate chained IRQ handler install/removeThomas Gleixner1-8/+6
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Duc Dang <[email protected]>
2015-08-01unicore32/irq: Prepare puv3_gpio_handler for irq argument removalThomas Gleixner1-3/+2
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Guan Xuetao <[email protected]>
2015-08-01tile/pci_gx: Prepare trio_handle_level_irq for irq argument removalThomas Gleixner1-1/+2
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Chris Metcalf <[email protected]>
2015-08-01m68k/irq: Prepare irq handlers for irq argument removalThomas Gleixner3-4/+9
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: [email protected]
2015-07-31C6X/megamode-pic: Prepare megamod_irq_cascade for irq argument removalThomas Gleixner1-1/+2
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Mark Salter <[email protected]> Cc: [email protected]
2015-07-31blackfin: Prepare irq handlers for irq argument removalThomas Gleixner2-3/+5
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Steven Miao <[email protected]> Cc: [email protected]
2015-07-31arc/irq: Prepare idu_cascade_isr for irq argument removalThomas Gleixner1-1/+2
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Vineet Gupta <[email protected]>
2015-07-31sparc/irq: Use access helper irq_data_get_affinity_mask()Jiang Liu2-8/+10
This is a preparatory patch for moving irq_data struct members. Signed-off-by: Jiang Liu <[email protected]> Cc: David S. Miller <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31sparc/irq: Use helper irq_data_get_irq_handler_data()Jiang Liu3-10/+15
Use helper function irq_data_get_irq_handler_data() to hide irq_desc implementation details. This allows to move irq_data->handler_data to irq_data_common, once all usage sites are converted. Signed-off-by: Jiang Liu <[email protected]> Cc: David S. Miller <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31parisc/irq: Use access helper irq_data_get_affinity_mask()Jiang Liu2-7/+7
Use access helper irq_data_get_affinity_mask() to hide implementation details of struct irq_desc. Signed-off-by: Jiang Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Tony Luck <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: James E.J. Bottomley <[email protected]> Cc: Helge Deller <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31mn10300/irq: Use access helper irq_data_get_affinity_mask()Jiang Liu2-7/+8
Use access helper irq_data_get_affinity_mask() to hide implementation details of struct irq_desc. Signed-off-by: Jiang Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Tony Luck <[email protected]> Cc: [email protected] Cc: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Howells <[email protected]> Cc: Koichi Yasutake <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31irqchip/i8259: Prepare i8259_irq_dispatch for irq argument removalThomas Gleixner1-2/+3
Make irq a local variable and retrieve domain from the irq descriptor which avoid a redundant lookup. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Ralf Baechle <[email protected]>
2015-07-31MIPS/irqchip: Move i8259 irqchip driver to drivers/irqchipRalf Baechle5-6/+6
Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31irqchip: Remove header drivers/irqchip/irqchip.hJoel Porquet1-11/+0
All drivers using the macro IRQCHIP_DECLARE have been converted to using global header include/linux/irqchip.h. Local header drivers/irqchip/irqchip.h is now useless and can be removed. Signed-off-by: Joel Porquet <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/2818400.nekF4hg2Ig@joel-zenbook Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31mips/irq: prepare for drivers/irqchip/irqchip.h removalJoel Porquet3-4/+2
The IRQCHIP_DECLARE macro migrated to 'include/linux/irqchip.h'. See commit 91e20b5040c67c51aad88cf87db4305c5bd7f79d ("irqchip: Move IRQCHIP_DECLARE macro to include/linux/irqchip.h"). This patch removes inclusions of private header 'drivers/irqchip/irqchip.h'and replaces them with the inclusion of 'include/linux/irqchip.h'. Signed-off-by: Joel Porquet <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/3357968.0IznKtY3Q9@joel-zenbook Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-31microblaze/irq: prepare for drivers/irqchip/irqchip.h removalJoel Porquet1-2/+1
The IRQCHIP_DECLARE macro migrated to 'include/linux/irqchip.h'. See commit 91e20b5040c67c51aad88cf87db4305c5bd7f79d ("irqchip: Move IRQCHIP_DECLARE macro to include/linux/irqchip.h"). This patch removes the inclusion of private header 'drivers/irqchip/irqchip.h' and replaces it with the inclusion of 'include/linux/irqchip.h'. Signed-off-by: Joel Porquet <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/12384045.pHnZrl3CFY@joel-zenbook Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Drop domain field from msi_controllerMarc Zyngier2-6/+0
The only three users of that field are not using the msi_controller structure anymore, so drop it altogether. Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: pci-xgene-msi: Get rid of struct msi_controllerMarc Zyngier1-25/+16
The X-Gene MSI driver only uses the msi_controller structure as a way to match the host bridge with its MSI HW, and thus the msi_domain. But now that we can directly associate an msi_domain with a device, there is no use keeping this msi_controller around. Just remove all traces of msi_controller from the driver. Tested-by: Duc Dang <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/GICv2m: Add platform MSI supportMarc Zyngier1-8/+25
In order to support non-PCI MSI with GICv2m, add the minimal required entry points for the MSI domain, which is actually almost nothing (we just use the defaults provided by the core code). Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/GICv2m: Get rid of struct msi_controllerMarc Zyngier1-17/+10
GICv2m only uses the msi_controller structure as a way to match the host bridge with its MSI HW, and thus the msi_domain. But now that we can directly associate an msi_domain with a device, there is no use keeping this msi_controller around. Just remove all traces of msi_controller from the driver. Also tag the inner (non-PCI) domain with DOMAIN_BUS_NEXUS. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/gicv3-its: Add platform MSI supportMarc Zyngier2-1/+94
In order to support non-PCI MSI with the GICv3 ITS, add the minimal required entry points for the MSI domain (an msi_prepare implementation). The rest is only boilerplate code to find the raw ITS domain. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/gicv3-its: Make the PCI/MSI code standaloneMarc Zyngier3-27/+73
We can now lookup the base ITS domain, making it possible to initialize the PCI/MSI code independently from the main ITS subsystem. This allows us to remove all the previously add hooks. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/gicv3-its: Get rid of struct msi_controllerMarc Zyngier1-22/+16
The GICv3 ITS only uses the msi_controller structure as a way to match the host bridge with its MSI HW, and thus the msi_domain. But now that we can directly associate an msi_domain with a device, there is no use keeping this msi_controller around. Just remove all traces of msi_controller from the driver. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/gicv3-its: Register irq domain with NEXUS tokenMarc Zyngier1-1/+2
Now that we can distinguish between multiple domains carrying the same device_node, tag the raw ITS domain with DOMAIN_BUS_NEXUS. This will allow MSI providers built on top of the raw ITS domain to identify it. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30irqchip/gicv3-its: Split PCI/MSI code from the core ITS driverMarc Zyngier4-84/+123
It is becoming obvious that having the PCI/MSI code in the same file as the the core ITS code is giving people implementing non-PCI MSI support the wrong kind of idea. In order to make things a bit clearer, let's move the PCI/MSI code out to its own file. Hopefully it will make it clear that whoever thinks of hooking into the core ITS better have a very strong point. We use a temporary entry point that will get removed in a subsequent patch, once the proper infrastructure is added. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30genirq: Add DOMAIN_BUS_NEXUS irqdomain propertyMarc Zyngier1-0/+1
Some IRQ domains are not designed to directly provide interrupts to devices, but strictly to be used by other domains. An example of this is the GICv3 ITS, which is completely bus agnostic, and on which it is possible to implement a PCI/MSI domain. Just introduce the irq_domain_bus_token property for now. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30drivers/base: Add MSI domain support for non-PCI devicesMarc Zyngier3-0/+305
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: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30of/platform: Assign MSI domain to platform deviceMarc Zyngier4-0/+24
As for PCI, we're able to populate the msi_domain field at probe time, provided that the device tree has an "msi-parent" property. Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Let pci_msi_get_domain use struct device::msi_domainMarc Zyngier1-6/+8
Now that we can easily find which MSI domain a PCI device is using, use dev_get_msi_domain as a way to retrieve the information. The original code is still used as a fallback. Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Allow msi_domain lookup using the host bridge nodeMarc Zyngier1-1/+6
A number of platforms do not need to use the msi-parent property, as the host bridge itself provides the MSI controller. Allow this configuration by performing an irq domain lookup based on the host bridge node if it doesn't have a valid msi-parent property. Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Add support for OF-provided msi_domainMarc Zyngier3-1/+33
In order to populate the PCI host bridge msi_domain, use the "msi-parent" attribute to lookup a corresponding irq domain. If found, this is our MSI domain. This gets plugged into the core PCI code. Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Add hooks to populate the msi_domain fieldMarc Zyngier1-0/+42
In order to be able to populate the device msi_domain field, add the necessary hooks to propagate the host bridge msi_domain across secondary busses to devices. So far, nobody populates the initial msi_domain. Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30device core: Introduce per-device MSI domain pointerMarc Zyngier1-0/+20
As MSI-type features are creeping into non-PCI devices, it is starting to make sense to give our struct device some form of support for this, by allowing a pointer to an MSI irq domain to be set/retrieved. Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30PCI/MSI: Register irq domain with specific tokenMarc Zyngier2-1/+9
When creating a PCI/MSI domain, tag it with DOMAIN_BUS_PCI_MSI so that it can be looked-up using irq_find_matching_host(). Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30genirq/irqdomain: Allow irq domain aliasingMarc Zyngier14-19/+58
It is not uncommon (at least with the ARM stuff) to have a piece of hardware that implements different flavours of "interrupts". A typical example of this is the GICv3 ITS, which implements standard PCI/MSI support, but also some form of "generic MSI". So far, the PCI/MSI domain is registered using the ITS device_node, so that irq_find_host can return it. On the contrary, the raw MSI domain is not registered with an device_node, making it impossible to be looked up by another subsystem (obviously, using the same device_node twice would only result in confusion, as it is not defined which one irq_find_host would return). A solution to this is to "type" domains that may be aliasing, and to be able to lookup an device_node that matches a given type. For this, we introduce irq_find_matching_host() as a superset of irq_find_host: struct irq_domain *irq_find_matching_host(struct device_node *node, enum irq_domain_bus_token bus_token); where bus_token is the "type" we want to match the domain against (so far, only DOMAIN_BUS_ANY is defined). This result in some moderately invasive changes on the PPC side (which is the only user of the .match method). This has otherwise no functionnal change. Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: <[email protected]> Cc: Yijing Wang <[email protected]> Cc: Ma Jun <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Duc Dang <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Jason Cooper <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30genirq: Use the proper parameter name in kernel docMasanari Iida1-1/+1
The following warning is emitted for make xmldocs: Warning(.//kernel/irq/chip.c:1009): No description found for parameter 'vcpu_info' Warning(.//kernel/irq/chip.c:1009): Excess function parameter 'dest' description in 'irq_chip_set_vcpu_affinity_parent' Signed-off-by: Masanari Iida <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-30Merge branch 'linus' into irq/coreThomas Gleixner964-6149/+10692
Pull in upstream fixes before applying conflicting changes
2015-07-29xtensa/irq: Use access helper irq_data_get_affinity_mask()Jiang Liu1-4/+6
This is a preparatory patch for moving irq_data struct members. Signed-off-by: Jiang Liu <[email protected]> Cc: Chris Zankel <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29spmi/pmic: Use irq_desc_get_xxx() to avoid redundant lookup of irq_descJiang Liu1-2/+2
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Signed-off-by: Jiang Liu <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29spmi/pmic_arb: Consolidate chained IRQ handler install/removeThomas Gleixner1-6/+3
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Julia Lawall <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29sh/intc: Prepare irq flow handlers for irq argument removalThomas Gleixner2-2/+4
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Cc: Julia Lawall <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29sh/intc: Use irq_desc_get_xxx() to avoid redundant lookup of irq_descJiang Liu5-10/+12
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we already have a pointer to corresponding irq_desc. Also replace generic_handle_irq with generic_handle_irq_desc() to avoid looking up irq_desc again. Signed-off-by: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29sh/irq: Use access helper irq_data_get_affinity_mask()Thomas Gleixner2-6/+7
This is a preparatory patch for moving irq_data struct members. Signed-off-by: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29sh/irq: Use irq accessor functions instead of open coded accessJiang Liu1-5/+7
This is a preparatory patch for refactoring the internals if irq_data. Signed-off-by: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-29sh/irq: Use accessor irq_data_get_node()Jiang Liu1-1/+1
Use accessor irq_data_get_node() to hide struct irq_data implementation detail, so we can move irq_data->node to irq_data_common once all usage sites are fixed. Signed-off-by: Jiang Liu <[email protected]> Cc: Simon Horman <[email protected]> Cc: Magnus Damm <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2015-07-27ia64/iosapic: Use irq_set_chip_handler_name_locked()Thomas Gleixner1-3/+3
__irq_set_chip_handler_name_locked() is about to be replaced. Use irq_set_chip_handler_name_locked() instead. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-27ia64/irq: Use access helper irq_data_get_affinity_mask()Jiang Liu4-7/+7
This is a preparatory patch for moving irq_data struct members. Signed-off-by: Jiang Liu <[email protected]> Cc: Cc: Tony Luck <[email protected]> Cc: Fenghua Yu <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-07-27C6X/meagmod-pic: Consolidate chained IRQ handler install/removeThomas Gleixner1-2/+2
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Mark Salter <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: [email protected] Cc: Julia Lawall <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>