All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
	Vijaya Kumar K <vijaya.kumar@caviumnetworks.com>,
	Julien Grall <julien.grall@linaro.org>, Tim Deegan <tim@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	manish.jaggi@caviumnetworks.com
Subject: Re: [PATCH for-4.5 v11 2/7] xen/arm: Add vgic callback to read irq priority
Date: Tue, 23 Sep 2014 14:01:26 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1409231359450.15268@kaball.uk.xensource.com> (raw)
In-Reply-To: <CALicx6u7Ozn62Kq===x=1fSmtCTv9Ywk08MyVr9r386u565Dwg@mail.gmail.com>

On Tue, 16 Sep 2014, Vijay Kilari wrote:
> On Tue, Sep 16, 2014 at 12:35 AM, Stefano Stabellini
> <stefano.stabellini@eu.citrix.com> wrote:
> > On Mon, 15 Sep 2014, Vijay Kilari wrote:
> >> On Fri, Sep 12, 2014 at 11:38 PM, Stefano Stabellini
> >> <stefano.stabellini@eu.citrix.com> wrote:
> >> > On Fri, 12 Sep 2014, vijay.kilari@gmail.com wrote:
> >> >> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >> >>
> >> >> Use callback in vgic driver to read priority for
> >> >> a given irq
> >> >>
> >> >> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >> >> ---
> >> >> v11: use vgic_irq_rank
> >> >> ---
> >> >>  xen/arch/arm/vgic-v2.c     |   12 ++++++++++++
> >> >>  xen/arch/arm/vgic.c        |    2 +-
> >> >>  xen/include/asm-arm/vgic.h |    2 ++
> >> >>  3 files changed, 15 insertions(+), 1 deletion(-)
> >> >>
> >> >> diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c
> >> >> index 54751b6..e674192 100644
> >> >> --- a/xen/arch/arm/vgic-v2.c
> >> >> +++ b/xen/arch/arm/vgic-v2.c
> >> >> @@ -521,6 +521,17 @@ static struct vcpu *vgic_v2_get_target_vcpu(struct vcpu *v, unsigned int irq)
> >> >>      return v_target;
> >> >>  }
> >> >>
> >> >> +static int vgic_v2_get_irq_priority(struct vcpu *v, unsigned int irq)
> >> >> +{
> >> >> +    int priority;
> >> >> +    struct vgic_irq_rank *rank = vgic_rank_irq(v, irq);
> >> >
> >> > this is good
> >> >
> >> >
> >> >> +    ASSERT(spin_is_locked(&rank->lock));
> >> >> +    priority = vgic_byte_read(rank->ipriority[(irq%32)/4], 0, irq % 4);
> >> >
> >> > this has been changed without mention in the change log for the patch, it was
> >> >
> >> > priority = vgic_byte_read(rank->ipriority[REG_RANK_INDEX(8, irq,
> >> >             DABT_WORD)], 0, irq & 0x3);
> >> >
> >> > It is best to use the previous version, as it uses the common conversion
> >> > functions.
> >>
> >>  I changed it because we don't need do clumsy things
> >> to get ipriority index with irq number in hand. If you don't
> >> have any further comments, I will send final version with this change
> >> for your ack.
> >
> > TBH I think that the open coded version is more readable than the macro,
> > but we need to be consistent (so that we can easily change the macro and
> > fix all the call sites in one change for example).
> >
> > In any case I don't think that you need to resend just for this small
> > change. We can fix in a follow up patch.
> 
>  I see that you have made similar changes using in vgic-v2.c in
> 
>  static struct vcpu *vgic_v2_get_target_vcpu(struct vcpu *v, unsigned int irq)
>  {
> ....
>      target = vgic_byte_read(rank->itargets[(irq%32)/4], 0, irq % 4);

Ops, I see that I talk the talk but I don't walk the walk


> shall I revert back to use REG_RANK_INDEX here as well in my next
> commit?

Yes, please

  reply	other threads:[~2014-09-23 13:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 11:09 [PATCH for-4.5 v11 0/7] xen/arm: Add GICv3 support vijay.kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 1/7] xen/arm: Calculate irq rank from irq number vijay.kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 2/7] xen/arm: Add vgic callback to read irq priority vijay.kilari
2014-09-12 18:08   ` Stefano Stabellini
2014-09-15  6:15     ` Vijay Kilari
2014-09-15 19:05       ` Stefano Stabellini
2014-09-15 22:09         ` Ian Campbell
2014-09-16  6:49         ` Vijay Kilari
2014-09-23 13:01           ` Stefano Stabellini [this message]
2014-09-23 13:09             ` Vijay Kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 3/7] xen/arm: Add support for GIC v3 vijay.kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 4/7] xen/arm: Add virtual GICv3 support vijay.kilari
2014-09-12 18:15   ` Stefano Stabellini
2014-09-12 11:09 ` [PATCH for-4.5 v11 5/7] xen/arm: Update Dom0 GIC dt node with GICv3 information vijay.kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 6/7] xen/arm: add SGI handling for GICv3 vijay.kilari
2014-09-12 11:09 ` [PATCH for-4.5 v11 7/7] xen/arm: check for GICv3 platform support vijay.kilari

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=alpine.DEB.2.02.1409231359450.15268@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Prasun.Kapoor@caviumnetworks.com \
    --cc=julien.grall@linaro.org \
    --cc=manish.jaggi@caviumnetworks.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=vijay.kilari@gmail.com \
    --cc=vijaya.kumar@caviumnetworks.com \
    --cc=xen-devel@lists.xen.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.