All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>
Subject: [Qemu-devel] [PULL 01/11] Enable 8-byte wide MMIO for 16550 serial devices
Date: Thu, 16 Nov 2017 12:59:16 +0100	[thread overview]
Message-ID: <20171116115926.16627-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20171116115926.16627-1-pbonzini@redhat.com>

From: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>

Some drivers for the PPMC7400 PowerPC evaluation board accesses the
serial registers through the floating point unit (stfd/ldfd), which is
an 8-byte wide access. This patch enables that behavior.

Signed-off-by: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>
Message-Id: <20171106161039.32596-1-michael.nawrocki@gtri.gatech.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/char/serial.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index 376bd2f240..eb72191ee7 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -1005,7 +1005,7 @@ static void serial_mm_write(void *opaque, hwaddr addr,
                             uint64_t value, unsigned size)
 {
     SerialState *s = opaque;
-    value &= ~0u >> (32 - (size * 8));
+    value &= 255;
     serial_ioport_write(s, addr >> s->it_shift, value, 1);
 }
 
@@ -1014,16 +1014,22 @@ static const MemoryRegionOps serial_mm_ops[3] = {
         .read = serial_mm_read,
         .write = serial_mm_write,
         .endianness = DEVICE_NATIVE_ENDIAN,
+        .valid.max_access_size = 8,
+        .impl.max_access_size = 8,
     },
     [DEVICE_LITTLE_ENDIAN] = {
         .read = serial_mm_read,
         .write = serial_mm_write,
         .endianness = DEVICE_LITTLE_ENDIAN,
+        .valid.max_access_size = 8,
+        .impl.max_access_size = 8,
     },
     [DEVICE_BIG_ENDIAN] = {
         .read = serial_mm_read,
         .write = serial_mm_write,
         .endianness = DEVICE_BIG_ENDIAN,
+        .valid.max_access_size = 8,
+        .impl.max_access_size = 8,
     },
 };
 
-- 
2.14.3

  reply	other threads:[~2017-11-16 11:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 11:59 [Qemu-devel] [PULL 00/11] Miscellaneous patches for QEMU 2.11-rc2 Paolo Bonzini
2017-11-16 11:59 ` Paolo Bonzini [this message]
2017-11-16 11:59 ` [Qemu-devel] [PULL 02/11] ioapic/tracing: Remove last DPRINTFs Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 03/11] Makefile: simpler/faster "make help" Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 04/11] thread-posix: fix qemu_rec_mutex_trylock macro Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 05/11] target-i386: adds PV_TLB_FLUSH CPUID feature bit Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 06/11] vhost-user-scsi: add missing virtqueue_size param Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 07/11] cpu-exec: don't overwrite exception_index Paolo Bonzini
2017-11-17 20:07   ` Peter Maydell
2017-11-17 20:26     ` Paolo Bonzini
2017-11-17 20:34       ` Peter Maydell
2017-11-20 10:25         ` Pavel Dovgalyuk
2017-11-20 11:06           ` Peter Maydell
2017-11-20 12:50             ` Peter Maydell
2017-11-20 21:08               ` Paolo Bonzini
2018-01-09 13:21               ` Pavel Dovgalyuk
2018-01-09 13:44                 ` Peter Maydell
2018-01-10  7:04                   ` Pavel Dovgalyuk
2018-01-10 10:24                     ` Peter Maydell
2018-01-10 10:43                       ` Pavel Dovgalyuk
2017-11-16 11:59 ` [Qemu-devel] [PULL 08/11] cpu-exec: avoid cpu_exec_nocache infinite loop with record/replay Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 09/11] util/stats64: Fix min/max comparisons Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 10/11] exec: Do not resolve subpage in mru_section Paolo Bonzini
2017-11-16 11:59 ` [Qemu-devel] [PULL 11/11] fix scripts/update-linux-headers.sh here document Paolo Bonzini
2017-11-16 16:11 ` [Qemu-devel] [PULL 00/11] Miscellaneous patches for QEMU 2.11-rc2 Peter Maydell

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=20171116115926.16627-2-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=michael.nawrocki@gtri.gatech.edu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.