Skip to content

Commit

Permalink
MIPS: smp-cps: function to determine whether CPS SMP is in use
Browse files Browse the repository at this point in the history
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 <paul.burton@imgtec.com>
  • Loading branch information
Paul Burton committed May 28, 2014
1 parent 245a786 commit 68c1232
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mips/include/asm/smp-cps.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions arch/mips/kernel/smp-cps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 68c1232

Please sign in to comment.