All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org, ian.campbell@citrix.com
Subject: Re: [PATCH v5 4/6] xen/arm: vgic: Optimize the way to store the target vCPU in the rank
Date: Fri, 13 Nov 2015 15:49:22 +0000	[thread overview]
Message-ID: <56460682.1020605@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1511131527340.2653@kaball.uk.xensource.com>

On 13/11/15 15:44, Stefano Stabellini wrote:
> On Mon, 9 Nov 2015, Julien Grall wrote:
 >> -static struct vcpu *vgic_v3_get_target_vcpu(struct vcpu *v,
unsigned int irq)
>> -{
>> -    struct vcpu *v_target;
>> -    struct vgic_irq_rank *rank = vgic_rank_irq(v, irq);
>> +#define NR_BYTES_PER_IROUTER 8U
> 
> Given the way this constant is used, it might be better to define it as
> a bit shift of 3, removing the two division operations below.

It makes more sense to define the constant with 8 rather than 3.

As the compiler will replace the division by 8 with a shift of 3, I
choose the readability and let the compiler do it's job.

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-11-13 15:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 15:49 [PATCH v5 0/6] xen/arm: vgic: Support 32-bit access for 64-bit register Julien Grall
2015-11-09 15:49 ` [PATCH v5 1/6] xen/arm: vgic-v2: Implement correctly ITARGETSR0 - ITARGETSR7 read-only Julien Grall
2015-11-13 11:18   ` Stefano Stabellini
2015-11-16 13:23   ` Ian Campbell
2015-11-18 16:20     ` Julien Grall
2015-11-09 15:49 ` [PATCH v5 2/6] xen/arm: vgic-v2: Handle correctly byte write in ITARGETSR Julien Grall
2015-11-13 12:08   ` Stefano Stabellini
2015-11-09 15:49 ` [PATCH v5 3/6] xen/arm: vgic-v2: Don't ignore a write in ITARGETSR if one field is 0 Julien Grall
2015-11-13 14:37   ` Stefano Stabellini
2015-11-13 14:52     ` Julien Grall
2015-11-13 15:05       ` Stefano Stabellini
2015-11-13 15:39         ` Julien Grall
2015-11-09 15:49 ` [PATCH v5 4/6] xen/arm: vgic: Optimize the way to store the target vCPU in the rank Julien Grall
2015-11-13 15:44   ` Stefano Stabellini
2015-11-13 15:49     ` Julien Grall [this message]
2015-11-09 15:49 ` [PATCH v5 5/6] xen/arm: vgic: Introduce helpers to extract/update/clear/set vGIC register Julien Grall
2015-11-11 16:09   ` Julien Grall
2015-11-16 13:14     ` Ian Campbell
2015-11-09 15:49 ` [PATCH v5 6/6] xen/arm: vgic-v3: Support 32-bit access for 64-bit registers 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=56460682.1020605@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.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.