diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-09-01 05:08:53 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-09-01 12:56:25 -0400 |
commit | 4a6ac3044f1504fe4521efa7334095c9c9ceecfd (patch) | |
tree | 7c51a19948f0a4e413ac8137f7ac171e50b61c84 /drivers/irqchip/irq-gic.c | |
parent | 01f779f4862b53810ba4eb247f57bd1ad31d1c18 (diff) |
irqchip/GIC: Fix EOImode setting for non-DT/ACPI systems
Non-DT/ACPI systems call directly into the GIC driver at init time.
Turns out 0b996fd35957 ("irqchip/GIC: Convert to EOImode == 1")
breaks old non firmware-driven platforms, as the driver only
works out the capability of the platform on the DT/ACPI paths.
Fix this thinko by forcing EOImode==0 on non-DT platforms,
which are not capable of supporting a hypervisor anyway.
Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1441098533-31523-1-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/irqchip/irq-gic.c')
-rw-r--r-- | drivers/irqchip/irq-gic.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 72bf81b8abfc..e6b7ed537952 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c | |||
@@ -993,7 +993,7 @@ static const struct irq_domain_ops gic_irq_domain_ops = { | |||
993 | .xlate = gic_irq_domain_xlate, | 993 | .xlate = gic_irq_domain_xlate, |
994 | }; | 994 | }; |
995 | 995 | ||
996 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, | 996 | static void __init __gic_init_bases(unsigned int gic_nr, int irq_start, |
997 | void __iomem *dist_base, void __iomem *cpu_base, | 997 | void __iomem *dist_base, void __iomem *cpu_base, |
998 | u32 percpu_offset, struct device_node *node) | 998 | u32 percpu_offset, struct device_node *node) |
999 | { | 999 | { |
@@ -1103,6 +1103,19 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, | |||
1103 | gic_pm_init(gic); | 1103 | gic_pm_init(gic); |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | void __init gic_init_bases(unsigned int gic_nr, int irq_start, | ||
1107 | void __iomem *dist_base, void __iomem *cpu_base, | ||
1108 | u32 percpu_offset, struct device_node *node) | ||
1109 | { | ||
1110 | /* | ||
1111 | * Non-DT/ACPI systems won't run a hypervisor, so let's not | ||
1112 | * bother with these... | ||
1113 | */ | ||
1114 | static_key_slow_dec(&supports_deactivate); | ||
1115 | __gic_init_bases(gic_nr, irq_start, dist_base, cpu_base, | ||
1116 | percpu_offset, node); | ||
1117 | } | ||
1118 | |||
1106 | #ifdef CONFIG_OF | 1119 | #ifdef CONFIG_OF |
1107 | static int gic_cnt __initdata; | 1120 | static int gic_cnt __initdata; |
1108 | 1121 | ||
@@ -1137,7 +1150,7 @@ gic_of_init(struct device_node *node, struct device_node *parent) | |||
1137 | if (of_property_read_u32(node, "cpu-offset", &percpu_offset)) | 1150 | if (of_property_read_u32(node, "cpu-offset", &percpu_offset)) |
1138 | percpu_offset = 0; | 1151 | percpu_offset = 0; |
1139 | 1152 | ||
1140 | gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset, node); | 1153 | __gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset, node); |
1141 | if (!gic_cnt) | 1154 | if (!gic_cnt) |
1142 | gic_init_physaddr(node); | 1155 | gic_init_physaddr(node); |
1143 | 1156 | ||
@@ -1265,7 +1278,7 @@ gic_v2_acpi_init(struct acpi_table_header *table) | |||
1265 | * as default IRQ domain to allow for GSI registration and GSI to IRQ | 1278 | * as default IRQ domain to allow for GSI registration and GSI to IRQ |
1266 | * number translation (see acpi_register_gsi() and acpi_gsi_to_irq()). | 1279 | * number translation (see acpi_register_gsi() and acpi_gsi_to_irq()). |
1267 | */ | 1280 | */ |
1268 | gic_init_bases(0, -1, dist_base, cpu_base, 0, NULL); | 1281 | __gic_init_bases(0, -1, dist_base, cpu_base, 0, NULL); |
1269 | irq_set_default_host(gic_data[0].domain); | 1282 | irq_set_default_host(gic_data[0].domain); |
1270 | 1283 | ||
1271 | acpi_irq_model = ACPI_IRQ_MODEL_GIC; | 1284 | acpi_irq_model = ACPI_IRQ_MODEL_GIC; |