]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
powerpc: Cleanup idle for e500
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 19 Sep 2022 17:01:42 +0000 (19:01 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Sep 2022 13:00:14 +0000 (23:00 +1000)
e500 idle setup is a bit messy.

e500_idle() is used for PPC32 while book3e_idle() is used for PPC64.
As they are mutually exclusive, call them all e500_idle().

Use CONFIG_MPC_85xx instead of PPC32 + E500 in Makefile and rename
idle_e500.c to idle_85xx.c .

Rename idle_book3e.c to idle_64e.c and remove #ifdef PPC64 in
as it's only built on PPC64.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/8039301334e948974c85ec5ef2db37751075185b.1663606876.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/machdep.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/idle_64e.S [moved from arch/powerpc/kernel/idle_book3e.S with 93% similarity]
arch/powerpc/kernel/idle_85xx.S [moved from arch/powerpc/kernel/idle_e500.S with 100% similarity]
arch/powerpc/platforms/85xx/corenet_generic.c
arch/powerpc/platforms/85xx/qemu_e500.c

index 8cb83600c43461c23d58ded17beeda37ac904284..378b8d5836a7b8fe249a19fe43ffa8edeb673e92 100644 (file)
@@ -204,7 +204,6 @@ struct machdep_calls {
 extern void e500_idle(void);
 extern void power4_idle(void);
 extern void ppc6xx_idle(void);
-extern void book3e_idle(void);
 
 /*
  * ppc_md contains a copy of the machine description structure for the
index 658c4dffaa56d941093ce39bcce31043b5b02023..1f121c1888051f8bb464f23b4f6f39dd8bd3f34f 100644 (file)
@@ -81,7 +81,7 @@ obj-$(CONFIG_PPC_DAWR)                += dawr.o
 obj-$(CONFIG_PPC_BOOK3S_64)    += cpu_setup_ppc970.o cpu_setup_pa6t.o
 obj-$(CONFIG_PPC_BOOK3S_64)    += cpu_setup_power.o
 obj-$(CONFIG_PPC_BOOK3S_64)    += mce.o mce_power.o
-obj-$(CONFIG_PPC_BOOK3E_64)    += exceptions-64e.o idle_book3e.o
+obj-$(CONFIG_PPC_BOOK3E_64)    += exceptions-64e.o idle_64e.o
 obj-$(CONFIG_PPC_BARRIER_NOSPEC) += security.o
 obj-$(CONFIG_PPC64)            += vdso64_wrapper.o
 obj-$(CONFIG_ALTIVEC)          += vecemu.o
@@ -100,9 +100,7 @@ obj-$(CONFIG_GENERIC_TBSYNC)        += smp-tbsync.o
 obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_FA_DUMP)          += fadump.o
 obj-$(CONFIG_PRESERVE_FA_DUMP) += fadump.o
-ifdef CONFIG_PPC32
-obj-$(CONFIG_PPC_E500)         += idle_e500.o
-endif
+obj-$(CONFIG_PPC_85xx)         += idle_85xx.o
 obj-$(CONFIG_PPC_BOOK3S_32)    += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
 obj-$(CONFIG_TAU)              += tau_6xx.o
 obj-$(CONFIG_HIBERNATION)      += swsusp.o suspend.o
similarity index 93%
rename from arch/powerpc/kernel/idle_book3e.S
rename to arch/powerpc/kernel/idle_64e.S
index cc008de58b050925f81a2c05407f87e1bd2f3185..1736aad2afe9477f9496b8f5cb7c46690861537c 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Copyright 2010 IBM Corp, Benjamin Herrenschmidt <benh@kernel.crashing.org>
  *
- * Generic idle routine for Book3E processors
+ * Generic idle routine for 64 bits e500 processors
  */
 
 #include <linux/threads.h>
@@ -16,8 +16,6 @@
 #include <asm/hw_irq.h>
 
 /* 64-bit version only for now */
-#ifdef CONFIG_PPC64
-
 .macro BOOK3E_IDLE name loop
 _GLOBAL(\name)
        /* Save LR for later */
@@ -98,6 +96,4 @@ epapr_ev_idle_start:
 
 BOOK3E_IDLE epapr_ev_idle EPAPR_EV_IDLE_LOOP
 
-BOOK3E_IDLE book3e_idle BOOK3E_IDLE_LOOP
-
-#endif /* CONFIG_PPC64 */
+BOOK3E_IDLE e500_idle BOOK3E_IDLE_LOOP
index 28d6b36f1ccdb96eae6fe2ba912d3dd0e88e6ad0..2c539de2d629a01ce6ae9e998b5419fe30f86eb8 100644 (file)
@@ -200,9 +200,5 @@ define_machine(corenet_generic) {
 #endif
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = udbg_progress,
-#ifdef CONFIG_PPC64
-       .power_save             = book3e_idle,
-#else
        .power_save             = e500_idle,
-#endif
 };
index 64109ad6736c14ca97833adc5fff251e338b93e5..1639e222cc33f015a239aab0ab31cda4085ca60c 100644 (file)
@@ -68,9 +68,5 @@ define_machine(qemu_e500) {
        .get_irq                = mpic_get_coreint_irq,
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = udbg_progress,
-#ifdef CONFIG_PPC64
-       .power_save             = book3e_idle,
-#else
        .power_save             = e500_idle,
-#endif
 };