summaryrefslogtreecommitdiff
path: root/include/xen/interface/io/ring.h
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-29 16:59:05 +0400
committerMark Brown <broonie@linaro.org>2013-08-29 16:59:05 +0400
commitb5f9a9d5113efe11a3b9dad600a6f833274da595 (patch)
tree6db5fb34a2d590086e25f7f682fecb5f43e6b283 /include/xen/interface/io/ring.h
parenta1216394e620d0dfbb03c712ae3210e7b77c9e11 (diff)
parent8d4d08ce8319ae26227c4dd558405963c14c2037 (diff)
downloadlinux-b5f9a9d5113efe11a3b9dad600a6f833274da595.tar.xz
Merge remote-tracking branch 'spi/topic/rspi' into spi-pdata
Conflicts: drivers/spi/spi-rspi.c
Diffstat (limited to 'include/xen/interface/io/ring.h')
-rw-r--r--include/xen/interface/io/ring.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h
index 75271b9a8f61..7d28aff605c7 100644
--- a/include/xen/interface/io/ring.h
+++ b/include/xen/interface/io/ring.h
@@ -188,6 +188,11 @@ struct __name##_back_ring { \
#define RING_REQUEST_CONS_OVERFLOW(_r, _cons) \
(((_cons) - (_r)->rsp_prod_pvt) >= RING_SIZE(_r))
+/* Ill-behaved frontend determination: Can there be this many requests? */
+#define RING_REQUEST_PROD_OVERFLOW(_r, _prod) \
+ (((_prod) - (_r)->rsp_prod_pvt) > RING_SIZE(_r))
+
+
#define RING_PUSH_REQUESTS(_r) do { \
wmb(); /* back sees requests /before/ updated producer index */ \
(_r)->sring->req_prod = (_r)->req_prod_pvt; \