diff options
Diffstat (limited to 'include/asm-alpha/processor.h')
| -rw-r--r-- | include/asm-alpha/processor.h | 34 | 
1 files changed, 2 insertions, 32 deletions
| diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h index 059780a7d3d7..425b7b6d28cb 100644 --- a/include/asm-alpha/processor.h +++ b/include/asm-alpha/processor.h | |||
| @@ -52,19 +52,10 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | |||
| 52 | 52 | ||
| 53 | unsigned long get_wchan(struct task_struct *p); | 53 | unsigned long get_wchan(struct task_struct *p); | 
| 54 | 54 | ||
| 55 | /* See arch/alpha/kernel/ptrace.c for details. */ | 55 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) | 
| 56 | #define PT_REG(reg) \ | ||
| 57 | (PAGE_SIZE*2 - sizeof(struct pt_regs) + offsetof(struct pt_regs, reg)) | ||
| 58 | |||
| 59 | #define SW_REG(reg) \ | ||
| 60 | (PAGE_SIZE*2 - sizeof(struct pt_regs) - sizeof(struct switch_stack) \ | ||
| 61 | + offsetof(struct switch_stack, reg)) | ||
| 62 | |||
| 63 | #define KSTK_EIP(tsk) \ | ||
| 64 | (*(unsigned long *)(PT_REG(pc) + (unsigned long) ((tsk)->thread_info))) | ||
| 65 | 56 | ||
| 66 | #define KSTK_ESP(tsk) \ | 57 | #define KSTK_ESP(tsk) \ | 
| 67 | ((tsk) == current ? rdusp() : (tsk)->thread_info->pcb.usp) | 58 | ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp) | 
| 68 | 59 | ||
| 69 | #define cpu_relax() barrier() | 60 | #define cpu_relax() barrier() | 
| 70 | 61 | ||
| @@ -77,7 +68,6 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 77 | #define spin_lock_prefetch(lock) do { } while (0) | 68 | #define spin_lock_prefetch(lock) do { } while (0) | 
| 78 | #endif | 69 | #endif | 
| 79 | 70 | ||
| 80 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) | ||
| 81 | extern inline void prefetch(const void *ptr) | 71 | extern inline void prefetch(const void *ptr) | 
| 82 | { | 72 | { | 
| 83 | __builtin_prefetch(ptr, 0, 3); | 73 | __builtin_prefetch(ptr, 0, 3); | 
| @@ -95,24 +85,4 @@ extern inline void spin_lock_prefetch(const void *ptr) | |||
| 95 | } | 85 | } | 
| 96 | #endif | 86 | #endif | 
| 97 | 87 | ||
| 98 | #else | ||
| 99 | extern inline void prefetch(const void *ptr) | ||
| 100 | { | ||
| 101 | __asm__ ("ldl $31,%0" : : "m"(*(char *)ptr)); | ||
| 102 | } | ||
| 103 | |||
| 104 | extern inline void prefetchw(const void *ptr) | ||
| 105 | { | ||
| 106 | __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); | ||
| 107 | } | ||
| 108 | |||
| 109 | #ifdef CONFIG_SMP | ||
| 110 | extern inline void spin_lock_prefetch(const void *ptr) | ||
| 111 | { | ||
| 112 | __asm__ ("ldq $31,%0" : : "m"(*(char *)ptr)); | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | |||
| 116 | #endif /* GCC 3.1 */ | ||
| 117 | |||
| 118 | #endif /* __ASM_ALPHA_PROCESSOR_H */ | 88 | #endif /* __ASM_ALPHA_PROCESSOR_H */ | 
