diff mbox series

[2/3] arm64: cpuidle: Move ACPI specific code into drivers/acpi/arm64/

Message ID 20240605131458.3341095-3-sudeep.holla@arm.com
State Accepted
Commit 99e7a8adc0ca906151f5d70ff68b8a81f53fd106
Headers show
Series ACPI: arm64: some cleanups | expand

Commit Message

Sudeep Holla June 5, 2024, 1:14 p.m. UTC
The ACPI cpuidle LPI FFH code can be moved out of arm64 arch code as
it just uses SMCCC. Move all the ACPI cpuidle LPI FFH code into
drivers/acpi/arm64/cpuidle.c

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 arch/arm64/kernel/Makefile                          | 1 -
 drivers/acpi/arm64/Makefile                         | 1 +
 {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c | 4 ----
 3 files changed, 1 insertion(+), 5 deletions(-)
 rename {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c (97%)

Comments

Catalin Marinas June 11, 2024, 4:54 p.m. UTC | #1
On Wed, Jun 05, 2024 at 02:14:57PM +0100, Sudeep Holla wrote:
> The ACPI cpuidle LPI FFH code can be moved out of arm64 arch code as
> it just uses SMCCC. Move all the ACPI cpuidle LPI FFH code into
> drivers/acpi/arm64/cpuidle.c
> 
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  arch/arm64/kernel/Makefile                          | 1 -
>  drivers/acpi/arm64/Makefile                         | 1 +
>  {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c | 4 ----
>  3 files changed, 1 insertion(+), 5 deletions(-)
>  rename {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c (97%)

For arch/arm64 changes:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

Lorenzo, Hanjun, please let me know if you want these to go in via the
arm64 tree or Raphael's one.
Hanjun Guo June 13, 2024, 2:21 a.m. UTC | #2
On 2024/6/12 0:54, Catalin Marinas wrote:
> On Wed, Jun 05, 2024 at 02:14:57PM +0100, Sudeep Holla wrote:
>> The ACPI cpuidle LPI FFH code can be moved out of arm64 arch code as
>> it just uses SMCCC. Move all the ACPI cpuidle LPI FFH code into
>> drivers/acpi/arm64/cpuidle.c
>>
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>> ---
>>   arch/arm64/kernel/Makefile                          | 1 -
>>   drivers/acpi/arm64/Makefile                         | 1 +
>>   {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c | 4 ----
>>   3 files changed, 1 insertion(+), 5 deletions(-)
>>   rename {arch/arm64/kernel => drivers/acpi/arm64}/cpuidle.c (97%)
> 
> For arch/arm64 changes:
> 
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> Lorenzo, Hanjun, please let me know if you want these to go in via the
> arm64 tree or Raphael's one.

As it's arm64 related code, I would like to go via the arm64 tree.

Thanks
Hanjun
diff mbox series

Patch

diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index 763824963ed1..2b112f3b7510 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -46,7 +46,6 @@  obj-$(CONFIG_PERF_EVENTS)		+= perf_regs.o perf_callchain.o
 obj-$(CONFIG_HARDLOCKUP_DETECTOR_PERF)	+= watchdog_hld.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
 obj-$(CONFIG_CPU_PM)			+= sleep.o suspend.o
-obj-$(CONFIG_CPU_IDLE)			+= cpuidle.o
 obj-$(CONFIG_JUMP_LABEL)		+= jump_label.o
 obj-$(CONFIG_KGDB)			+= kgdb.o
 obj-$(CONFIG_EFI)			+= efi.o efi-rt-wrapper.o
diff --git a/drivers/acpi/arm64/Makefile b/drivers/acpi/arm64/Makefile
index 7d7fd6512bca..2efee23f00b4 100644
--- a/drivers/acpi/arm64/Makefile
+++ b/drivers/acpi/arm64/Makefile
@@ -3,6 +3,7 @@  obj-$(CONFIG_ACPI_AGDI) 	+= agdi.o
 obj-$(CONFIG_ACPI_APMT) 	+= apmt.o
 obj-$(CONFIG_ACPI_GTDT) 	+= gtdt.o
 obj-$(CONFIG_ACPI_IORT) 	+= iort.o
+obj-$(CONFIG_ACPI_PROCESSOR_IDLE) += cpuidle.o
 obj-$(CONFIG_ARM_AMBA)		+= amba.o
 obj-y				+= dma.o init.o
 obj-y				+= thermal_cpufreq.o
diff --git a/arch/arm64/kernel/cpuidle.c b/drivers/acpi/arm64/cpuidle.c
similarity index 97%
rename from arch/arm64/kernel/cpuidle.c
rename to drivers/acpi/arm64/cpuidle.c
index f372295207fb..801f9c450142 100644
--- a/arch/arm64/kernel/cpuidle.c
+++ b/drivers/acpi/arm64/cpuidle.c
@@ -10,9 +10,6 @@ 
 #include <linux/cpuidle.h>
 #include <linux/cpu_pm.h>
 #include <linux/psci.h>
-
-#ifdef CONFIG_ACPI_PROCESSOR_IDLE
-
 #include <acpi/processor.h>
 
 #define ARM64_LPI_IS_RETENTION_STATE(arch_flags) (!(arch_flags))
@@ -71,4 +68,3 @@  __cpuidle int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
 		return CPU_PM_CPU_IDLE_ENTER_PARAM_RCU(psci_cpu_suspend_enter,
 					     lpi->index, state);
 }
-#endif