All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andre Przywara <andre.przywara@linaro.org>
Cc: xen-devel@lists.xenproject.org,
	Julien Grall <julien.grall@linaro.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v3 8/8] ARM: make nr_irqs a constant
Date: Thu, 1 Feb 2018 13:57:18 +0000	[thread overview]
Message-ID: <20180201135718.cgbmsxiwa4og73wk@MacBook-Pro-de-Roger.local> (raw)
In-Reply-To: <ed2665f9-9c46-7df0-e372-085ece0ce766@linaro.org>

On Thu, Feb 01, 2018 at 01:43:09PM +0000, Andre Przywara wrote:
> Hi,
> 
> On 30/01/18 14:36, Roger Pau Monné wrote:
> > On Wed, Jan 24, 2018 at 06:10:58PM +0000, Andre Przywara wrote:
> >> On ARM the maximum number of IRQs is a constant, but we share it being
> >> a variable to match x86. Since we are not supposed to alter it, let's
> >> mark it as "const" to avoid accidental change.
> >>
> >> Suggested-by: Julien Grall <julien.grall@linaro.org>
> >> Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
> >> ---
> >>  xen/arch/arm/irq.c        | 2 +-
> >>  xen/include/asm-arm/irq.h | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
> >> index 62103a20e3..d229cb6871 100644
> >> --- a/xen/arch/arm/irq.c
> >> +++ b/xen/arch/arm/irq.c
> >> @@ -27,7 +27,7 @@
> >>  #include <asm/gic.h>
> >>  #include <asm/vgic.h>
> >>  
> >> -unsigned int __read_mostly nr_irqs = NR_IRQS;
> >> +const unsigned int __read_mostly nr_irqs = NR_IRQS;
> > 
> > Shouldn't you remove the __read_mostly attribute, so the symbol it's
> > placed at the .rodata section by the compiler?
> 
> Yes, makes sense, thanks for pointing this out!
> const ... __read_mostly sounds somewhat redundant.
> 
> It looks like the compiler does the right thing anyway, as I can't find
> nr_irqs in the ELF in any case. Both with and without __read_mostly it
> results into the very same binary, actually even without the const.
> But I will include the change anyway.

Hm, that's kind of weird. nr_irqs seems to be used in ARM code. How
did you assert that the symbol is not there?

This is what I do on x86:

# nm xen/xen-syms | grep ' nr_irqs$'
ffff82d0804324f0 D nr_irqs

Which matches what I would expect from the x86 build.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-02-01 13:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 18:10 [PATCH v3 0/8] ARM: VGIC/GIC separation cleanups Andre Przywara
2018-01-24 18:10 ` [PATCH v3 1/8] ARM: VGIC: drop unneeded gic_restore_pending_irqs() Andre Przywara
2018-01-30 11:48   ` Julien Grall
2018-01-30 17:26   ` Stefano Stabellini
2018-01-24 18:10 ` [PATCH v3 2/8] ARM: VGIC: split gic.c to observe hardware/virtual GIC separation Andre Przywara
2018-01-30 11:53   ` Julien Grall
2018-01-24 18:10 ` [PATCH v3 3/8] ARM: VGIC: split up gic_dump_info() to cover virtual part separately Andre Przywara
2018-01-24 18:10 ` [PATCH v3 4/8] ARM: VGIC: rework events_need_delivery() Andre Przywara
2018-01-24 18:10 ` [PATCH v3 5/8] ARM: VGIC: factor out vgic_connect_hw_irq() Andre Przywara
2018-01-30 13:19   ` Julien Grall
2018-01-31 15:54     ` Andre Przywara
2018-01-31 16:30       ` Julien Grall
2018-02-01 12:07         ` Andre Przywara
2018-01-24 18:10 ` [PATCH v3 6/8] ARM: VGIC: factor out vgic_get_hw_irq_desc() Andre Przywara
2018-01-31 16:16   ` Julien Grall
2018-01-31 16:24     ` Andre Przywara
2018-01-31 16:25       ` Julien Grall
2018-01-24 18:10 ` [PATCH v3 7/8] ARM: VGIC: rework gicv[23]_update_lr to not use pending_irq Andre Przywara
2018-01-24 18:10 ` [PATCH v3 8/8] ARM: make nr_irqs a constant Andre Przywara
2018-01-30 13:24   ` Julien Grall
2018-01-30 14:36   ` Roger Pau Monné
2018-02-01 13:43     ` Andre Przywara
2018-02-01 13:47       ` Julien Grall
2018-02-01 14:34         ` Andre Przywara
2018-02-01 14:39           ` Julien Grall
2018-02-01 14:41             ` Andre Przywara
2018-02-01 13:57       ` Roger Pau Monné [this message]
2018-02-01 14:39         ` Andre Przywara

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=20180201135718.cgbmsxiwa4og73wk@MacBook-Pro-de-Roger.local \
    --to=roger.pau@citrix.com \
    --cc=andre.przywara@linaro.org \
    --cc=julien.grall@linaro.org \
    --cc=sstabellini@kernel.org \
    --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.