diff mbox series

[v6,03/26] memory: Introduce size_memop

Message ID 1565166407497.21726@bt.com (mailing list archive)
State New, archived
Headers show
Series Invert Endian bit in SPARCv9 MMU TTE | expand

Commit Message

Tony Nguyen Aug. 7, 2019, 8:26 a.m. UTC
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>
---
 include/exec/memop.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

--
1.8.3.1

?

Comments

Richard Henderson Aug. 7, 2019, 3:30 p.m. UTC | #1
On 8/7/19 1:26 AM, tony.nguyen@bt.com wrote:
> +/* Size in bytes to MemOp.  */
> +static inline MemOp 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;
> +}
> +

Return type should remain unsigned until patch 11.
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/include/exec/memop.h b/include/exec/memop.h
index 7262ca3..5c5769e 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 MemOp 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