i386: Remove unneeded test of 'task' in dump_trace()
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-blackfin / blackfin.h
blob25b934b7f829a2efa8a2594105323abcc37823b1
1 /*
2 * Common header file for blackfin family of processors.
4 */
6 #ifndef _BLACKFIN_H_
7 #define _BLACKFIN_H_
9 #define LO(con32) ((con32) & 0xFFFF)
10 #define lo(con32) ((con32) & 0xFFFF)
11 #define HI(con32) (((con32) >> 16) & 0xFFFF)
12 #define hi(con32) (((con32) >> 16) & 0xFFFF)
14 #include <asm/mach/blackfin.h>
15 #include <asm/bfin-global.h>
17 #ifndef __ASSEMBLY__
19 /* SSYNC implementation for C file */
20 #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
21 static inline void SSYNC (void)
23 int _tmp;
24 __asm__ __volatile__ ("cli %0;\n\t"
25 "nop;nop;\n\t"
26 "ssync;\n\t"
27 "sti %0;\n\t"
28 :"=d"(_tmp):);
30 #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
31 static inline void SSYNC (void)
33 int _tmp;
34 __asm__ __volatile__ ("cli %0;\n\t"
35 "ssync;\n\t"
36 "sti %0;\n\t"
37 :"=d"(_tmp):);
39 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
40 static inline void SSYNC (void)
42 __asm__ __volatile__ ("nop; nop; nop;\n\t"
43 "ssync;\n\t"
44 ::);
46 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
47 static inline void SSYNC (void)
49 __asm__ __volatile__ ("ssync;\n\t");
51 #endif
53 /* CSYNC implementation for C file */
54 #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
55 static inline void CSYNC (void)
57 int _tmp;
58 __asm__ __volatile__ ("cli %0;\n\t"
59 "nop;nop;\n\t"
60 "csync;\n\t"
61 "sti %0;\n\t"
62 :"=d"(_tmp):);
64 #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
65 static inline void CSYNC (void)
67 int _tmp;
68 __asm__ __volatile__ ("cli %0;\n\t"
69 "csync;\n\t"
70 "sti %0;\n\t"
71 :"=d"(_tmp):);
73 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
74 static inline void CSYNC (void)
76 __asm__ __volatile__ ("nop; nop; nop;\n\t"
77 "ssync;\n\t"
78 ::);
80 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
81 static inline void CSYNC (void)
83 __asm__ __volatile__ ("csync;\n\t");
85 #endif
87 #else /* __ASSEMBLY__ */
89 /* SSYNC & CSYNC implementations for assembly files */
91 #define ssync(x) SSYNC(x)
92 #define csync(x) CSYNC(x)
94 #if defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
95 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
96 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
98 #elif defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
99 #define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
100 #define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
102 #elif !defined(ANOMALY_05000312) && defined(ANOMALY_05000244)
103 #define SSYNC(scratch) nop; nop; nop; SSYNC;
104 #define CSYNC(scratch) nop; nop; nop; CSYNC;
106 #elif !defined(ANOMALY_05000312) && !defined(ANOMALY_05000244)
107 #define SSYNC(scratch) SSYNC;
108 #define CSYNC(scratch) CSYNC;
110 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
112 #endif /* __ASSEMBLY__ */
114 #endif /* _BLACKFIN_H_ */