xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@linaro.org>
To: "Roger Pau Monné" <roger.pau@citrix.com>
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:43:09 +0000	[thread overview]
Message-ID: <ed2665f9-9c46-7df0-e372-085ece0ce766@linaro.org> (raw)
In-Reply-To: <20180130143603.2uzxacs2vq47oxev@MacBook-Pro-de-Roger.local>

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.

Cheers,
Andre.

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

  reply	other threads:[~2018-02-01 13:43 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 [this message]
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é
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=ed2665f9-9c46-7df0-e372-085ece0ce766@linaro.org \
    --to=andre.przywara@linaro.org \
    --cc=julien.grall@linaro.org \
    --cc=roger.pau@citrix.com \
    --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 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).