diff options
Diffstat (limited to 'include/asm-ppc/system.h')
| -rw-r--r-- | include/asm-ppc/system.h | 22 | 
1 files changed, 20 insertions, 2 deletions
| diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index bd99cb53a19f..fb49c0c49ea1 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | #ifndef __PPC_SYSTEM_H | 4 | #ifndef __PPC_SYSTEM_H | 
| 5 | #define __PPC_SYSTEM_H | 5 | #define __PPC_SYSTEM_H | 
| 6 | 6 | ||
| 7 | #include <linux/config.h> | ||
| 8 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> | 
| 9 | 8 | ||
| 10 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> | 
| @@ -39,7 +38,7 @@ | |||
| 39 | #ifdef CONFIG_SMP | 38 | #ifdef CONFIG_SMP | 
| 40 | #define smp_mb() mb() | 39 | #define smp_mb() mb() | 
| 41 | #define smp_rmb() rmb() | 40 | #define smp_rmb() rmb() | 
| 42 | #define smp_wmb() wmb() | 41 | #define smp_wmb() __asm__ __volatile__ ("eieio" : : : "memory") | 
| 43 | #define smp_read_barrier_depends() read_barrier_depends() | 42 | #define smp_read_barrier_depends() read_barrier_depends() | 
| 44 | #else | 43 | #else | 
| 45 | #define smp_mb() barrier() | 44 | #define smp_mb() barrier() | 
| @@ -74,6 +73,7 @@ extern void chrp_nvram_init(void); | |||
| 74 | extern void read_rtc_time(void); | 73 | extern void read_rtc_time(void); | 
| 75 | extern void pmac_find_display(void); | 74 | extern void pmac_find_display(void); | 
| 76 | extern void giveup_fpu(struct task_struct *); | 75 | extern void giveup_fpu(struct task_struct *); | 
| 76 | extern void disable_kernel_fp(void); | ||
| 77 | extern void enable_kernel_fp(void); | 77 | extern void enable_kernel_fp(void); | 
| 78 | extern void flush_fp_to_thread(struct task_struct *); | 78 | extern void flush_fp_to_thread(struct task_struct *); | 
| 79 | extern void enable_kernel_altivec(void); | 79 | extern void enable_kernel_altivec(void); | 
| @@ -86,6 +86,14 @@ extern int fix_alignment(struct pt_regs *); | |||
| 86 | extern void cvt_fd(float *from, double *to, struct thread_struct *thread); | 86 | extern void cvt_fd(float *from, double *to, struct thread_struct *thread); | 
| 87 | extern void cvt_df(double *from, float *to, struct thread_struct *thread); | 87 | extern void cvt_df(double *from, float *to, struct thread_struct *thread); | 
| 88 | 88 | ||
| 89 | #ifndef CONFIG_SMP | ||
| 90 | extern void discard_lazy_cpu_state(void); | ||
| 91 | #else | ||
| 92 | static inline void discard_lazy_cpu_state(void) | ||
| 93 | { | ||
| 94 | } | ||
| 95 | #endif | ||
| 96 | |||
| 89 | #ifdef CONFIG_ALTIVEC | 97 | #ifdef CONFIG_ALTIVEC | 
| 90 | extern void flush_altivec_to_thread(struct task_struct *); | 98 | extern void flush_altivec_to_thread(struct task_struct *); | 
| 91 | #else | 99 | #else | 
| @@ -123,6 +131,16 @@ extern struct task_struct *__switch_to(struct task_struct *, | |||
| 123 | struct task_struct *); | 131 | struct task_struct *); | 
| 124 | #define switch_to(prev, next, last) ((last) = __switch_to((prev), (next))) | 132 | #define switch_to(prev, next, last) ((last) = __switch_to((prev), (next))) | 
| 125 | 133 | ||
| 134 | /* | ||
| 135 | * On SMP systems, when the scheduler does migration-cost autodetection, | ||
| 136 | * it needs a way to flush as much of the CPU's caches as possible. | ||
| 137 | * | ||
| 138 | * TODO: fill this in! | ||
| 139 | */ | ||
| 140 | static inline void sched_cacheflush(void) | ||
| 141 | { | ||
| 142 | } | ||
| 143 | |||
| 126 | struct thread_struct; | 144 | struct thread_struct; | 
| 127 | extern struct task_struct *_switch(struct thread_struct *prev, | 145 | extern struct task_struct *_switch(struct thread_struct *prev, | 
| 128 | struct thread_struct *next); | 146 | struct thread_struct *next); | 
