diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-07-25 12:56:29 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:58 -0800 |
commit | eae868ee1d776e923b667ea2144d0aca3014a2ef (patch) | |
tree | df4f86e8f00ee363ea9b93063c4d5ad891821c74 /arch/arm/mach-tegra/pm.c | |
parent | c25ca2247ba8515cc58c6bc847d97692f12b3f08 (diff) |
ARM: tegra: power: Calculate address of IRAM LP2 mask once
Perform the calcuation of the address of the IRAM copy of the LP2
mask only once because run-time evaluation of it's IO_ADDRESS()
is a rather lengthly computation whose value never changes.
Change-Id: I8456fa3eb719dcf4f42c360196349177b8907fd9
Signed-off-by: Scott Williams <scwilliams@nvidia.com>
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
Rebase-Id: R429d76f341410455883ad7d9e28ff66a44eddb98
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r-- | arch/arm/mach-tegra/pm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index 273aa178bf1d..f9755b5ed98e 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -89,6 +89,7 @@ struct suspend_context { #ifdef CONFIG_PM_SLEEP static DEFINE_SPINLOCK(tegra_lp2_lock); static cpumask_t tegra_in_lp2; +static cpumask_t *iram_cpu_lp2_mask; static u8 *iram_save; static unsigned long iram_save_size; static void __iomem *iram_code = IO_ADDRESS(TEGRA_IRAM_CODE_AREA); @@ -417,7 +418,7 @@ void tegra_clear_cpu_in_lp2(int cpu) can't use used directly by cpumask_clear_cpu() because it uses LDREX/STREX which requires the addressed location to be inner cacheable and sharable which IRAM isn't. */ - *tegra_cpu_lp2_mask = tegra_in_lp2; + *iram_cpu_lp2_mask = tegra_in_lp2; spin_unlock(&tegra_lp2_lock); } @@ -433,7 +434,7 @@ bool tegra_set_cpu_in_lp2(int cpu) can't use used directly by cpumask_set_cpu() because it uses LDREX/STREX which requires the addressed location to be inner cacheable and sharable which IRAM isn't. */ - *tegra_cpu_lp2_mask = tegra_in_lp2; + *iram_cpu_lp2_mask = tegra_in_lp2; if (cpumask_equal(&tegra_in_lp2, cpu_online_mask)) last_cpu = true; @@ -877,6 +878,7 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat) __func__); } + iram_cpu_lp2_mask = tegra_cpu_lp2_mask; #ifdef CONFIG_CPU_IDLE if (plat->suspend_mode == TEGRA_SUSPEND_NONE) tegra_lp2_in_idle(false); |