From: Tony Nguyen <tony.nguyen@bt.com>
To: qemu-devel@nongnu.org
Cc: Tony Nguyen <tony.nguyen@bt.com>, Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 9/9] memory: Delete memory_region_big_endian
Date: Sat, 24 Aug 2019 05:42:48 +1000 [thread overview]
Message-ID: <faffd619a65fdab2dfcce3c75f3cffd4178875d7.1566588034.git.tony.nguyen@bt.com> (raw)
In-Reply-To: <cover.1566588033.git.tony.nguyen@bt.com>
memory_region_big_endian is no longer useful now we are consistently
using MemOp for endianness.
Signed-off-by: Tony Nguyen <tony.nguyen@bt.com>
---
memory.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/memory.c b/memory.c
index ee7559a18c..b647a8d3dd 100644
--- a/memory.c
+++ b/memory.c
@@ -343,15 +343,6 @@ static void flatview_simplify(FlatView *view)
}
}
-static bool memory_region_big_endian(MemoryRegion *mr)
-{
-#ifdef TARGET_WORDS_BIGENDIAN
- return mr->ops->endianness != MO_LE;
-#else
- return mr->ops->endianness == MO_BE;
-#endif
-}
-
static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op)
{
if ((op & MO_BSWAP) != mr->ops->endianness) {
@@ -555,7 +546,7 @@ static MemTxResult access_with_adjusted_size(hwaddr addr,
/* FIXME: support unaligned access? */
access_size = MAX(MIN(size, access_size_max), access_size_min);
access_mask = MAKE_64BIT_MASK(0, access_size * 8);
- if (memory_region_big_endian(mr)) {
+ if (mr->ops->endianness == MO_BE) {
for (i = 0; i < size; i += access_size) {
r |= access_fn(mr, addr + i, value, access_size,
(size - access_size - i) * 8, access_mask, attrs);
--
2.23.0
next prev parent reply other threads:[~2019-08-23 19:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 19:42 [Qemu-devel] [PATCH 0/9] Delete enum device_endian Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 1/9] exec: Map device_endian onto MemOp Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 2/9] exec: Replace DEVICE_NATIVE_ENDIAN with MO_TE Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 3/9] exec: Replace DEVICE_LITTLE_ENDIAN with MO_LE Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 4/9] exec: Replace DEVICE_BIG_ENDIAN with MO_BE Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 5/9] exec: Replace enum device_endian with MemOp Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 6/9] memory: Delete devend_memop Tony Nguyen
2019-08-24 22:30 ` Richard Henderson
2019-08-23 19:42 ` [Qemu-devel] [PATCH 7/9] exec: Delete device_endian Tony Nguyen
2019-08-23 19:42 ` [Qemu-devel] [PATCH 8/9] exec: Delete DEVICE_HOST_ENDIAN Tony Nguyen
2019-08-24 22:31 ` Richard Henderson
2019-08-23 19:42 ` Tony Nguyen [this message]
2019-08-24 22:32 ` [Qemu-devel] [PATCH 9/9] memory: Delete memory_region_big_endian Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=faffd619a65fdab2dfcce3c75f3cffd4178875d7.1566588034.git.tony.nguyen@bt.com \
--to=tony.nguyen@bt.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).