Fix IRQ flag handling naming
[linux-2.6/cjktty.git] / arch / cris / include / arch-v10 / arch / system.h
blob935fde34aa15782db1fc2dd7c39e4b47c2a96992
1 #ifndef __ASM_CRIS_ARCH_SYSTEM_H
2 #define __ASM_CRIS_ARCH_SYSTEM_H
5 /* read the CPU version register */
7 static inline unsigned long rdvr(void) {
8 unsigned char vr;
9 __asm__ volatile ("move $vr,%0" : "=rm" (vr));
10 return vr;
13 #define cris_machine_name "cris"
15 /* read/write the user-mode stackpointer */
17 static inline unsigned long rdusp(void) {
18 unsigned long usp;
19 __asm__ __volatile__("move $usp,%0" : "=rm" (usp));
20 return usp;
23 #define wrusp(usp) \
24 __asm__ __volatile__("move %0,$usp" : /* no outputs */ : "rm" (usp))
26 /* read the current stackpointer */
28 static inline unsigned long rdsp(void) {
29 unsigned long sp;
30 __asm__ __volatile__("move.d $sp,%0" : "=rm" (sp));
31 return sp;
34 static inline unsigned long _get_base(char * addr)
36 return 0;
39 #define nop() __asm__ __volatile__ ("nop");
41 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
42 #define tas(ptr) (xchg((ptr),1))
44 struct __xchg_dummy { unsigned long a[100]; };
45 #define __xg(x) ((struct __xchg_dummy *)(x))
47 #endif