Loading drivers/soc/qcom/subsystem_restart.c +9 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,12 @@ static void subsystem_ramdump(struct subsys_device *dev, void *data) dev->do_ramdump_on_put = false; } static void subsystem_free_memory(struct subsys_device *dev, void *data) { if (dev->desc->free_memory) dev->desc->free_memory(dev->desc); } static void subsystem_powerup(struct subsys_device *dev, void *data) { const char *name = dev->desc->name; Loading Loading @@ -793,6 +799,7 @@ void subsystem_put(void *subsystem) subsys_stop(subsys); if (subsys->do_ramdump_on_put) subsystem_ramdump(subsys, NULL); subsystem_free_memory(subsys, NULL); } mutex_unlock(&track->lock); Loading Loading @@ -861,6 +868,8 @@ static void subsystem_restart_wq_func(struct work_struct *work) /* Collect ram dumps for all subsystems in order here */ for_each_subsys_device(list, count, NULL, subsystem_ramdump); for_each_subsys_device(list, count, NULL, subsystem_free_memory); notify_each_subsys_device(list, count, SUBSYS_BEFORE_POWERUP, NULL); for_each_subsys_device(list, count, NULL, subsystem_powerup); notify_each_subsys_device(list, count, SUBSYS_AFTER_POWERUP, NULL); Loading include/soc/qcom/subsystem_restart.h +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ struct module; * @powerup: Start a subsystem * @crash_shutdown: Shutdown a subsystem when the system crashes (can't sleep) * @ramdump: Collect a ramdump of the subsystem * @free_memory: Free the memory associated with this subsystem * @is_not_loadable: Indicate if subsystem firmware is not loadable via pil * framework * @no_auth: Set if subsystem does not rely on PIL to authenticate and bring Loading @@ -60,6 +61,7 @@ struct subsys_desc { int (*powerup)(const struct subsys_desc *desc); void (*crash_shutdown)(const struct subsys_desc *desc); int (*ramdump)(int, const struct subsys_desc *desc); void (*free_memory)(const struct subsys_desc *desc); irqreturn_t (*err_fatal_handler) (int irq, void *dev_id); irqreturn_t (*stop_ack_handler) (int irq, void *dev_id); irqreturn_t (*wdog_bite_handler) (int irq, void *dev_id); Loading Loading
drivers/soc/qcom/subsystem_restart.c +9 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,12 @@ static void subsystem_ramdump(struct subsys_device *dev, void *data) dev->do_ramdump_on_put = false; } static void subsystem_free_memory(struct subsys_device *dev, void *data) { if (dev->desc->free_memory) dev->desc->free_memory(dev->desc); } static void subsystem_powerup(struct subsys_device *dev, void *data) { const char *name = dev->desc->name; Loading Loading @@ -793,6 +799,7 @@ void subsystem_put(void *subsystem) subsys_stop(subsys); if (subsys->do_ramdump_on_put) subsystem_ramdump(subsys, NULL); subsystem_free_memory(subsys, NULL); } mutex_unlock(&track->lock); Loading Loading @@ -861,6 +868,8 @@ static void subsystem_restart_wq_func(struct work_struct *work) /* Collect ram dumps for all subsystems in order here */ for_each_subsys_device(list, count, NULL, subsystem_ramdump); for_each_subsys_device(list, count, NULL, subsystem_free_memory); notify_each_subsys_device(list, count, SUBSYS_BEFORE_POWERUP, NULL); for_each_subsys_device(list, count, NULL, subsystem_powerup); notify_each_subsys_device(list, count, SUBSYS_AFTER_POWERUP, NULL); Loading
include/soc/qcom/subsystem_restart.h +2 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ struct module; * @powerup: Start a subsystem * @crash_shutdown: Shutdown a subsystem when the system crashes (can't sleep) * @ramdump: Collect a ramdump of the subsystem * @free_memory: Free the memory associated with this subsystem * @is_not_loadable: Indicate if subsystem firmware is not loadable via pil * framework * @no_auth: Set if subsystem does not rely on PIL to authenticate and bring Loading @@ -60,6 +61,7 @@ struct subsys_desc { int (*powerup)(const struct subsys_desc *desc); void (*crash_shutdown)(const struct subsys_desc *desc); int (*ramdump)(int, const struct subsys_desc *desc); void (*free_memory)(const struct subsys_desc *desc); irqreturn_t (*err_fatal_handler) (int irq, void *dev_id); irqreturn_t (*stop_ack_handler) (int irq, void *dev_id); irqreturn_t (*wdog_bite_handler) (int irq, void *dev_id); Loading