LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix section type conflict in arch/ia64/xen/xen_pv_ops.c
Date: Tue, 11 Nov 2008 09:18:50 +0100	[thread overview]
Message-ID: <s5hd4h2zndh.wl%tiwai@suse.de> (raw)
In-Reply-To: <20081111081552.GA10955%yamahata@valinux.co.jp>

At Tue, 11 Nov 2008 17:15:52 +0900,
Isaku Yamahata wrote:
> 
> On Tue, Nov 11, 2008 at 08:51:11AM +0100, Takashi Iwai wrote:
> > At Thu, 6 Nov 2008 22:48:48 +0100,
> > Sam Ravnborg wrote:
> > > 
> > > On Thu, Nov 06, 2008 at 10:57:21AM -0800, Jeremy Fitzhardinge wrote:
> > > > Takashi Iwai wrote:
> > > > >__initdata and const cannot be always a happy pair, as gcc-4.3.3 gives
> > > > >the compile errors like:
> > > > >
> > > > >  arch/ia64/xen/xen_pv_ops.c:156: error: xen_init_ops causes a section 
> > > > >  type conflict
> > > > >  arch/ia64/xen/xen_pv_ops.c:340: error: xen_iosapic_ops causes a section 
> > > > >  type conflict
> > > > >
> > > > >This patch simply removes const from data with __initdata.
> > > > >  
> > > > 
> > > > Yeah, I've seen these sort of messages before, but I don't see why 
> > > > there's an inherent problem with having const __initdata.
> > > > 
> > > > Sam?
> > > 
> > > The root problem here is that in some cases gcc will stuff this into
> > > a section marked CONST and in other cases not.
> > > So when we manually specify the section we better not mix const and
> > > non-const stuff in the same section.
> > > The problem is that it is very gcc dependent. I have with powerpc
> > > seen that the same code was not put in CONST with a 32 bit build,
> > > but with the 64 bit build it was.
> > > The only cure was to remove the const and use initdata.
> > > You can try to play with initconst - and it may work.
> > > But you need to have pretty good build coverage to be sure.
> > 
> > OK, then my original patch should do right :)
> > Do you guys see any problems with it?
> > 
> > Right now 2.6.28-rc kernel doesn't build, thus this is basically a
> > regression.
> 
> I'm fine with the patch.
> 
> The above sounds x86 xen potentially has the same issue, though.
> 
> linux-2.6/arch/x86/xen $ grep __initdata *
> enlighten.c:static const struct pv_info xen_info __initdata = {
> enlighten.c:static const struct pv_init_ops xen_init_ops __initdata = {
> enlighten.c:static const struct pv_time_ops xen_time_ops __initdata = {
> enlighten.c:static const struct pv_cpu_ops xen_cpu_ops __initdata = {
> enlighten.c:static const struct pv_apic_ops xen_apic_ops __initdata = {
> enlighten.c:static const struct pv_mmu_ops xen_mmu_ops __initdata = {
> enlighten.c:static const struct machine_ops __initdata xen_machine_ops = {
> irq.c:static const struct pv_irq_ops xen_irq_ops __initdata = {
> smp.c:static const struct smp_ops xen_smp_ops __initdata = {

Oh, care to create a patch?


thanks,

Takashi

  reply	other threads:[~2008-11-11  8:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 16:48 Takashi Iwai
2008-11-06 18:57 ` Jeremy Fitzhardinge
2008-11-06 19:15   ` Takashi Iwai
2008-11-06 21:48   ` Sam Ravnborg
2008-11-11  7:51     ` Takashi Iwai
2008-11-11  8:15       ` Isaku Yamahata
2008-11-11  8:18         ` Takashi Iwai [this message]
2008-11-11  8:56           ` Isaku Yamahata
2008-11-11 17:43             ` Jeremy Fitzhardinge
2008-11-11 17:45               ` Takashi Iwai
2008-11-11 18:47                 ` Jeremy Fitzhardinge
2008-11-11 19:04                   ` Takashi Iwai
2008-11-12 18:19                     ` Sam Ravnborg

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=s5hd4h2zndh.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@intel.com \
    --cc=yamahata@valinux.co.jp \
    --subject='Re: [PATCH] Fix section type conflict in arch/ia64/xen/xen_pv_ops.c' \
    /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

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).