On Thu, Sep 02, 2010 at 09:18:47AM -0700, Tony Lindgren wrote:
> >From 7044c13594c3023da6095f8d432eda260bc3207f Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <t...@atomide.com>
> Date: Mon, 30 Aug 2010 14:00:54 -0700
> Subject: [PATCH 1/6] ARM: Add inline function smp_on_up() for early init 
> testing
> 
> Add inline function smp_on_up() for early init checks, and
> change build_mem_type_table to use it.

Isn't something missing from this - such as a C-mode definition of
SMP() and UP() ?

> diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h
> index 8db3512..5ef4114 100644
> --- a/arch/arm/include/asm/smp_plat.h
> +++ b/arch/arm/include/asm/smp_plat.h
> @@ -39,4 +39,20 @@ static inline int cache_ops_need_broadcast(void)
>  #define UP(instr...) _str(instr)
>  #endif
>  
> +static inline int smp_on_up(void)
> +{
> +#ifdef CONFIG_SMP_ON_UP
> +     int smp_on_up;
> +
> +     asm(                                                    \
> +             SMP(mov %0, #0)                                 \
> +             UP(mov  %0, #1)                                 \
> +             : "=r" (smp_on_up));
> +
> +     return smp_on_up;
> +#else
> +     return 0;
> +#endif

I think this is the wrong approach - rather than a function which tells us
just if we are a SMP kernel running on UP, why not something which returns
whether we're running on SMP and use that to eliminate some of these ifdefs?
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to