From 68c1232f51350b007cb1f05260e9e784770ec513 Mon Sep 17 00:00:00 2001 From: Paul Burton Date: Fri, 14 Mar 2014 16:06:16 +0000 Subject: MIPS: smp-cps: function to determine whether CPS SMP is in use The core power down state for cpuidle will require that the CPS SMP implementation is in use. This patch provides a mips_cps_smp_in_use function which determines whether or not the CPS SMP implementation is currently in use. Signed-off-by: Paul Burton --- arch/mips/include/asm/smp-cps.h | 2 ++ arch/mips/kernel/smp-cps.c | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'arch') diff --git a/arch/mips/include/asm/smp-cps.h b/arch/mips/include/asm/smp-cps.h index d49279e..324df2c 100644 --- a/arch/mips/include/asm/smp-cps.h +++ b/arch/mips/include/asm/smp-cps.h @@ -31,6 +31,8 @@ extern void mips_cps_core_init(void); extern struct vpe_boot_config *mips_cps_boot_vpes(void); +extern bool mips_cps_smp_in_use(void); + #else /* __ASSEMBLY__ */ .extern mips_cps_bootcfg; diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index af90e82..c7879fb 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -260,6 +260,12 @@ static struct plat_smp_ops cps_smp_ops = { .cpus_done = cps_cpus_done, }; +bool mips_cps_smp_in_use(void) +{ + extern struct plat_smp_ops *mp_ops; + return mp_ops == &cps_smp_ops; +} + int register_cps_smp_ops(void) { if (!mips_cm_present()) { -- cgit v1.1