子系统发生异常时,是如何通过中断通知AP主系统?
AP主系统在kernel代码中subsystem_restart.c 提供子系统中断注册接口:subsys_register。
比如,为modem子系统注意异常中断注册:
static int pil_subsys_init(struct modem_data *drv,
struct platform_device *pdev)
{
int ret;
drv->subsys_desc.name = "modem";
drv->subsys_desc.dev = &pdev->dev;
drv->subsys_desc.owner = THIS_MODULE;
drv->subsys_desc.shutdown = modem_shutdown;
drv->subsys_desc.powerup = modem_powerup;
drv->subsys_desc.ramdump = modem_ramdump;