aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-10-22 00:42:39 -0400
committerChris Zankel <chris@zankel.net>2012-12-19 00:10:21 -0500
commit288dc2b68c110cd2b14b17f047b85859bc644955 (patch)
tree73edd035cab440723ec938f070ef423b76eb8348 /arch/xtensa
parent382cb5b91747f4f4d1f9883a39deec1b3d7fb906 (diff)
xtensa: properly fix missing compiler barrier in simcall
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/platforms/iss/include/platform/simcall.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/xtensa/platforms/iss/include/platform/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h
index bd78192e2fc9..b5a4edf02d76 100644
--- a/arch/xtensa/platforms/iss/include/platform/simcall.h
+++ b/arch/xtensa/platforms/iss/include/platform/simcall.h
@@ -74,13 +74,12 @@ static inline int __simc(int a, int b, int c, int d, int e, int f)
74 "mov %1, a3\n" 74 "mov %1, a3\n"
75 : "=a" (ret), "=a" (errno), "+r"(a1), "+r"(b1) 75 : "=a" (ret), "=a" (errno), "+r"(a1), "+r"(b1)
76 : "r"(c1), "r"(d1), "r"(e1), "r"(f1) 76 : "r"(c1), "r"(d1), "r"(e1), "r"(f1)
77 : ); 77 : "memory");
78 return ret; 78 return ret;
79} 79}
80 80
81static inline int simc_open(const char *file, int flags, int mode) 81static inline int simc_open(const char *file, int flags, int mode)
82{ 82{
83 wmb();
84 return __simc(SYS_open, (int) file, flags, mode, 0, 0); 83 return __simc(SYS_open, (int) file, flags, mode, 0, 0);
85} 84}
86 85
@@ -91,19 +90,16 @@ static inline int simc_close(int fd)
91 90
92static inline int simc_ioctl(int fd, int request, void *arg) 91static inline int simc_ioctl(int fd, int request, void *arg)
93{ 92{
94 wmb();
95 return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0); 93 return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0);
96} 94}
97 95
98static inline int simc_read(int fd, void *buf, size_t count) 96static inline int simc_read(int fd, void *buf, size_t count)
99{ 97{
100 rmb();
101 return __simc(SYS_read, fd, (int) buf, count, 0, 0); 98 return __simc(SYS_read, fd, (int) buf, count, 0, 0);
102} 99}
103 100
104static inline int simc_write(int fd, const void *buf, size_t count) 101static inline int simc_write(int fd, const void *buf, size_t count)
105{ 102{
106 wmb();
107 return __simc(SYS_write, fd, (int) buf, count, 0, 0); 103 return __simc(SYS_write, fd, (int) buf, count, 0, 0);
108} 104}
109 105
@@ -111,7 +107,6 @@ static inline int simc_poll(int fd)
111{ 107{
112 struct timeval tv = { .tv_sec = 0, .tv_usec = 0 }; 108 struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
113 109
114 wmb();
115 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv, 110 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv,
116 0, 0); 111 0, 0);
117} 112}