qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu>, qemu-devel@nongnu.org
Cc: mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] Enable 8-byte wide MMIO for 16550 serial devices
Date: Mon, 6 Nov 2017 17:15:40 +0100	[thread overview]
Message-ID: <53ae5f2b-8b27-25f4-ab4c-4e99a552818a@redhat.com> (raw)
In-Reply-To: <20171106161039.32596-1-michael.nawrocki@gtri.gatech.edu>

On 06/11/2017 17:10, Mike Nawrocki wrote:
> 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>

Queued for inclusion in 2.11, thanks.

Paolo

> ---
>  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,
>      },
>  };
>  
> 

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 16:10 [Qemu-devel] [PATCH v2] Enable 8-byte wide MMIO for 16550 serial devices Mike Nawrocki
2017-11-06 16:15 ` Paolo Bonzini [this message]

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=53ae5f2b-8b27-25f4-ab4c-4e99a552818a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=michael.nawrocki@gtri.gatech.edu \
    --cc=mst@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).