X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fasm-alpha%2Fsystem.h;h=03e9c0e5ed7451d99161959d0d6f716e6789984c;hb=2b588224d1b2369dd6d9882a777380225b324006;hp=050e86d12891ef704762adba37cabe4a5cb19fe4;hpb=fac84ef26759a3725bfc53ae3abf21976360aff3;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index 050e86d1289..03e9c0e5ed7 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -1,7 +1,6 @@ #ifndef __ALPHA_SYSTEM_H #define __ALPHA_SYSTEM_H -#include #include #include #include @@ -131,15 +130,25 @@ struct el_common_EV6_mcheck { extern void halt(void) __attribute__((noreturn)); #define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt)) -#define switch_to(P,N,L) \ - do { \ - (L) = alpha_switch_to(virt_to_phys(&(N)->thread_info->pcb), (P)); \ - check_mmu_context(); \ +#define switch_to(P,N,L) \ + do { \ + (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \ + check_mmu_context(); \ } while (0) struct task_struct; extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); +/* + * On SMP systems, when the scheduler does migration-cost autodetection, + * it needs a way to flush as much of the CPU's caches as possible. + * + * TODO: fill this in! + */ +static inline void sched_cacheflush(void) +{ +} + #define imb() \ __asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") @@ -562,7 +571,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) if something tries to do an invalid cmpxchg(). */ extern void __cmpxchg_called_with_bad_pointer(void); -static inline unsigned long +static __always_inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) { switch (size) {