Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293957
b: refs/heads/master
c: 0db07a9
h: refs/heads/master
i:
  293955: 47d7fd5
v: v3
  • Loading branch information
Bob Liu committed Mar 21, 2012
1 parent 87587d9 commit 5609469
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff4db3b14c30974c4c951772cb4e13b16bd676bb
refs/heads/master: 0db07a905628d7f2952691df40853ffd95ceb097
44 changes: 20 additions & 24 deletions trunk/arch/blackfin/include/asm/blackfin.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,16 @@
static inline void SSYNC(void)
{
int _tmp;
if (ANOMALY_05000312)
if (ANOMALY_05000312 || ANOMALY_05000244)
__asm__ __volatile__(
"cli %0;"
"nop;"
"nop;"
"nop;"
"ssync;"
"sti %0;"
: "=d" (_tmp)
);
else if (ANOMALY_05000244)
__asm__ __volatile__(
"nop;"
"nop;"
"nop;"
"ssync;"
);
else
__asm__ __volatile__("ssync;");
}
Expand All @@ -41,22 +35,16 @@ static inline void SSYNC(void)
static inline void CSYNC(void)
{
int _tmp;
if (ANOMALY_05000312)
if (ANOMALY_05000312 || ANOMALY_05000244)
__asm__ __volatile__(
"cli %0;"
"nop;"
"nop;"
"nop;"
"csync;"
"sti %0;"
: "=d" (_tmp)
);
else if (ANOMALY_05000244)
__asm__ __volatile__(
"nop;"
"nop;"
"nop;"
"csync;"
);
else
__asm__ __volatile__("csync;");
}
Expand All @@ -73,18 +61,26 @@ static inline void CSYNC(void)
#define ssync(x) SSYNC(x)
#define csync(x) CSYNC(x)

#if ANOMALY_05000312
#define SSYNC(scratch) cli scratch; nop; nop; SSYNC; sti scratch;
#define CSYNC(scratch) cli scratch; nop; nop; CSYNC; sti scratch;

#elif ANOMALY_05000244
#define SSYNC(scratch) nop; nop; nop; SSYNC;
#define CSYNC(scratch) nop; nop; nop; CSYNC;
#if ANOMALY_05000312 || ANOMALY_05000244
#define SSYNC(scratch) \
do { \
cli scratch; \
nop; nop; nop; \
SSYNC; \
sti scratch; \
} while (0)

#define CSYNC(scratch) \
do { \
cli scratch; \
nop; nop; nop; \
CSYNC; \
sti scratch; \
} while (0)

#else
#define SSYNC(scratch) SSYNC;
#define CSYNC(scratch) CSYNC;

#endif /* ANOMALY_05000312 & ANOMALY_05000244 handling */

#endif /* __ASSEMBLY__ */
Expand Down

0 comments on commit 5609469

Please sign in to comment.