From: Julien Grall <julien.grall@linaro.org>
To: "Andre Przywara" <andre.przywara@linaro.org>,
"Roger Pau Monné" <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v3 8/8] ARM: make nr_irqs a constant
Date: Thu, 1 Feb 2018 13:47:19 +0000 [thread overview]
Message-ID: <eb6f5d64-7e18-8abb-02a6-b5e4fd9efdc2@linaro.org> (raw)
In-Reply-To: <ed2665f9-9c46-7df0-e372-085ece0ce766@linaro.org>
Hi Andre,
On 01/02/18 13:43, Andre Przywara wrote:
> 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.
Really? I was expecting const data to be in the section.rodata. Are you
suggesting this is landing in the section .data instead?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-01 13:47 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 [this message]
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=eb6f5d64-7e18-8abb-02a6-b5e4fd9efdc2@linaro.org \
--to=julien.grall@linaro.org \
--cc=andre.przywara@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).