From: Arnd Bergmann Date: Tue, 23 Apr 2013 13:36:26 +0000 (+0200) Subject: ARM: tegra: call cpu_do_idle from C code X-Git-Tag: v3.10-rc1~126^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2058842e6d7833e41be7cc2434465e69bcd51d45;p=karo-tx-linux.git ARM: tegra: call cpu_do_idle from C code When building a kernel for multiple CPU architecture levels, cpu_do_idle() is a macro for an indirect function call, which cannot be called from assembly code as Tegra does. Adding a trivial C wrapper for this function lets us build a tegra kernel with ARMv6 support enabled. Signed-off-by: Arnd Bergmann Acked-by: Joseph Lo Cc: Stephen Warren --- diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index 0494f739c95f..04a8e06f59a9 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -162,6 +162,11 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id) return last_cpu; } +int tegra_cpu_do_idle(void) +{ + return cpu_do_idle(); +} + static int tegra_sleep_cpu(unsigned long v2p) { /* Switch to the identity mapping. */ diff --git a/arch/arm/mach-tegra/sleep-tegra20.S b/arch/arm/mach-tegra/sleep-tegra20.S index 9f6bfafdd512..e3f2417c420e 100644 --- a/arch/arm/mach-tegra/sleep-tegra20.S +++ b/arch/arm/mach-tegra/sleep-tegra20.S @@ -197,7 +197,7 @@ ENTRY(tegra20_sleep_cpu_secondary_finish) mov r3, #CPU_RESETTABLE str r3, [r0] - bl cpu_do_idle + bl tegra_cpu_do_idle /* * cpu may be reset while in wfi, which will return through