• A
    acpi/irq: Implement helper to create hierachical domains · 621dc2fd
    Ard Biesheuvel 提交于
    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.
    Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
    Reviewed-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
    621dc2fd
irq.c 9.1 KB