Commit 68c1232f authored by Paul Burton's avatar Paul Burton

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: default avatarPaul Burton <paul.burton@imgtec.com>
parent 245a7868
...@@ -31,6 +31,8 @@ extern void mips_cps_core_init(void); ...@@ -31,6 +31,8 @@ extern void mips_cps_core_init(void);
extern struct vpe_boot_config *mips_cps_boot_vpes(void); extern struct vpe_boot_config *mips_cps_boot_vpes(void);
extern bool mips_cps_smp_in_use(void);
#else /* __ASSEMBLY__ */ #else /* __ASSEMBLY__ */
.extern mips_cps_bootcfg; .extern mips_cps_bootcfg;
......
...@@ -260,6 +260,12 @@ static struct plat_smp_ops cps_smp_ops = { ...@@ -260,6 +260,12 @@ static struct plat_smp_ops cps_smp_ops = {
.cpus_done = cps_cpus_done, .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) int register_cps_smp_ops(void)
{ {
if (!mips_cm_present()) { if (!mips_cm_present()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment