Hi,
I ran into some compile errors when I was prototyping the code
for the proposals in ASWG, it turns out that some field in FADT is
changed and "reserved4[0]" used in ACPI_FADT_V2_SIZE will
cause the error.
So my question is that the length of very version of FADT is
fixed, why not use a constant value for this puspose?
Here is the code:
/*
* Sizes of the various flavors of FADT. We need to look closely
* at the FADT length because the version number essentially tells
* us nothing because of many BIOS bugs where the version does not
* match the expected length. In other words, the length of the
* FADT is the bottom line as to what the version really is.
*
* For reference, the values below are as follows:
* FADT V1 size: 0x074
* FADT V2 size: 0x084
* FADT V3 size: 0x0F4
* FADT V4 size: 0x0F4
* FADT V5 size: 0x10C
*/
#define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4)
#define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3)
#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control))
#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt))
Why not #define ACPI_FADT_V1_SIZE 0x074 ?
Did I miss something? any clarify will be appreciated :)
Thanks
Hanjun
This patch set is the first part of ARM64 ACPI core patches to
running ACPI on ARM64, it just handle some compile errors when
ACPI is introduced to ARM64 platform and enable ACPI on ARM64
in Kconfig.
Following core patch sets for ACPI based SMP/GIC/Arch Timer
initialization to enable ACPI on ARM64 are still waited untill
some ACPI proposals approved by ASWG.
This patch set is based on 3.15-rc2 and PCI patches for ARM64 from
Liviu:
Support for creating generic host_bridge from device tree
https://lkml.org/lkml/2014/3/14/279
Add support for PCI in AArch64
http://comments.gmane.org/gmane.linux.ports.arm.kernel/309392
We did 3 review cycles inside linaro ACPI team, and I had compiled
all the patches ok on arm64 with:
- CONFIG_ACPI=n and CONFIG_PCI=n;
- CONFIG_ACPI=n and CONFIG_PCI=y;
- CONFIG_ACPI=y and CONFIG_PCI=y;
And compiled ok on x86.
Changes since v2:
- Make ACPI depend on PCI on ARM64
- rework all the patches and seperate some of the patches
into fine-grained, and add some comments and changelog to
make it easier for review.
Hanjun Guo (11):
ACPI / processor: Rework _PDC related stuff to make it more
arch-independent
ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
ARM64 : Add dummy asm/cpu.h
ARM64 / ACPI: Introduce arm-core.c and its related head file
ARM64 / ACPI: Introduce early_param for "acpi"
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: Introduce arch_fix_phys_package_id() for cpu topology
ARM64 / ACPI: Introduce PCI functions for ACPI on ARM64
ARM64 / ACPI: Enable ARM64 in Kconfig
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
ACPI: Make EC depend on X86 || IA64 in Kconfig
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acpi.h | 94 +++++++++++++++++++++++++
arch/arm64/include/asm/cpu.h | 11 +++
arch/arm64/include/asm/pci.h | 11 +++
arch/arm64/include/asm/topology.h | 2 +
arch/arm64/kernel/pci.c | 34 +++++++++
arch/arm64/kernel/setup.c | 4 ++
arch/arm64/kernel/topology.c | 14 ++++
arch/ia64/include/asm/acpi.h | 5 +-
arch/ia64/kernel/acpi.c | 15 ++++
arch/x86/include/asm/acpi.h | 19 +----
arch/x86/kernel/acpi/cstate.c | 27 ++++++++
drivers/acpi/Kconfig | 6 +-
drivers/acpi/Makefile | 2 +
drivers/acpi/plat/Makefile | 1 +
drivers/acpi/plat/arm-core.c | 138 +++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_core.c | 19 +----
17 files changed, 363 insertions(+), 42 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
Enable C-State support for ARM64.
Signed-off-by: Jonghwan Choi <jhbird.choi(a)samsung.com>
---
drivers/acpi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index ff5c83c..e434a3e 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -143,7 +143,7 @@ config ACPI_PROCESSOR
tristate "Processor"
select THERMAL
select CPU_IDLE
- depends on X86 || IA64
+ depends on X86 || IA64 || ARM64
default y
help
This driver installs ACPI as the idle handler for Linux and uses
--
1.7.10.4