From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752990AbYKFTPx (ORCPT ); Thu, 6 Nov 2008 14:15:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751491AbYKFTPd (ORCPT ); Thu, 6 Nov 2008 14:15:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:45773 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414AbYKFTPc (ORCPT ); Thu, 6 Nov 2008 14:15:32 -0500 Date: Thu, 06 Nov 2008 20:15:25 +0100 Message-ID: From: Takashi Iwai To: Jeremy Fitzhardinge Cc: Tony Luck , Isaku Yamahata , linux-kernel@vger.kernel.org, Sam Ravnborg Subject: Re: [PATCH] Fix section type conflict in arch/ia64/xen/xen_pv_ops.c In-Reply-To: <49133E11.8050607@goop.org> References: <49133E11.8050607@goop.org> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 06 Nov 2008 10:57:21 -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. Oh, wait; just looking through linux/init.h, I see we have now __initconst. Maybe this is the right choice? This would be better documented somewhere in Documentation/*... thanks, Takashi > > Sam? > > J > > > Signed-off-by: Takashi Iwai > > > > --- > > diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c > > index 04cd123..5d491d9 100644 > > --- a/arch/ia64/xen/xen_pv_ops.c > > +++ b/arch/ia64/xen/xen_pv_ops.c > > @@ -153,7 +153,7 @@ xen_post_smp_prepare_boot_cpu(void) > > xen_setup_vcpu_info_placement(); > > } > > > > -static const struct pv_init_ops xen_init_ops __initdata = { > > +static struct pv_init_ops xen_init_ops __initdata = { > > .banner = xen_banner, > > > > .reserve_memory = xen_reserve_memory, > > @@ -260,7 +260,7 @@ xen_intrin_local_irq_restore(unsigned long mask) > > xen_rsm_i(); > > } > > > > -static const struct pv_cpu_ops xen_cpu_ops __initdata = { > > +static struct pv_cpu_ops xen_cpu_ops __initdata = { > > .fc = xen_fc, > > .thash = xen_thash, > > .get_cpuid = xen_get_cpuid, > > @@ -337,7 +337,7 @@ xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) > > HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); > > } > > > > -static const struct pv_iosapic_ops xen_iosapic_ops __initdata = { > > +static struct pv_iosapic_ops xen_iosapic_ops __initdata = { > > .pcat_compat_init = xen_pcat_compat_init, > > .__get_irq_chip = xen_iosapic_get_irq_chip, > > > > >