All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Salter <msalter@redhat.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Catalin Marinas <Catalin.Marinas@arm.com>
Subject: Re: [PATCH] arm64: add PAGE_ALIGNED_DATA to linker script
Date: Wed, 09 Oct 2013 13:31:45 -0400	[thread overview]
Message-ID: <1381339905.8305.31.camel@deneb.redhat.com> (raw)
In-Reply-To: <20131009101447.GC5985@mudshark.cambridge.arm.com>

On Wed, 2013-10-09 at 11:14 +0100, Will Deacon wrote:
> On Tue, Oct 08, 2013 at 09:37:39PM +0100, Mark Salter wrote:
> > The arm64 linker script doesn't use the PAGE_ALIGNED_DATA macro which
> > leads to a ".data..page_aligned" section being placed between the end
> > of .data and start of .bss:
> > 
> >  % readelf -e vmlinux
> >    ...
> >  Section to Segment mapping:
> >   Segment Sections...
> >    00     .head.text .text .text.init .rodata __ksymtab __ksymtab_gpl \
> >           __ksymtab_strings __param __modver __ex_table .notes \
> >           .init.text .init.data .data..percpu .data .data..page_aligned .bss
> > 
> > This causes problems for the EFI stub which may have to relocate the
> > kernel image based on stext and _edata symbols.
> > 
> > This patch adds PAGE_ALIGNED_DATA() to the linker script inside the
> > the .data section.
> > 
> > Signed-off-by: Mark Salter <msalter@redhat.com>
> > ---
> >  arch/arm64/kernel/vmlinux.lds.S | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> > index f8ab9d8..e441556 100644
> > --- a/arch/arm64/kernel/vmlinux.lds.S
> > +++ b/arch/arm64/kernel/vmlinux.lds.S
> > @@ -110,6 +110,7 @@ SECTIONS
> >  		 */
> >  		INIT_TASK_DATA(THREAD_SIZE)
> >  		NOSAVE_DATA
> > +		PAGE_ALIGNED_DATA(PAGE_SIZE)
> >  		CACHELINE_ALIGNED_DATA(64)
> >  		READ_MOSTLY_DATA(64)
> 
> Can we just replace this chunk with RW_DATA_SECTION(64, PAGE_SIZE,
> THREAD_SIZE) instead?

Possibly. The layout of the included macros is the same. The only
difference being the placement of _data, _sdata, and _edata inside
.data and the use of __data_loc.

--Mark



  reply	other threads:[~2013-10-09 17:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 20:37 [PATCH] arm64: add PAGE_ALIGNED_DATA to linker script Mark Salter
2013-10-09 10:14 ` Will Deacon
2013-10-09 17:31   ` Mark Salter [this message]
2013-10-11 12:18   ` Mark Salter
2013-11-01 15:01     ` Mark Salter
2013-11-01 16:17       ` Will Deacon
2013-11-04 11:28     ` Catalin Marinas
2013-11-04 16:38       ` [PATCH] arm64: use generic RW_DATA_SECTION macro in " Mark Salter
2013-11-04 17:20         ` Will Deacon
2013-11-04 18:19         ` Catalin Marinas

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=1381339905.8305.31.camel@deneb.redhat.com \
    --to=msalter@redhat.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.