mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
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>
This commit is contained in:
parent
0259d9eb30
commit
2058842e6d
2 changed files with 6 additions and 1 deletions
|
@ -162,6 +162,11 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id)
|
||||||
return last_cpu;
|
return last_cpu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int tegra_cpu_do_idle(void)
|
||||||
|
{
|
||||||
|
return cpu_do_idle();
|
||||||
|
}
|
||||||
|
|
||||||
static int tegra_sleep_cpu(unsigned long v2p)
|
static int tegra_sleep_cpu(unsigned long v2p)
|
||||||
{
|
{
|
||||||
/* Switch to the identity mapping. */
|
/* Switch to the identity mapping. */
|
||||||
|
|
|
@ -197,7 +197,7 @@ ENTRY(tegra20_sleep_cpu_secondary_finish)
|
||||||
mov r3, #CPU_RESETTABLE
|
mov r3, #CPU_RESETTABLE
|
||||||
str r3, [r0]
|
str r3, [r0]
|
||||||
|
|
||||||
bl cpu_do_idle
|
bl tegra_cpu_do_idle
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cpu may be reset while in wfi, which will return through
|
* cpu may be reset while in wfi, which will return through
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue