diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-03-26 23:03:03 -0500 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-03-26 23:03:03 -0500 |
| commit | a0652fc9a28c3ef8cd59264bfcb089c44d1b0e06 (patch) | |
| tree | a28527b65237b3067553a993f5ad06dfb24df044 /include | |
| parent | 55aab8cd3a498201b769a19de861c77516bdfd45 (diff) | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-powerpc/machdep.h | 13 | ||||
| -rw-r--r-- | include/asm-powerpc/reg.h | 4 | ||||
| -rw-r--r-- | include/asm-ppc/machdep.h | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 5348b820788c..21c8dc90d175 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
| @@ -158,6 +158,12 @@ struct machdep_calls { | |||
| 158 | /* Idle loop for this platform, leave empty for default idle loop */ | 158 | /* Idle loop for this platform, leave empty for default idle loop */ |
| 159 | void (*idle_loop)(void); | 159 | void (*idle_loop)(void); |
| 160 | 160 | ||
| 161 | /* | ||
| 162 | * Function for waiting for work with reduced power in idle loop; | ||
| 163 | * called with interrupts disabled. | ||
| 164 | */ | ||
| 165 | void (*power_save)(void); | ||
| 166 | |||
| 161 | /* Function to enable performance monitor counters for this | 167 | /* Function to enable performance monitor counters for this |
| 162 | platform, called once per cpu. */ | 168 | platform, called once per cpu. */ |
| 163 | void (*enable_pmcs)(void); | 169 | void (*enable_pmcs)(void); |
| @@ -170,9 +176,6 @@ struct machdep_calls { | |||
| 170 | May be NULL. */ | 176 | May be NULL. */ |
| 171 | void (*init)(void); | 177 | void (*init)(void); |
| 172 | 178 | ||
| 173 | void (*idle)(void); | ||
| 174 | void (*power_save)(void); | ||
| 175 | |||
| 176 | void (*heartbeat)(void); | 179 | void (*heartbeat)(void); |
| 177 | unsigned long heartbeat_reset; | 180 | unsigned long heartbeat_reset; |
| 178 | unsigned long heartbeat_count; | 181 | unsigned long heartbeat_count; |
| @@ -242,8 +245,8 @@ struct machdep_calls { | |||
| 242 | #endif /* CONFIG_KEXEC */ | 245 | #endif /* CONFIG_KEXEC */ |
| 243 | }; | 246 | }; |
| 244 | 247 | ||
| 245 | extern void default_idle(void); | 248 | extern void power4_idle(void); |
| 246 | extern void native_idle(void); | 249 | extern void ppc6xx_idle(void); |
| 247 | 250 | ||
| 248 | extern struct machdep_calls ppc_md; | 251 | extern struct machdep_calls ppc_md; |
| 249 | extern char cmd_line[COMMAND_LINE_SIZE]; | 252 | extern char cmd_line[COMMAND_LINE_SIZE]; |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 72bfe3af0460..bd467bf5cf5a 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
| @@ -622,6 +622,10 @@ extern void ppc64_runlatch_off(void); | |||
| 622 | extern unsigned long scom970_read(unsigned int address); | 622 | extern unsigned long scom970_read(unsigned int address); |
| 623 | extern void scom970_write(unsigned int address, unsigned long value); | 623 | extern void scom970_write(unsigned int address, unsigned long value); |
| 624 | 624 | ||
| 625 | #else | ||
| 626 | #define ppc64_runlatch_on() | ||
| 627 | #define ppc64_runlatch_off() | ||
| 628 | |||
| 625 | #endif /* CONFIG_PPC64 */ | 629 | #endif /* CONFIG_PPC64 */ |
| 626 | 630 | ||
| 627 | #define __get_SP() ({unsigned long sp; \ | 631 | #define __get_SP() ({unsigned long sp; \ |
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h index a3e8a45e45a9..ebbef64e8985 100644 --- a/include/asm-ppc/machdep.h +++ b/include/asm-ppc/machdep.h | |||
| @@ -44,7 +44,7 @@ struct machdep_calls { | |||
| 44 | void (*power_off)(void); | 44 | void (*power_off)(void); |
| 45 | void (*halt)(void); | 45 | void (*halt)(void); |
| 46 | 46 | ||
| 47 | void (*idle)(void); | 47 | void (*idle_loop)(void); |
| 48 | void (*power_save)(void); | 48 | void (*power_save)(void); |
| 49 | 49 | ||
| 50 | long (*time_init)(void); /* Optional, may be NULL */ | 50 | long (*time_init)(void); /* Optional, may be NULL */ |
