From eae868ee1d776e923b667ea2144d0aca3014a2ef Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Mon, 25 Jul 2011 12:56:29 -0700 Subject: 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 Signed-off-by: Dan Willemsen Rebase-Id: R429d76f341410455883ad7d9e28ff66a44eddb98 --- arch/arm/mach-tegra/pm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-tegra/pm.c') 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); -- cgit v1.2.3