1 #ifndef __ASM_SH_SYSTEM_64_H
2 #define __ASM_SH_SYSTEM_64_H
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
15 #include <cpu/registers.h>
16 #include <asm/processor.h>
19 * switch_to() should switch tasks to task nr n, first
21 struct task_struct *sh64_switch_to(struct task_struct *prev,
22 struct thread_struct *prev_thread,
23 struct task_struct *next,
24 struct thread_struct *next_thread);
26 #define switch_to(prev,next,last) \
28 if (last_task_used_math != next) { \
29 struct pt_regs *regs = next->thread.uregs; \
30 if (regs) regs->sr |= SR_FD; \
32 last = sh64_switch_to(prev, &prev->thread, next, \
36 #define __uses_jump_to_uncached
38 #define jump_to_uncached() do { } while (0)
39 #define back_to_cached() do { } while (0)
41 #define __icbi(addr) __asm__ __volatile__ ( "icbi %0, 0\n\t" : : "r" (addr))
42 #define __ocbp(addr) __asm__ __volatile__ ( "ocbp %0, 0\n\t" : : "r" (addr))
43 #define __ocbi(addr) __asm__ __volatile__ ( "ocbi %0, 0\n\t" : : "r" (addr))
44 #define __ocbwb(addr) __asm__ __volatile__ ( "ocbwb %0, 0\n\t" : : "r" (addr))
46 static inline reg_size_t register_align(void *val)
48 return (unsigned long long)(signed long long)(signed long)val;
51 #define SR_BL_LL 0x0000000010000000LL
53 static inline void set_bl_bit(void)
55 unsigned long long __dummy0, __dummy1 = SR_BL_LL;
57 __asm__ __volatile__("getcon " __SR ", %0\n\t"
59 "putcon %0, " __SR "\n\t"
65 static inline void clear_bl_bit(void)
67 unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
69 __asm__ __volatile__("getcon " __SR ", %0\n\t"
71 "putcon %0, " __SR "\n\t"
76 #endif /* __ASM_SH_SYSTEM_64_H */