Commit ffd2961b authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10

This driver does not restore stop > 3 state, so it limits itself
to states which do not lose full state or TB.

The POWER10 SPRs are sufficiently different from P9 that it seems
easier to split out the P10 code. The POWER10 deep sleep code
(e.g., the BHRB restore) has been taken out, but it can be re-added
when stop > 3 support is added.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Tested-by: Pratik Rajesh Sampat<psampat@linux.ibm.com>
Tested-by: default avatarVaidyanathan Srinivasan <svaidy@linux.ibm.com>
Reviewed-by: Pratik Rajesh Sampat<psampat@linux.ibm.com>
Reviewed-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200819094700.493399-1-npiggin@gmail.com
parent 79b123cd
...@@ -222,8 +222,6 @@ struct machdep_calls { ...@@ -222,8 +222,6 @@ struct machdep_calls {
extern void e500_idle(void); extern void e500_idle(void);
extern void power4_idle(void); extern void power4_idle(void);
extern void power7_idle(void);
extern void power9_idle(void);
extern void ppc6xx_idle(void); extern void ppc6xx_idle(void);
extern void book3e_idle(void); extern void book3e_idle(void);
......
...@@ -432,7 +432,7 @@ enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; ...@@ -432,7 +432,7 @@ enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
extern int powersave_nap; /* set if nap mode can be used in idle loop */ extern int powersave_nap; /* set if nap mode can be used in idle loop */
extern void power7_idle_type(unsigned long type); extern void power7_idle_type(unsigned long type);
extern void power9_idle_type(unsigned long stop_psscr_val, extern void arch300_idle_type(unsigned long stop_psscr_val,
unsigned long stop_psscr_mask); unsigned long stop_psscr_mask);
extern int fix_alignment(struct pt_regs *); extern int fix_alignment(struct pt_regs *);
......
...@@ -1353,6 +1353,7 @@ ...@@ -1353,6 +1353,7 @@
#define PVR_POWER8NVL 0x004C #define PVR_POWER8NVL 0x004C
#define PVR_POWER8 0x004D #define PVR_POWER8 0x004D
#define PVR_POWER9 0x004E #define PVR_POWER9 0x004E
#define PVR_POWER10 0x0080
#define PVR_BE 0x0070 #define PVR_BE 0x0070
#define PVR_PA6T 0x0090 #define PVR_PA6T 0x0090
......
This diff is collapsed.
...@@ -141,7 +141,7 @@ static int stop_loop(struct cpuidle_device *dev, ...@@ -141,7 +141,7 @@ static int stop_loop(struct cpuidle_device *dev,
struct cpuidle_driver *drv, struct cpuidle_driver *drv,
int index) int index)
{ {
power9_idle_type(stop_psscr_table[index].val, arch300_idle_type(stop_psscr_table[index].val,
stop_psscr_table[index].mask); stop_psscr_table[index].mask);
return index; return index;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment