powerpc: Add asm/syscall.h with the tracehook entry points
[deliverable/linux.git] / include / asm-blackfin / blackfin.h
CommitLineData
1394f032
BW
1/*
2 * Common header file for blackfin family of processors.
3 *
4 */
5
6#ifndef _BLACKFIN_H_
7#define _BLACKFIN_H_
8
df30b117
MF
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)
13
36a1548f 14#include <asm/mach/anomaly.h>
1394f032
BW
15
16#ifndef __ASSEMBLY__
17
18/* SSYNC implementation for C file */
1aafd909 19static inline void SSYNC(void)
1394f032
BW
20{
21 int _tmp;
fb51d566 22 if (ANOMALY_05000312)
1aafd909
MF
23 __asm__ __volatile__(
24 "cli %0;"
25 "nop;"
26 "nop;"
27 "ssync;"
28 "sti %0;"
29 : "=d" (_tmp)
30 );
fb51d566 31 else if (ANOMALY_05000244)
1aafd909
MF
32 __asm__ __volatile__(
33 "nop;"
34 "nop;"
35 "nop;"
36 "ssync;"
37 );
38 else
39 __asm__ __volatile__("ssync;");
1394f032 40}
1394f032
BW
41
42/* CSYNC implementation for C file */
1aafd909 43static inline void CSYNC(void)
1394f032
BW
44{
45 int _tmp;
fb51d566 46 if (ANOMALY_05000312)
1aafd909
MF
47 __asm__ __volatile__(
48 "cli %0;"
49 "nop;"
50 "nop;"
51 "csync;"
52 "sti %0;"
53 : "=d" (_tmp)
54 );
fb51d566 55 else if (ANOMALY_05000244)
1aafd909
MF
56 __asm__ __volatile__(
57 "nop;"
58 "nop;"
59 "nop;"
35c724f3 60 "csync;"
1aafd909
MF
61 );
62 else
63 __asm__ __volatile__("csync;");
1394f032 64}
1394f032 65
4bf3f3cb
RG
66#else /* __ASSEMBLY__ */
67
68/* SSYNC & CSYNC implementations for assembly files */
69
70#define ssync(x) SSYNC(x)
71#define csync(x) CSYNC(x)
72
fb51d566 73#if ANOMALY_05000312
4bf3f3cb
RG
74#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
75#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;
76
fb51d566 77#elif ANOMALY_05000244
4bf3f3cb
RG
78#define SSYNC(scratch) nop; nop; nop; SSYNC;
79#define CSYNC(scratch) nop; nop; nop; CSYNC;
80
fb51d566 81#else
4bf3f3cb
RG
82#define SSYNC(scratch) SSYNC;
83#define CSYNC(scratch) CSYNC;
84
85#endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
86
1394f032
BW
87#endif /* __ASSEMBLY__ */
88
36a1548f
MF
89#include <asm/mach/blackfin.h>
90#include <asm/bfin-global.h>
91
1394f032 92#endif /* _BLACKFIN_H_ */
This page took 0.194497 seconds and 5 git commands to generate.