Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: tegra: Add tegra_pm_park_secondary_cpu()

This function resembles tegra_cpu_die() of the hotplug code, but
this variant is more suitable to be used for CPU PM because it's made
specifically to be used by cpu_suspend(). In short this function puts
secondary CPU offline, it will be used by the new CPUIDLE driver.

Acked-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Jasper Korten <jja2000@gmail.com>
Tested-by: David Heidelberg <david@ixit.cz>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Dmitry Osipenko and committed by
Thierry Reding
859a6f6e df25e554

+19
+14
arch/arm/mach-tegra/pm.c
··· 436 436 437 437 suspend_set_ops(&tegra_suspend_ops); 438 438 } 439 + 440 + int tegra_pm_park_secondary_cpu(unsigned long cpu) 441 + { 442 + if (cpu > 0) { 443 + tegra_disable_clean_inv_dcache(TEGRA_FLUSH_CACHE_LOUIS); 444 + 445 + if (tegra_get_chip_id() == TEGRA20) 446 + tegra20_hotplug_shutdown(); 447 + else 448 + tegra30_hotplug_shutdown(); 449 + } 450 + 451 + return -EINVAL; 452 + } 439 453 #endif
+5
arch/arm/mach-tegra/pm.h
··· 31 31 32 32 #ifdef CONFIG_PM_SLEEP 33 33 void tegra_init_suspend(void); 34 + int tegra_pm_park_secondary_cpu(unsigned long cpu); 34 35 #else 35 36 static inline void tegra_init_suspend(void) {} 37 + static inline int tegra_pm_park_secondary_cpu(unsigned long cpu) 38 + { 39 + return -ENOTSUPP; 40 + } 36 41 #endif 37 42 38 43 #endif /* _MACH_TEGRA_PM_H_ */