public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: <linux-kernel@vger.kernel.org>, Tim Abbott <tabbott@ksplice.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 1/2] vmlinux.lds.h: allow people to set a smaller rootfs alignment
Date: Wed, 09 Jun 2010 02:20:30 -0500	[thread overview]
Message-ID: <1276068030_13535@mail4.comsite.net> (raw)
In-Reply-To: <1275761686-4996-1-git-send-email-vapier@gentoo.org>


On Sat,  5 Jun 2010 at around 14:14:45 -0400, Mike Frysinger wrote:
> Add a new INIT_RAMFS() define to compliment the existing INIT_RAM_FS, but
> this one lets people control the alignment.
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 48c5299..9ca268f 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -619,14 +619,15 @@ 
>  		VMLINUX_SYMBOL(__security_initcall_end) = .;
>  
>  #ifdef CONFIG_BLK_DEV_INITRD
> -#define INIT_RAM_FS							\
> -	. = ALIGN(PAGE_SIZE);						\
> +#define INIT_RAMFS(align)						\
> +	. = ALIGN(align);						\
>  	VMLINUX_SYMBOL(__initramfs_start) = .;				\
>  	*(.init.ramfs)							\
>  	VMLINUX_SYMBOL(__initramfs_end) = .;
>  #else
> -#define INIT_RAM_FS
> +#define INIT_RAMFS(align)
>  #endif
> +#define INIT_RAM_FS INIT_RAMFS(PAGE_SIZE)
>  

[ and patch 2/2 calls the new macro with align 4, for only blackfin ].

Mike,
As you identified, the alignment for the __initramfs is too large.

As can be seen by the grammer of the INIT_RAM_FS in [1], the section
itself always requires alignment of exactly 4 [2].

I realize it requires a bit more auditing and cordination, but we
should really just change the macro to align to 4.

[1] Documentation/early-userspace/buffer-format.txt,
[2] for the general case; as compressed fragments are aligin(1)

milton

  parent reply	other threads:[~2010-06-09  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05 18:14 [PATCH 1/2] vmlinux.lds.h: allow people to set a smaller rootfs alignment Mike Frysinger
2010-06-05 18:14 ` [PATCH 2/2] Blackfin: use " Mike Frysinger
2010-06-07 23:27 ` [PATCH 1/2] vmlinux.lds.h: allow people to set a " Tim Abbott
2010-06-09  7:20 ` Milton Miller [this message]
2010-06-09  7:42   ` Mike Frysinger
2010-06-09  7:51     ` Geert Uytterhoeven
2010-06-11  5:50     ` H. Peter Anvin
2010-06-11  7:30       ` Milton Miller

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=1276068030_13535@mail4.comsite.net \
    --to=miltonm@bga.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tabbott@ksplice.com \
    --cc=vapier@gentoo.org \
    /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