All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>, xen-devel@lists.xenproject.org
Cc: shameerali.kolothum.thodi@huawei.com, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 1/3] xen/arm: io: Extend write/read handler to pass private data
Date: Tue, 29 Sep 2015 14:50:20 +0100	[thread overview]
Message-ID: <1443534620.16718.81.camel@citrix.com> (raw)
In-Reply-To: <1443472296-6671-2-git-send-email-julien.grall@citrix.com>

On Mon, 2015-09-28 at 21:31 +0100, Julien Grall wrote:
> Some handlers may require to use private data in order to get quickly
> information related to the region emulated.
> 
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
> 
> ---
> 
> Cc: shameerali.kolothum.thodi@huawei.com
> 
>     This will be necessary in the follow-up in order to fix bug in the
>     GICR emulation.
> ---
>  xen/arch/arm/io.c          | 15 +++++++++++----
>  xen/arch/arm/vgic-v2.c     |  8 +++++---
>  xen/arch/arm/vgic-v3.c     | 17 +++++++++++------
>  xen/arch/arm/vuart.c       | 11 ++++++-----
>  xen/include/asm-arm/mmio.h |  7 ++++---
>  5 files changed, 37 insertions(+), 21 deletions(-)
> 
> diff --git a/xen/arch/arm/io.c b/xen/arch/arm/io.c
> index 8e55d49..85797f1 100644
> --- a/xen/arch/arm/io.c
> +++ b/xen/arch/arm/io.c
> @@ -37,18 +37,24 @@ int handle_mmio(mmio_info_t *info)
>          if ( (info->gpa >= mmio_handler->addr) &&
>               (info->gpa < (mmio_handler->addr + mmio_handler->size)) )
>          {
> -            return info->dabt.write ?
> -                mmio_handler->mmio_handler_ops->write_handler(v, info) :
> -                mmio_handler->mmio_handler_ops->read_handler(v, info);
> +            goto found;

Rather than goto use break instead.

>          }
>      }
>  
>      return 0;

And make this "if ( i == io_handlers->num_entries ) return 0;"

The continue to handle the op as you have done.

Other than that looks good.

Ian.

  reply	other threads:[~2015-09-29 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 20:31 [PATCH 0/3] xen/arm: vgic-v3: Correctly retrieved the vCPU associated to a re-distributor Julien Grall
2015-09-28 20:31 ` [PATCH 1/3] xen/arm: io: Extend write/read handler to pass private data Julien Grall
2015-09-29 13:50   ` Ian Campbell [this message]
2015-09-28 20:31 ` [PATCH 2/3] xen/arm: vgic-v3: Correctly retrieve the vCPU associated to a re-distributor Julien Grall
2015-09-29  9:46   ` Wei Liu
2015-09-29 12:24   ` Shameerali Kolothum Thodi
2015-09-29 12:28     ` Julien Grall
2015-09-29 13:56   ` Ian Campbell
2015-09-29 14:15     ` Julien Grall
2015-09-29 14:28       ` Ian Campbell
2015-09-28 20:31 ` [PATCH 3/3] xen/arm: io: Shorten the name of the fields and clean up Julien Grall
2015-09-29 13:58   ` Ian Campbell
2015-09-28 20:40 ` [PATCH 0/3] xen/arm: vgic-v3: Correctly retrieved the vCPU associated to a re-distributor Julien Grall

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=1443534620.16718.81.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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.