From: Ian Campbell <Ian.Campbell@citrix.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jan Beulich <JBeulich@novell.com>,
"Konrad Rzeszutek Wilk" <konrad@kernel.org>,
Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
Subject: Re: [Xen-devel] Re: [PATCH 08/23] xen: statically initialize cpu_evtchn_mask_p
Date: Tue, 25 Jan 2011 14:02:17 +0000 [thread overview]
Message-ID: <1295964137.14780.6148.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <4D3DBA6A.3080700@redhat.com>
On Mon, 2011-01-24 at 17:44 +0000, Paolo Bonzini wrote:
> On 10/12/2010 05:44 PM, Konrad Rzeszutek Wilk wrote:
> > -static struct cpu_evtchn_s *cpu_evtchn_mask_p;
> > +
> > +static __initdata struct cpu_evtchn_s init_evtchn_mask = {
> > + .bits[0 ... (NR_EVENT_CHANNELS/BITS_PER_LONG)-1] = ~0ul,
> > +};
> > +static struct cpu_evtchn_s *cpu_evtchn_mask_p =&init_evtchn_mask;
> > +
> > static inline unsigned long *cpu_evtchn_mask(int cpu)
> > {
> > return cpu_evtchn_mask_p[cpu].bits;
>
> This causes a modpost warning:
>
> WARNING: drivers/xen/built-in.o(.data+0x0): Section mismatch in
> reference from the variable cpu_evtchn_mask_p to the variable
> .init.data:init_evtchn_mask
>
> The variable cpu_evtchn_mask_p references
> the variable __initdata init_evtchn_mask
>
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
>
> This is harmless, the variable is initialized to non-init data
> in an __init function. The added noise is ugly, though.
Does this help? If I understand the comment which precedes __initref
correctly it is intended to address precisely this situation.
Ian.
8<---------
xen: events: mark cpu_evtchn_mask_p as __refdata
This variable starts out pointing at init_evtchn_mask which is marked
__initdata but is set to point to a non-init data region in xen_init_IRQ
which is itself an __init function so this is safe.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 31af0ac..5061af0 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -114,7 +114,7 @@ struct cpu_evtchn_s {
static __initdata struct cpu_evtchn_s init_evtchn_mask = {
.bits[0 ... (NR_EVENT_CHANNELS/BITS_PER_LONG)-1] = ~0ul,
};
-static struct cpu_evtchn_s *cpu_evtchn_mask_p = &init_evtchn_mask;
+static struct __refdata cpu_evtchn_s *cpu_evtchn_mask_p =
&init_evtchn_mask;
static inline unsigned long *cpu_evtchn_mask(int cpu)
{
next prev parent reply other threads:[~2011-01-25 14:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-12 15:44 [PATCH v8] Xen PCI + Xen PCI frontend driver Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 01/23] xen: Don't disable the I/O space Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 02/23] xen: define BIOVEC_PHYS_MERGEABLE() Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 03/23] xen: implement pirq type event channels Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 04/23] x86/io_apic: add get_nr_irqs_gsi() Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 05/23] xen: identity map gsi->irqs Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 06/23] xen: dynamically allocate irq & event structures Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 07/23] xen: set pirq name to something useful Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 08/23] xen: statically initialize cpu_evtchn_mask_p Konrad Rzeszutek Wilk
2011-01-24 17:44 ` Paolo Bonzini
2011-01-25 14:02 ` Ian Campbell [this message]
2010-10-12 15:44 ` [PATCH 09/23] xen: Find an unbound irq number in reverse order (high to low) Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 10/23] xen: Provide a variant of xen_poll_irq with timeout Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 11/23] xen: fix shared irq device passthrough Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 12/23] x86/PCI: Clean up pci_cache_line_size Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 13/23] x86/PCI: make sure _PAGE_IOMAP it set on pci mappings Konrad Rzeszutek Wilk
2010-10-12 15:54 ` Jesse Barnes
2010-10-12 15:44 ` [PATCH 14/23] x86/PCI: Export pci_walk_bus function Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 15/23] msi: Introduce default_[teardown|setup]_msi_irqs with fallback Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 16/23] x86: Introduce x86_msi_ops Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 17/23] xen/x86/PCI: Add support for the Xen PCI subsystem Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 18/23] xenbus: Xen paravirtualised PCI hotplug support Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 19/23] xenbus: prevent warnings on unhandled enumeration values Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 20/23] xen-pcifront: Xen PCI frontend driver Konrad Rzeszutek Wilk
2010-10-13 9:36 ` Jan Beulich
2010-10-13 13:53 ` Konrad Rzeszutek Wilk
2010-10-13 16:16 ` Konrad Rzeszutek Wilk
2010-10-14 7:15 ` [Xen-devel] " Jan Beulich
2010-10-14 17:35 ` Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 21/23] xen/pci: Request ACS when Xen-SWIOTLB is activated Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 22/23] MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer Konrad Rzeszutek Wilk
2010-10-12 15:44 ` [PATCH 23/23] swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it Konrad Rzeszutek Wilk
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=1295964137.14780.6148.camel@zakaz.uk.xensource.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@novell.com \
--cc=Jeremy.Fitzhardinge@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=xen-devel@lists.xensource.com \
/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
all inboxes | Powered by JetHome®