add cpu_do_idle to handle idle

add wrap function cpu_do_idle in default_idle to handle arch cpu specific
idle operation.

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jason Chen CJ
2018-08-04 19:11:49 +08:00
committed by lijinxia
parent b78aa347e0
commit b1612e3072
3 changed files with 8 additions and 3 deletions

View File

@@ -172,9 +172,8 @@ void default_idle(void)
schedule();
} else if (need_offline(pcpu_id) != 0) {
cpu_dead(pcpu_id);
} else {
__asm __volatile("pause" ::: "memory");
}
} else
cpu_do_idle(pcpu_id);
}
}