mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
powerpc: Unify the 32 and 64 bit idle loops
This unifies the 32-bit (ARCH=ppc and ARCH=powerpc) and 64-bit idle loops. It brings over the concept of having a ppc_md.power_save function from 32-bit to ARCH=powerpc, which lets us get rid of native_idle(). With this we will also be able to simplify the idle handling for pSeries and cell. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
55aab8cd3a
commit
a0652fc9a2
18 changed files with 74 additions and 535 deletions
|
|
@ -158,6 +158,12 @@ struct machdep_calls {
|
|||
/* Idle loop for this platform, leave empty for default idle loop */
|
||||
void (*idle_loop)(void);
|
||||
|
||||
/*
|
||||
* Function for waiting for work with reduced power in idle loop;
|
||||
* called with interrupts disabled.
|
||||
*/
|
||||
void (*power_save)(void);
|
||||
|
||||
/* Function to enable performance monitor counters for this
|
||||
platform, called once per cpu. */
|
||||
void (*enable_pmcs)(void);
|
||||
|
|
@ -170,9 +176,6 @@ struct machdep_calls {
|
|||
May be NULL. */
|
||||
void (*init)(void);
|
||||
|
||||
void (*idle)(void);
|
||||
void (*power_save)(void);
|
||||
|
||||
void (*heartbeat)(void);
|
||||
unsigned long heartbeat_reset;
|
||||
unsigned long heartbeat_count;
|
||||
|
|
@ -242,8 +245,8 @@ struct machdep_calls {
|
|||
#endif /* CONFIG_KEXEC */
|
||||
};
|
||||
|
||||
extern void default_idle(void);
|
||||
extern void native_idle(void);
|
||||
extern void power4_idle(void);
|
||||
extern void ppc6xx_idle(void);
|
||||
|
||||
extern struct machdep_calls ppc_md;
|
||||
extern char cmd_line[COMMAND_LINE_SIZE];
|
||||
|
|
|
|||
|
|
@ -622,6 +622,10 @@ extern void ppc64_runlatch_off(void);
|
|||
extern unsigned long scom970_read(unsigned int address);
|
||||
extern void scom970_write(unsigned int address, unsigned long value);
|
||||
|
||||
#else
|
||||
#define ppc64_runlatch_on()
|
||||
#define ppc64_runlatch_off()
|
||||
|
||||
#endif /* CONFIG_PPC64 */
|
||||
|
||||
#define __get_SP() ({unsigned long sp; \
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ struct machdep_calls {
|
|||
void (*power_off)(void);
|
||||
void (*halt)(void);
|
||||
|
||||
void (*idle)(void);
|
||||
void (*idle_loop)(void);
|
||||
void (*power_save)(void);
|
||||
|
||||
long (*time_init)(void); /* Optional, may be NULL */
|
||||
|
|
|
|||
Loading…
Reference in a new issue