aboutsummaryrefslogtreecommitdiff
path: root/include/exec/memop.h
diff options
context:
space:
mode:
authorTony Nguyen <tony.nguyen@bt.com>2019-08-24 04:29:05 +1000
committerRichard Henderson <richard.henderson@linaro.org>2019-09-03 08:30:38 -0700
commit66b9b24375ac215cdcbdf9e14d665395360abff4 (patch)
tree83becf7c028cc85f3844e0cf2053eff6b1ec664a /include/exec/memop.h
parent14776ab5a12972ea439c7fb2203a4c15a09094b4 (diff)
memory: Introduce size_memop
The memory_region_dispatch_{read|write} operand "unsigned size" is being converted into a "MemOp op". Introduce no-op size_memop to aid preparatory conversion of interfaces. Once interfaces are converted, size_memop will be implemented to return a MemOp from size in bytes. Signed-off-by: Tony Nguyen <tony.nguyen@bt.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <35b8ee74020f67cf40848fb7d5f127cf96c851d6.1566466906.git.tony.nguyen@bt.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/exec/memop.h')
-rw-r--r--include/exec/memop.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/exec/memop.h b/include/exec/memop.h
index 7262ca3dfd..dfd76a1604 100644
--- a/include/exec/memop.h
+++ b/include/exec/memop.h
@@ -107,4 +107,14 @@ typedef enum MemOp {
MO_SSIZE = MO_SIZE | MO_SIGN,
} MemOp;
+/* Size in bytes to MemOp. */
+static inline unsigned size_memop(unsigned size)
+{
+ /*
+ * FIXME: No-op to aid conversion of memory_region_dispatch_{read|write}
+ * "unsigned size" operand into a "MemOp op".
+ */
+ return size;
+}
+
#endif