bonding: fix rx_handler locking
[linux/fpc-iii.git] / arch / sh / include / asm / system_64.h
blob8593bc8d1a4e74af89ace4cb2e767b9fd0567ea6
1 #ifndef __ASM_SH_SYSTEM_64_H
2 #define __ASM_SH_SYSTEM_64_H
4 /*
5 * include/asm-sh/system_64.h
7 * Copyright (C) 2000, 2001 Paolo Alberelli
8 * Copyright (C) 2003 Paul Mundt
9 * Copyright (C) 2004 Richard Curnow
11 * This file is subject to the terms and conditions of the GNU General Public
12 * License. See the file "COPYING" in the main directory of this archive
13 * for more details.
15 #include <cpu/registers.h>
16 #include <asm/processor.h>
19 * switch_to() should switch tasks to task nr n, first
21 struct thread_struct;
22 struct task_struct *sh64_switch_to(struct task_struct *prev,
23 struct thread_struct *prev_thread,
24 struct task_struct *next,
25 struct thread_struct *next_thread);
27 #define switch_to(prev,next,last) \
28 do { \
29 if (last_task_used_math != next) { \
30 struct pt_regs *regs = next->thread.uregs; \
31 if (regs) regs->sr |= SR_FD; \
32 } \
33 last = sh64_switch_to(prev, &prev->thread, next, \
34 &next->thread); \
35 } while (0)
37 #define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))
38 #define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))
39 #define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))
40 #define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))
42 static inline reg_size_t register_align(void *val)
44 return (unsigned long long)(signed long long)(signed long)val;
47 extern void phys_stext(void);
49 static inline void trigger_address_error(void)
51 phys_stext();
54 #define SR_BL_LL 0x0000000010000000LL
56 static inline void set_bl_bit(void)
58 unsigned long long __dummy0, __dummy1 = SR_BL_LL;
60 __asm__ __volatile__("getcon " __SR ", %0\n\t"
61 "or %0, %1, %0\n\t"
62 "putcon %0, " __SR "\n\t"
63 : "=&r" (__dummy0)
64 : "r" (__dummy1));
68 static inline void clear_bl_bit(void)
70 unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
72 __asm__ __volatile__("getcon " __SR ", %0\n\t"
73 "and %0, %1, %0\n\t"
74 "putcon %0, " __SR "\n\t"
75 : "=&r" (__dummy0)
76 : "r" (__dummy1));
79 #endif /* __ASM_SH_SYSTEM_64_H */