All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: Add CONFIG_PARAM_* to set boot parameters.
Date: Mon, 14 Dec 2009 02:10:01 +0000	[thread overview]
Message-ID: <20091214021001.GA12196@linux-sh.org> (raw)
In-Reply-To: <20091130170254.65d2a0ab.yoshii.takashi@renesas.com>

On Thu, Dec 10, 2009 at 02:00:25PM +0900, yoshii.takashi@gmail.com wrote:
> diff --git a/arch/sh/kernel/head_32.S b/arch/sh/kernel/head_32.S
> index a78be74..58325fe 100644
> --- a/arch/sh/kernel/head_32.S
> +++ b/arch/sh/kernel/head_32.S
> @@ -27,17 +27,36 @@
>  
>  	.section	.empty_zero_page, "aw"
>  ENTRY(empty_zero_page)
> +#ifdef CONFIG_PARAM_BOOL
> +	.long	CONFIG_PARAM_MOUNT_ROOT_RDONLY
> +	.long	CONFIG_PARAM_RAMDISK_FLAGS
> +	.long	CONFIG_PARAM_ORIG_ROOT_DEV
> +	.long	CONFIG_PARAM_LOADER_TYPE
> +	.long	CONFIG_PARAM_INITRD_START
> +	.long	CONFIG_PARAM_INITRD_SIZE
> +#else
>  	.long	1		/* MOUNT_ROOT_RDONLY */
>  	.long	0		/* RAMDISK_FLAGS */
>  	.long	0x0200		/* ORIG_ROOT_DEV */
>  	.long	1		/* LOADER_TYPE */
>  	.long	0x00000000	/* INITRD_START */
>  	.long	0x00000000	/* INITRD_SIZE */
> +#endif

There's not really any point in conditionalizing these. If you want to
have them as config options, then just drop the bool and make them
unconditionally defined. You can just use the values that are there now
for the default values.

>  #ifdef CONFIG_32BIT
>  	.long	0x53453f00 + 32	/* "SE?" = 32 bit */
>  #else
>  	.long	0x53453f00 + 29	/* "SE?" = 29 bit */
>  #endif
> +#if defined(CONFIG_CMDLINE)
> +	.long	0x100		/* offset of the default command line */
> +#else
> +	.long	0
> +#endif
> +#if defined(CONFIG_CMDLINE)
> +	.skip	empty_zero_page + 0x100 - .
> +cmdline:
> +	.asciz	CONFIG_CMDLINE	! default command line
> +#endif
>  1:
>  	.skip	PAGE_SIZE - empty_zero_page - 1b
>  
The command line handling could go the same way, with a bit of Kconfig
reordering there is no need for any ifdefs besides the 32/29bit stuff.

      parent reply	other threads:[~2009-12-14  2:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30  8:02 [PATCH] sh: Add CONFIG_PARAM_* to set boot parameters yoshii.takashi
2009-12-02  1:35 ` Paul Mundt
2009-12-08  5:01 ` yoshii.takashi
2009-12-08  8:18 ` Paul Mundt
2009-12-08 13:14 ` Stuart MENEFY
2009-12-09 12:00 ` Magnus Damm
2009-12-10  5:00 ` yoshii.takashi
2009-12-10  7:01 ` yoshii.takashi
2009-12-10  8:48 ` yoshii.takashi
2009-12-14  2:10 ` Paul Mundt [this message]

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=20091214021001.GA12196@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.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 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.