靡日不思论坛主持词Linux关机(Poweroff)流程
SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __ur *, arg)//kernel/sys.c -->...
-->ca LINUX_REBOOT_CMD_RESTART:
-->kernel_restart(NULL);嘴巴很干
-->kernel_restart_prepare(cmd);
-->...
-->machine_restart(cmd);
-->...
琥珀手镯-->ca LINUX_REBOOT_CMD_POWER_OFF:
红茶的功效
-->kernel_power_off();
-->if (pm_power_off_prepare)//如果实现了平台相关的函数则执⾏
玉佛苑--> pm_power_off_prepare();
-->...弘一法师简介
-->machine_power_off();
社会调查报告格式-->machine_shutdown();
-->if (pm_power_off)//如果实现了平台相关的函数则执⾏
--> pm_power_off();
-->do_exit(0);
-->...
其中:pm_power_off_prepare()以及pm_power_off()与具体平台相关
Freescale i.MX6:
mx6_sabresd_board_init(void)-->pm_power_off = mx6_poweroff;
static void mx6_poweroff(void)
{
mx6q_board_powerctrl(0);//仅仅是断开电源
}