Re: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 18 November 2013 04:58 PM, Tony Lindgren wrote:
> If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
> or dra7xx, we can get the following error:
> 
> arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
> :(.text+0x7ab0): undefined reference to `set_cntfreq'
> 
> Fix the issue by not trying to initalize the realtime counter
> unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
> 
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
>
How about a dummy inline function of set_cntfreq() ?
Having #ifdef in middle of the code looks pretty ugly.

> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -65,12 +65,14 @@ static void omap4_secondary_init(unsigned int cpu)
>  		omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX,
>  							4, 0, 0, 0, 0, 0);
>  
> +#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
>  	/*
>  	 * Configure the CNTFRQ register for the secondary cpu's which
>  	 * indicates the frequency of the cpu local timers.
>  	 */
>  	if (soc_is_omap54xx() || soc_is_dra7xx())
>  		set_cntfreq();
> +#endif
>  
>  	/*
>  	 * Synchronise with the boot thread.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [CentOS ARM]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]     [Photos]