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
To use acpi_cpufreq in both x86 and arm64, change the CONFIG_'s name
and location.
Signed-off-by: Jonghwan Choi <jhbird.choi(a)samsung.com>
---
drivers/cpufreq/Kconfig | 16 ++++++++++++++++
drivers/cpufreq/Kconfig.x86 | 26 +++++---------------------
drivers/cpufreq/Makefile | 2 +-
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index cb5b936..cbc7925 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -232,6 +232,22 @@ depends on ARM || ARM64
source "drivers/cpufreq/Kconfig.arm"
endmenu
+config ACPI_CPUFREQ
+ tristate "ACPI Processor P-States driver"
+ depends on ACPI_PROCESSOR
+ help
+ This driver adds a CPUFreq driver which utilizes the ACPI
+ Processor Performance States.
+ This driver also supports Intel Enhanced Speedstep and newer
+ AMD CPUs.
+
+ To compile this driver as a module, choose M here: the
+ module will be called acpi-cpufreq.
+
+ For details, take a look at <file:Documentation/cpu-freq/>.
+
+ If in doubt, say N.
+
menu "AVR32 CPU frequency scaling drivers"
depends on AVR32
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index d369349..fc3a3d7 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -29,26 +29,10 @@ config X86_PCC_CPUFREQ
If in doubt, say N.
-config X86_ACPI_CPUFREQ
- tristate "ACPI Processor P-States driver"
- depends on ACPI_PROCESSOR
- help
- This driver adds a CPUFreq driver which utilizes the ACPI
- Processor Performance States.
- This driver also supports Intel Enhanced Speedstep and newer
- AMD CPUs.
-
- To compile this driver as a module, choose M here: the
- module will be called acpi-cpufreq.
-
- For details, take a look at <file:Documentation/cpu-freq/>.
-
- If in doubt, say N.
-
config X86_ACPI_CPUFREQ_CPB
default y
bool "Legacy cpb sysfs knob support for AMD CPUs"
- depends on X86_ACPI_CPUFREQ && CPU_SUP_AMD
+ depends on ACPI_CPUFREQ && CPU_SUP_AMD
help
The powernow-k8 driver used to provide a sysfs knob called "cpb"
to disable the Core Performance Boosting feature of AMD CPUs. This
@@ -113,7 +97,7 @@ config X86_POWERNOW_K7_ACPI
config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!"
- depends on ACPI && ACPI_PROCESSOR && X86_ACPI_CPUFREQ
+ depends on ACPI && ACPI_PROCESSOR && ACPI_CPUFREQ
help
This adds the CPUFreq driver for K8/early Opteron/Athlon64
processors.
Support for K10 and newer processors is now in acpi-cpufreq.
@@ -125,7 +109,7 @@ config X86_POWERNOW_K8
config X86_AMD_FREQ_SENSITIVITY
tristate "AMD frequency sensitivity feedback powersave bias"
- depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD
+ depends on CPU_FREQ_GOV_ONDEMAND && ACPI_CPUFREQ && CPU_SUP_AMD
help
This adds AMD-specific powersave bias function to the ondemand
governor, which allows it to make more power-conscious frequency
@@ -157,7 +141,7 @@ config X86_SPEEDSTEP_CENTRINO
depends on X86_32 || (X86_64 && ACPI_PROCESSOR)
help
This is deprecated and this functionality is now merged into
- acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
+ acpi_cpufreq (ACPI_CPUFREQ). Use that driver instead of
speedstep_centrino.
This adds the CPUFreq driver for Enhanced SpeedStep enabled
mobile CPUs. This means Intel Pentium M (Centrino) CPUs
@@ -265,7 +249,7 @@ config X86_E_POWERSAVER
This adds the CPUFreq driver for VIA C7 processors. However, this
driver
does not have any safeguards to prevent operating the CPU out of
spec
and is thus considered dangerous. Please use the regular ACPI
cpufreq
- driver, enabled by CONFIG_X86_ACPI_CPUFREQ.
+ driver, enabled by CONFIG_ACPI_CPUFREQ.
If in doubt, say N.
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 54a05c9..bfeb0fb 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) +=
cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
+obj-$(CONFIG_ACPI_CPUFREQ) += acpi-cpufreq.o
############################################################################
######
# x86 drivers.
@@ -21,7 +22,6 @@ obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
# powernow-k8 can load then. ACPI is preferred to all other
hardware-specific drivers.
# speedstep-* is preferred over p4-clockmod.
-obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
obj-$(CONFIG_X86_PCC_CPUFREQ) += pcc-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o
--
1.7.10.4
Hi all,
I would like to support acpi cpufreq & cpuidle for ARM.
For supporting that, I tried to implement acpi cpufreq & cpuidle for ARM
with ACPI.
This patch is based on http://git.linaro.org/leg/acpi/leg-kernel.git.
[CPUFREQ]
I tried to separate this code into 3 parts which are common, x86-specific
and arm-specific code.
But as you know, there are too much x86-specific code in acpi-cpufreq.c
When I tried to implement acpi-cpufreq-arm, there were a lot of compile
error(due to x86-specific code).
So I used #ifdef CONFIG_X86 to solve those errors.(and some hack codes)
Later I will remove "#ifdef CONFIG_X86".
And, if "ARM64 / ACPI: Introduce arch_register/unregister_cpu() for arm64"
is merged,
Then I can remove #ifdef for arch_un/register_cpu.
[CPUIDLE]
As Sudeep mentioned, I tried to use FFH.
So I made cstate.c file in arm/arm64/kernel.(based on
arch/x86/kernel/acpi/cstate.c)
But I am not sure whether I implemented it properly.
Jonghwan Choi (7):
ACPI-Fix-compile-error-in-arch-x86-kernel-setup.c.patch
cpufreq-Change-CONFIG_-name-from-X86_ACPI_CPUFREQ-to.patch
acpi-Use-Hacks-to-allow-compilation-on-arm-environme.patch
arm64-Change-struct-cpuinfo_arm.patch
cpufreq-Add-ACPI-cpufreq-support-for-ARM.patch
acpi-Add-ACPI-cpuidle-support-for-ARM.patch
acpi-Allow-ACPI_PROCESSOR-for-ARM64.patch
Thanks
Best Regards