This is the first part of making ACPI core running on ARM.
PCI is optional on ARM64 but ACPI is dependent on PCI now, so
in the first patch we try to make ACPI can be running without
PCI.
_PDC is requred for ACPI processor_core.c, but its related code
is a little bit x86/ia64 dependent, so I rework _PDC related staff
to make it more arch independent, and then introduce the skeleton
of _PDC related for ARM64, it should be fully implemented after
ACPI spec is ready for processor idle control.
After that, arm-core.c is introduced so we can get ACPI table from
UEFI, then we can parsed for SMP initialisation, GIC initialisation
and for ACPI drivers.
This patch set is based on:
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
origin/linux-next branch and plus Al Stone's v2 reduced hardware profile
patch.
Hanjun Guo (7):
ACPI: Make ACPI core running without PCI on ARM64
ARM64 : Add dummy asm/cpu.h
ACPI / processor_core: Rework _PDC related stuff to make it more
arch-independent
ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
ARM64 / ACPI: Introduce arm_core.c and its related head file
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: Enable ARM64 in Kconfig
arch/arm64/Kconfig | 2 +
arch/arm64/include/asm/acpi.h | 93 +++++++++++++++
arch/arm64/include/asm/cpu.h | 25 ++++
arch/arm64/include/asm/processor.h | 11 ++
arch/arm64/kernel/process.c | 5 +
arch/arm64/kernel/setup.c | 8 ++
drivers/acpi/Kconfig | 12 +-
drivers/acpi/Makefile | 4 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 16 +++
drivers/acpi/plat/Makefile | 1 +
drivers/acpi/plat/arm-core.c | 226 ++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_core.c | 27 ++---
drivers/acpi/reboot.c | 47 +++++---
drivers/pnp/pnpacpi/rsparser.c | 2 +
15 files changed, 452 insertions(+), 32 deletions(-)
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/cpu.h
create mode 100644 drivers/acpi/plat/Makefile
create mode 100644 drivers/acpi/plat/arm-core.c
--
1.7.9.5
From: Al Stone <al.stone(a)linaro.org>
These patches are a bit of all over the place. Each of them cleans up
or removes BOZO comments that have been in the ACPI ARM port from the
very early days of the port (I inserted the BOZO comments when it was
not clear what needed to be done but I could temporarily hack around
a problem). Removing each of those had all sorts of different changes
needed, from the simplest (the comment turns out to be wrong in hindsight),
to stubbing out or even removing functions that make no sense on an
ARMv7/v8 platform.
Changes for v2:
-- Simplification by using kernel config items to exclude code versus
obtuse #ifdef logic
Al Stone (7):
ACPI: ARM: make use of an ACPI blob address in FDT /chosen
configurable.
ACPI: ARM: Clean up a leftover comment that is no longer pertinent.
ACPI: ARM: remove x86 acpi_wakeup_address usage when running on ARM
ACPI: ARM: remove unnecessary comments
ACPI: ARM: cleanup comments and isolate out x86-specific PAD code
ACPI: ARM: stub out PCI configuration call for non-PCI systems
ACPI: ARM: stub out processor idle routines for use on non-x86
platforms
arch/arm/Kconfig.debug | 11 ++++++
arch/arm/include/asm/acpi.h | 7 ----
arch/arm/include/asm/io.h | 6 +---
arch/arm/include/asm/processor.h | 6 ----
arch/arm64/Kconfig.debug | 11 ++++++
arch/arm64/include/asm/acpi.h | 7 ----
arch/arm64/include/asm/processor.h | 6 ----
drivers/acpi/acpi_pad.c | 15 +++-----
drivers/acpi/osl.c | 42 ++++++++++++----------
drivers/acpi/processor_idle.c | 74 +++++++++++++++++++-------------------
drivers/acpi/sleep.c | 2 ++
11 files changed, 91 insertions(+), 96 deletions(-)
--
1.8.3.1
Al Stone (7):
ACPI: ARM: make use of an ACPI blob address in FDT /chosen
configurable.
ACPI: ARM: Clean up a leftover comment that is no longer pertinent.
ACPI: ARM: remove x86 acpi_wakeup_address usage when running on ARM
ACPI: ARM: remove unnecessary comments
ACPI: ARM: clean up comments and disable PAD code for ARM
ACPI: ARM: stub out PCI configuration call for non-PCI systems
ACPI: ARM: disable x86-specific processor idle code
arch/arm/Kconfig.debug | 11 ++++++++++
arch/arm/include/asm/acpi.h | 5 -----
arch/arm/include/asm/io.h | 6 +-----
arch/arm/include/asm/processor.h | 6 ------
arch/arm64/Kconfig.debug | 11 ++++++++++
arch/arm64/include/asm/acpi.h | 5 -----
arch/arm64/include/asm/processor.h | 6 ------
drivers/acpi/Kconfig | 5 +++--
drivers/acpi/acpi_pad.c | 17 ---------------
drivers/acpi/osl.c | 42 ++++++++++++++++++++++----------------
drivers/acpi/processor_idle.c | 35 -------------------------------
11 files changed, 50 insertions(+), 99 deletions(-)
--
1.8.3.1
From: Al Stone <ahs3(a)redhat.com>
This series of patches starts with Hanjun's patch to create a kernel
config item for CONFIG_ACPI_REDUCED_HARDWARE [0]. Building on that, I
then reviewed all of the code that touched any of several fields in the
FADT that the OSPM is supposed to ignore when ACPI is in Hardware Reduced
mode [1]. Any time there was a use of one of the fields to be ignored,
I evaluated whether or not the code was implementing Hardware Reduced
mode correctly. Similarly, for each the flags in the FADT flags field
that are to be ignored in Hardware Reduced mode, the kernel code was again
scanned for proper usage. The remainder of the patches are to fix all of
the situations I could find where the kernel would not behave correctly
in this ACPI mode.
These seem to work just fine on the RTSM model for ARMv7, both with and
without ACPI enabled, and with and without ACPI_REDUCED_HARDWARE enabled;
similarly for the FVP model for ARMv8. The patches for ACPI on ARM
hardware will be coming later but they presume that reduced HW mode is
functioning correctly. In the meantime, there's no way I can think of
to test all possible scenarios so feedback would be greatly appreciated.
[0] List at https://wiki.linaro.org/LEG/Engineering/Kernel/ACPI/AcpiReducedHw#Section_5…
[1] Please see the ACPI Specification v5.0 for details on Hardware Reduced
mode.
Al Stone (12):
ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE to enable this ACPI mode
ACPI: bus master reload not supported in reduced HW mode
ACPI: clean up compiler warning about uninitialized field
ACPI: HW reduced mode does not allow use of the FADT sci_interrupt
field
ACPI: ARM: exclude calls on ARM platforms, not include them on x86
ACPI: ensure several FADT fields are only used in HW reduced mode
ACPI: do not reserve memory regions for some FADT entries in HW
reduced mode
ACPI: in HW reduced mode, getting power latencies from FADT is not
allowed
ACPI: add clarifying comment about processor throttling in HW reduced
mode
ACPI: ACPI_FADT_C2_MP_SUPPORTED must be ignored in HW reduced mode
ACPI: use of ACPI_FADT_32BIT_TIMER is not allowed in HW reduced mode
ACPI: correct #ifdef so compilation without ACPI_REDUCED_HARDWARE
works
drivers/acpi/Kconfig | 8 ++++++++
drivers/acpi/acpica/utxface.c | 3 ++-
drivers/acpi/bus.c | 7 ++++++-
drivers/acpi/osl.c | 28 ++++++++++++++++++++--------
drivers/acpi/pci_link.c | 14 ++++++++------
drivers/acpi/processor_idle.c | 19 ++++++++++++++-----
drivers/acpi/processor_throttling.c | 8 ++++++++
drivers/acpi/sleep.c | 2 +-
include/acpi/acpixf.h | 6 ++++++
include/acpi/platform/aclinux.h | 4 ++++
10 files changed, 77 insertions(+), 22 deletions(-)
--
1.8.3.1
From: Al Stone <ahs3(a)redhat.com>
These patches are a bit of all over the place. Each of them cleans up
or removes BOZO comments that have been in the ACPI ARM port from the
very early days of the port (I inserted the BOZO comments when it was
not clear what needed to be done but I could temporarily hack around
a problem). Removing each of those had all sorts of different changes
needed, from the simplest (the comment turns out to be wrong in hindsight),
to stubbing out or even removing functions that make no sense on an
ARMv7/v8 platform.
The only file in the ARM ACPI code that still has a "BOZO" comment in it
should be drivers/acpi/plat/arm/sleep.c; this has been left alone since
there are discussions about removing the file completely (which is probably
a good idea).
Al Stone (7):
ACPI: ARM: make use of an ACPI blob address in FDT /chosen
configurable.
ACPI: ARM: Clean up a leftover comment that is no longer pertinent.
ACPI: ARM: remove x86 acpi_wakeup_address usage when running on ARM
ACPI: ARM: remove unnecessary comments
ACPI: ARM: cleanup comments and isolate out x86-specific PAD code
ACPI: ARM: stub out PCI configuration call for non-PCI systems
ACPI: ARM: stub out processor idle routines for use on non-x86
platforms
arch/arm/Kconfig.debug | 11 ++++++
arch/arm/include/asm/acpi.h | 7 ----
arch/arm/include/asm/io.h | 6 +---
arch/arm/include/asm/processor.h | 6 ----
arch/arm64/Kconfig.debug | 11 ++++++
arch/arm64/include/asm/acpi.h | 7 ----
arch/arm64/include/asm/processor.h | 6 ----
drivers/acpi/acpi_pad.c | 15 +++-----
drivers/acpi/osl.c | 42 ++++++++++++----------
drivers/acpi/processor_idle.c | 74 +++++++++++++++++++-------------------
drivers/acpi/sleep.c | 2 ++
11 files changed, 91 insertions(+), 96 deletions(-)
--
1.8.3.1