From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC 02/24] xen: Introduce __initconst to store initial const data Date: Mon, 19 Aug 2013 15:56:21 +0100 Message-ID: <1376924181.9708.13.camel@dagon.hellion.org.uk> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> <1376687156-6737-3-git-send-email-julien.grall@linaro.org> <5211F79102000078000A0819@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5211F79102000078000A0819@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: julien.grall@linaro.org, xen-devel@lists.xen.org, patches@linaro.org, andre.przywara@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2013-08-19 at 10:46 +0100, Jan Beulich wrote: > >>> Julien Grall 08/16/13 11:06 PM >>> > >It's possible to have 2 type (const and non-const) of data in the same > >compilation unit. Using only __initdata will result to a compilation error: > > > >error: $variablename causes as section tupe conflict with $variablename2 > > > >because a section containing const variables is marked read only and so cannot > >contain non-const variables. > > I don't mind this change, but so far we avoided this by simply not marking > such objects 'const'. I didn't check whether the ARM port is different in this > regard, but the x86 port till now didn't care to mark regular read-only data > read-only at runtime, so there's little point in being over-ambitious for init- > only data. ARM has some reasonable amount of initdata to describe the device tree platform drivers etc. It seems reasonable to make those const to me. (I'm a bit surprised at the gcc behaviour of not allowing const and non const data in the same section, but whatever) Ian.