NFSv4.1/flexfiles: Fix a protocol error in layoutreturn
[linux/fpc-iii.git] / arch / blackfin / include / asm / blackfin.h
blobf111f366d758e0eb8c41731534fe5ca122d2c26d
1 /*
2 * Common header file for Blackfin family of processors.
4 * Copyright 2004-2009 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
7 */
9 #ifndef _BLACKFIN_H_
10 #define _BLACKFIN_H_
12 #include <mach/anomaly.h>
14 #ifndef __ASSEMBLY__
16 /* SSYNC implementation for C file */
17 static inline void SSYNC(void)
19 int _tmp;
20 if (ANOMALY_05000312 || ANOMALY_05000244)
21 __asm__ __volatile__(
22 "cli %0;"
23 "nop;"
24 "nop;"
25 "nop;"
26 "ssync;"
27 "sti %0;"
28 : "=d" (_tmp)
30 else
31 __asm__ __volatile__("ssync;");
34 /* CSYNC implementation for C file */
35 static inline void CSYNC(void)
37 int _tmp;
38 if (ANOMALY_05000312 || ANOMALY_05000244)
39 __asm__ __volatile__(
40 "cli %0;"
41 "nop;"
42 "nop;"
43 "nop;"
44 "csync;"
45 "sti %0;"
46 : "=d" (_tmp)
48 else
49 __asm__ __volatile__("csync;");
52 #else /* __ASSEMBLY__ */
54 #define LO(con32) ((con32) & 0xFFFF)
55 #define lo(con32) ((con32) & 0xFFFF)
56 #define HI(con32) (((con32) >> 16) & 0xFFFF)
57 #define hi(con32) (((con32) >> 16) & 0xFFFF)
59 /* SSYNC & CSYNC implementations for assembly files */
61 #define ssync(x) SSYNC(x)
62 #define csync(x) CSYNC(x)
64 #if ANOMALY_05000312 || ANOMALY_05000244
65 #define SSYNC(scratch) \
66 cli scratch; \
67 nop; nop; nop; \
68 SSYNC; \
69 sti scratch;
71 #define CSYNC(scratch) \
72 cli scratch; \
73 nop; nop; nop; \
74 CSYNC; \
75 sti scratch;
77 #else
78 #define SSYNC(scratch) SSYNC;
79 #define CSYNC(scratch) CSYNC;
80 #endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */
82 #endif /* __ASSEMBLY__ */
84 #include <asm/mem_map.h>
85 #include <mach/blackfin.h>
86 #include <asm/bfin-global.h>
88 #endif /* _BLACKFIN_H_ */