History

Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull initial ACPI support for arm64 from Will Deacon: "This series introduces preliminary ACPI 5.1 support to the arm64 kernel using the "hardware reduced" profile. We don't support any peripherals yet, so it's fairly limited in scope: - MEMORY init (UEFI) - ACPI discovery (RSDP via UEFI) - CPU init (FADT) - GIC init (MADT) - SMP boot (MADT + PSCI) - ACPI Kconfig options (dependent on EXPERT) ACPI for arm64 has been in development for a while now and hardware has been available that can boot with either FDT or ACPI tables. This has been made possible by both changes to the ACPI spec to cater for ARM-based machines (known as "hardware-reduced" in ACPI parlance) but also a Linaro-driven effort to get this supported on top of the Linux kernel. This pull request is the result of that work. These changes allow us to initialise the CPUs, interrupt controller, and timers via ACPI tables, with memory information and cmdline coming from EFI. We don't support a hybrid ACPI/FDT scheme. Of course, there is still plenty of work to do (a serial console would be nice!) but I expect that to happen on a per-driver basis after this core series has been merged. Anyway, the diff stat here is fairly horrible, but splitting this up and merging it via all the different subsystems would have been extremely painful. Instead, we've got all the relevant Acks in place and I've not seen anything other than trivial (Kconfig) conflicts in -next (for completeness, I've included my resolution below). Nearly half of the insertions fall under Documentation/. So, we'll see how this goes. Right now, it all depends on EXPERT and I fully expect people to use FDT by default for the immediate future" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (31 commits) ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function ARM64 / ACPI: Ignore the return error value of acpi_map_gic_cpu_interface() ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface ARM64: kernel: acpi: honour acpi=force command line parameter ARM64: kernel: acpi: refactor ACPI tables init and checks ARM64: kernel: psci: let ACPI probe PSCI version ARM64: kernel: psci: factor out probe function ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed ARM64 / ACPI: additions of ACPI documentation for arm64 Documentation: ACPI for ARM64 ARM64 / ACPI: Enable ARM64 in Kconfig XEN / ACPI: Make XEN ACPI depend on X86 ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64 clocksource / arch_timer: Parse GTDT to initialize arch timer irqchip: Add GICv2 specific ACPI boot support ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi ACPI / processor: Make it possible to get CPU hardware ID via GICC ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID ARM64 / ACPI: Parse MADT for SMP initialization ...

Linus Torvalds committed 11 years ago

Commit 836ee482 parents fb65d87 7676fa744 files · +2216 −115Browse files

Showing the changes to include/linux (4 of 44 files). Show all

Unified · Split

4 files
  1. include/linux/acpi.h +7 −1
  2. include/linux/acpi_irq.h +10 −0
  3. include/linux/clocksource.h +6 −0
  4. include/linux/irqchip/arm-gic-acpi.h +31 −0
include/linux/acpi.h+7−1
@@ -79,6 +79,7 @@ enum acpi_irq_model_id { · 78 unmodified lines
7979 ACPI_IRQ_MODEL_IOAPIC,
8080 ACPI_IRQ_MODEL_IOSAPIC,
8181 ACPI_IRQ_MODEL_PLATFORM,
82+ ACPI_IRQ_MODEL_GIC,
8283 ACPI_IRQ_MODEL_COUNT
8384 };
8485
@@ -152,9 +153,14 @@ void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); · 67 unmodified lines
152153 int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
153154 void acpi_numa_arch_fixup(void);
154155
156+#ifndef PHYS_CPUID_INVALID
157+typedef u32 phys_cpuid_t;
158+#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
159+#endif
160+
155161 #ifdef CONFIG_ACPI_HOTPLUG_CPU
156162 /* Arch dependent functions for cpu hotplug support */
157−int acpi_map_cpu(acpi_handle handle, int physid, int *pcpu);
163+int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu);
158164 int acpi_unmap_cpu(int cpu);
159165 #endif /* CONFIG_ACPI_HOTPLUG_CPU */
160166
include/linux/acpi_irq.h+10−0
@@ -0,0 +1,10 @@
1+#ifndef _LINUX_ACPI_IRQ_H
2+#define _LINUX_ACPI_IRQ_H
3+
4+#include <linux/irq.h>
5+
6+#ifndef acpi_irq_init
7+static inline void acpi_irq_init(void) { }
8+#endif
9+
10+#endif /* _LINUX_ACPI_IRQ_H */
include/linux/clocksource.h+6−0
@@ -253,4 +253,10 @@ extern void clocksource_of_init(void); · 252 unmodified lines
253253 static inline void clocksource_of_init(void) {}
254254 #endif
255255
256+#ifdef CONFIG_ACPI
257+void acpi_generic_timer_init(void);
258+#else
259+static inline void acpi_generic_timer_init(void) { }
260+#endif
261+
256262 #endif /* _LINUX_CLOCKSOURCE_H */
include/linux/irqchip/arm-gic-acpi.h+31−0
@@ -0,0 +1,31 @@
1+/*
2+ * Copyright (C) 2014, Linaro Ltd.
3+ * Author: Tomasz Nowicki <tomasz.nowicki@linaro.org>
4+ *
5+ * This program is free software; you can redistribute it and/or modify
6+ * it under the terms of the GNU General Public License version 2 as
7+ * published by the Free Software Foundation.
8+ */
9+
10+#ifndef ARM_GIC_ACPI_H_
11+#define ARM_GIC_ACPI_H_
12+
13+#ifdef CONFIG_ACPI
14+
15+/*
16+ * Hard code here, we can not get memory size from MADT (but FDT does),
17+ * Actually no need to do that, because this size can be inferred
18+ * from GIC spec.
19+ */
20+#define ACPI_GICV2_DIST_MEM_SIZE (SZ_4K)
21+#define ACPI_GIC_CPU_IF_MEM_SIZE (SZ_8K)
22+
23+struct acpi_table_header;
24+
25+int gic_v2_acpi_init(struct acpi_table_header *table);
26+void acpi_gic_init(void);
27+#else
28+static inline void acpi_gic_init(void) { }
29+#endif
30+
31+#endif /* ARM_GIC_ACPI_H_ */

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