Devicetree
 help / color / mirror / Atom feed
From: Ben Dooks <ben@simtec.co.uk>
To: Jeremy Kerr <jeremy.kerr@canonical.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 06/11] arm-dt: postpone machine detection until setup_arch with CONFIG_ARM_DEVTREE
Date: Tue, 05 Jan 2010 01:36:19 +0900	[thread overview]
Message-ID: <4B421903.4050200@simtec.co.uk> (raw)
In-Reply-To: <1261479296.247430.731563214048.6.gpush@pororo>

Jeremy Kerr wrote:
> When we're using CONFIG_ARM_DEVTREE, we need to postpone machine detection
> until later in setup_arch. Because ARM_DEVTREE depends on !DEBUG_LL,
> we don't need the mdesc this early anyway.
> 
> We'll add support for ARM_DEVTREE && DEBUG_LL later.

Why not add a specific machine type for 'this is device tree' and
then these routines don't even need to #ifdef. It would especially
be good as it allows dt and non-dt machines to coexist in the same
kernel together.

> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> 
> ---
>  arch/arm/kernel/head.S |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index 38ccbe1..66bb56f 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -82,9 +82,18 @@ ENTRY(stext)
>  	bl	__lookup_processor_type		@ r5=procinfo r9=cpuid
>  	movs	r10, r5				@ invalid processor (r5=0)?
>  	beq	__error_p			@ yes, error 'p'
> +
> +	/* If we're using the device tree for machine detection, we don't
> +	 * look for a machinfo here, as we'll dynamically create one in
> +	 * setup_arch(). ARM_DEVTREE depends on !DEBUG_LL, so we won't need
> +	 * any machinfo fields 'til later.
> +	 */
> +#ifndef CONFIG_ARM_DEVTREE
>  	bl	__lookup_machine_type		@ r5=machinfo
>  	movs	r8, r5				@ invalid machine (r5=0)?
>  	beq	__error_a			@ yes, error 'a'
> +#endif
> +
>  	bl	__vet_atags
>  	bl	__create_page_tables
>  
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2010-01-04 16:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 10:54 [PATCH 00/11] Device-tree support for ARM Jeremy Kerr
2009-12-22 10:54 ` [PATCH 03/11] arm: export arm_add_memory Jeremy Kerr
2009-12-22 10:54 ` [PATCH 01/11] arm: change command_line to cmd_line, and export it Jeremy Kerr
2009-12-22 10:54 ` [PATCH 11/11] arm/versatile: probe via device tree Jeremy Kerr
2009-12-22 10:54 ` [PATCH 08/11] arm-dt: parse memory info from DT Jeremy Kerr
2009-12-22 10:54 ` [PATCH 06/11] arm-dt: postpone machine detection until setup_arch with CONFIG_ARM_DEVTREE Jeremy Kerr
2010-01-04 16:36   ` Ben Dooks [this message]
     [not found]     ` <4B421903.4050200-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org>
2010-01-04 22:26       ` Jeremy Kerr
2009-12-22 10:54 ` [PATCH 04/11] arm-dt: Add ATAG_DEVTREE tag Jeremy Kerr
2009-12-22 10:54 ` [PATCH 10/11] arm-dt: parse initrd from device tree Jeremy Kerr
2009-12-22 10:54 ` [PATCH 05/11] arm-dt: Add CONFIG_ARM_DEVTREE Jeremy Kerr
2009-12-22 10:54 ` [PATCH 09/11] arm-dt: probe for device-tree enabled platforms Jeremy Kerr
2009-12-22 10:54 ` [PATCH 02/11] arm: use generic infrastructure for early params Jeremy Kerr
2010-01-06 16:27   ` Russell King - ARM Linux
     [not found]     ` <20100106162731.GB1728-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-01-06 22:31       ` Jeremy Kerr
     [not found]         ` <201003060733.57636.rob@landley.net>
     [not found]           ` <201003060733.57636.rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>
2010-03-06 16:01             ` Grant Likely
2009-12-22 10:54 ` [PATCH 07/11] arm-dt: parse devtree pointer on boot Jeremy Kerr

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=4B421903.4050200@simtec.co.uk \
    --to=ben@simtec.co.uk \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jeremy.kerr@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.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