On 7/10/15 17:10, Lorenzo Pieralisi wrote:
On Thu, Jul 09, 2015 at 06:44:29AM +0100, Suravee Suthikulpanit wrote:
This patches modifies acpi_gic_init() and gic_v2_acpi_init() to support irqdomain. Previously, it only support irq_default_domain. This change would allow each GIC controller to has its own domain, and to be able to support irqdomain stacking
Also, this patch introduces gicv2m_acpi_init(), which parse MADT table and look for MSI frames. The pointer to each MSI frame in ACPI table is used as a reference when creating GICv2m irqdomain. which can be used as an input when calling irq_find_domain().
Signed-off-by: Suravee Suthikulpanit Suravee.Suthikulpanit@amd.com
arch/arm64/kernel/acpi.c | 14 ++- drivers/irqchip/irq-gic-v2m.c | 172 ++++++++++++++++++++++++++++------- drivers/irqchip/irq-gic.c | 31 ++++--- drivers/pci/pci-acpi.c | 52 +++++++++++ drivers/pci/probe.c | 2 + include/linux/irqchip/arm-gic-acpi.h | 5 +- include/linux/pci-acpi.h | 2 + 7 files changed, 231 insertions(+), 47 deletions(-)
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 05e9c07..1182d16 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -213,10 +213,18 @@ void __init acpi_gic_init(void) acpi_status status; acpi_size tbl_size; int err;
struct irq_domain *domain = NULL; if (acpi_disabled) return;
/**
* NOTE: We need to declare this before we initialize the GIC
* so that we can use pointers to MADT table and MSI_FRAME sub-table
* for reference.
*/
acpi_gbl_permanent_mmap = 1;
This is worth investigating also to avoid parsing the MADT entries a gazillions times instead of stashing its entries. I have to fathom why in generic code it is set so late in the boot process (this has to be investigated, there must be a reason and we will probably bump into it - see acpi_early_init()), but this arm64 override is definitely worth a look, I will take this into account.
Lorenzo
That's a good point. Lemme see if we can avoid having to enable this during init_IRQ() phase.
Thanks,
Suravee
Suravee