Skip to content

Commit 2058842

Browse files
committed
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 <arnd@arndb.de> Acked-by: Joseph Lo <josephl@nvidia.com> Cc: Stephen Warren <swarren@nvidia.com>
1 parent 0259d9e commit 2058842

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

arch/arm/mach-tegra/pm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id)
162162
return last_cpu;
163163
}
164164

165+
int tegra_cpu_do_idle(void)
166+
{
167+
return cpu_do_idle();
168+
}
169+
165170
static int tegra_sleep_cpu(unsigned long v2p)
166171
{
167172
/* Switch to the identity mapping. */

arch/arm/mach-tegra/sleep-tegra20.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ ENTRY(tegra20_sleep_cpu_secondary_finish)
197197
mov r3, #CPU_RESETTABLE
198198
str r3, [r0]
199199

200-
bl cpu_do_idle
200+
bl tegra_cpu_do_idle
201201

202202
/*
203203
* cpu may be reset while in wfi, which will return through

0 commit comments

Comments
 (0)