History

acpi/irq: Implement helper to create hierachical domains

ACPI permits arbitrary producer->consumer interrupt links to be described in AML, which means a topology such as the following is perfectly legal: Device (EXIU) { Name (_HID, "SCX0008") Name (_UID, Zero) Name (_CRS, ResourceTemplate () { ... }) } Device (GPIO) { Name (_HID, "SCX0007") Name (_UID, Zero) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, SYNQUACER_GPIO_BASE, SYNQUACER_GPIO_SIZE) Interrupt (ResourceConsumer, Edge, ActiveHigh, ExclusiveAndWake, 0, "\\_SB.EXIU") { 7, } }) ... } The EXIU in this example is the external interrupt unit as can be found on Socionext SynQuacer based platforms, which converts a block of 32 SPIs from arbitrary polarity/trigger into level-high, with a separate set of config/mask/unmask/clear controls. The existing DT based driver in drivers/irqchip/irq-sni-exiu.c models this as a hierarchical domain stacked on top of the GIC's irqdomain. Since the GIC is modeled as a DT node as well, obtaining a reference to this irqdomain is easily done by going through the parent link. On ACPI systems, however, the GIC is not modeled as an object in the namespace, and so device objects cannot refer to it directly. So in order to obtain the irqdomain reference when driving the EXIU in ACPI mode, we need a helper that implicitly grabs the default domain as the parent of the hierarchy for interrupts allocated out of the global GSI pool.

Ard Biesheuvel committed 7 years ago

Commit 621dc2f1 parent cd6c84d2 files · +33 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/acpi.h+7−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
23 23
24#include <linux/errno.h>24#include <linux/errno.h>
25#include <linux/ioport.h> /* for struct resource */25#include <linux/ioport.h> /* for struct resource */
26#include <linux/irqdomain.h>
26#include <linux/resource_ext.h>27#include <linux/resource_ext.h>
27#include <linux/device.h>28#include <linux/device.h>
28#include <linux/property.h>29#include <linux/property.h>
@@ -327,6 +328,12 @@ int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi); · 298 unmodified lines
327void acpi_set_irq_model(enum acpi_irq_model_id model,328void acpi_set_irq_model(enum acpi_irq_model_id model,
328 struct fwnode_handle *fwnode);329 struct fwnode_handle *fwnode);
329 330
331struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags,
332 unsigned int size,
333 struct fwnode_handle *fwnode,
334 const struct irq_domain_ops *ops,
335 void *host_data);
336
330#ifdef CONFIG_X86_IO_APIC337#ifdef CONFIG_X86_IO_APIC
331extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);338extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
332#else339#else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t