Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1376097

[PATCH v6 03/10] irqchip/gic-v2: Gather ACPI specific data in a single structure

From Julien Grall <julien.grall@arm.com>
Newsgroups linux.kernel
Subject [PATCH v6 03/10] irqchip/gic-v2: Gather ACPI specific data in a single structure
Date 2016-04-11 17:40 +0200
Message-ID <rmM6v-87k-39@gated-at.bofh.it> (permalink)
References <rmM6u-87k-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The ACPI code requires to use global variables in order to collect
information from the tables.

For now, a single global variable is used, but more will be added in a
subsequent patch. To make clear they are ACPI specific, gather all the
information in a single structure.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Christofer Dall <christoffer.dall@linaro.org>
Acked-by: Hanjun Guo <hanjun.guo@linaro.org>

---
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>

    Changes in v6:
        - Add Hanjun's acked-by

    Changes in v4:
        - Update commit message
        - Rename cpu_phy_base to cpu_phys_base
        - Add Christopher's acked-by

    Changes in v2:
        - Patch added
---
 drivers/irqchip/irq-gic.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 282344b..7a73786 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1245,7 +1245,10 @@ IRQCHIP_DECLARE(pl390, "arm,pl390", gic_of_init);
 #endif
 
 #ifdef CONFIG_ACPI
-static phys_addr_t cpu_phy_base __initdata;
+static struct
+{
+	phys_addr_t cpu_phys_base;
+} acpi_data __initdata;
 
 static int __init
 gic_acpi_parse_madt_cpu(struct acpi_subtable_header *header,
@@ -1265,10 +1268,10 @@ gic_acpi_parse_madt_cpu(struct acpi_subtable_header *header,
 	 * All CPU interface addresses have to be the same.
 	 */
 	gic_cpu_base = processor->base_address;
-	if (cpu_base_assigned && gic_cpu_base != cpu_phy_base)
+	if (cpu_base_assigned && gic_cpu_base != acpi_data.cpu_phys_base)
 		return -EINVAL;
 
-	cpu_phy_base = gic_cpu_base;
+	acpi_data.cpu_phys_base = gic_cpu_base;
 	cpu_base_assigned = 1;
 	return 0;
 }
@@ -1316,7 +1319,7 @@ static int __init gic_v2_acpi_init(struct acpi_subtable_header *header,
 		return -EINVAL;
 	}
 
-	cpu_base = ioremap(cpu_phy_base, ACPI_GIC_CPU_IF_MEM_SIZE);
+	cpu_base = ioremap(acpi_data.cpu_phys_base, ACPI_GIC_CPU_IF_MEM_SIZE);
 	if (!cpu_base) {
 		pr_err("Unable to map GICC registers\n");
 		return -ENOMEM;
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v6 00/10] arm64: Add support for KVM with ACPI Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
  [PATCH v6 03/10] irqchip/gic-v2: Gather ACPI specific data in a single structure Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
  [PATCH v6 09/10] KVM: arm/arm64: vgic: Rely on the GIC driver to parse the firmware tables Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
  [PATCH v6 10/10] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
    Re: [PATCH v6 10/10] clocksource: arm_arch_timer: Remove  arch_timer_get_timecounter Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-12 07:50 +0200
      Re: [PATCH v6 10/10] clocksource: arm_arch_timer: Remove  arch_timer_get_timecounter Christoffer Dall <christoffer.dall@linaro.org> - 2016-04-12 14:20 +0200
        Re: [PATCH v6 10/10] clocksource: arm_arch_timer: Remove  arch_timer_get_timecounter Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-12 14:50 +0200
  [PATCH v6 06/10] irqchip/gic-v3: Gather all ACPI specific data in a single structure Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
  [PATCH v6 02/10] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200
    Re: [PATCH v6 02/10] clocksource: arm_arch_timer: Extend  arch_timer_kvm_info to get the virtual IRQ Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-12 07:50 +0200
  [PATCH v6 08/10] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables Julien Grall <julien.grall@arm.com> - 2016-04-11 17:40 +0200

csiph-web