Loading arch/arm/mach-msm/subsystem_restart.c +10 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ struct restart_log { * @id: ida * @restart_level: restart level (0 - panic, 1 - related, 2 - independent, etc.) * @restart_order: order of other devices this devices restarts with * @crash_count: number of times the device has crashed * @dentry: debugfs directory for this device * @do_ramdump_on_put: ramdump on subsystem_put() if true * @err_ready: completion variable to record error ready from subsystem Loading @@ -153,6 +154,7 @@ struct subsys_device { int count; int id; int restart_level; int crash_count; struct subsys_soc_restart_order *restart_order; #ifdef CONFIG_DEBUG_FS struct dentry *dentry; Loading Loading @@ -183,6 +185,12 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, return snprintf(buf, PAGE_SIZE, "%s\n", subsys_states[state]); } static ssize_t crash_count_show(struct device *dev, struct device_attribute *attr, char *buf) { return snprintf(buf, PAGE_SIZE, "%d\n", to_subsys(dev)->crash_count); } static ssize_t restart_level_show(struct device *dev, struct device_attribute *attr, char *buf) { Loading Loading @@ -247,6 +255,7 @@ EXPORT_SYMBOL(subsys_default_online); static struct device_attribute subsys_attrs[] = { __ATTR_RO(name), __ATTR_RO(state), __ATTR_RO(crash_count), __ATTR(restart_level, 0644, restart_level_show, restart_level_store), __ATTR_NULL, }; Loading Loading @@ -437,6 +446,7 @@ static void subsystem_shutdown(struct subsys_device *dev, void *data) if (dev->desc->shutdown(dev->desc, true) < 0) panic("subsys-restart: [%p]: Failed to shutdown %s!", current, name); dev->crash_count++; subsys_set_state(dev, SUBSYS_OFFLINE); disable_all_irqs(dev); } Loading Loading
arch/arm/mach-msm/subsystem_restart.c +10 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,7 @@ struct restart_log { * @id: ida * @restart_level: restart level (0 - panic, 1 - related, 2 - independent, etc.) * @restart_order: order of other devices this devices restarts with * @crash_count: number of times the device has crashed * @dentry: debugfs directory for this device * @do_ramdump_on_put: ramdump on subsystem_put() if true * @err_ready: completion variable to record error ready from subsystem Loading @@ -153,6 +154,7 @@ struct subsys_device { int count; int id; int restart_level; int crash_count; struct subsys_soc_restart_order *restart_order; #ifdef CONFIG_DEBUG_FS struct dentry *dentry; Loading Loading @@ -183,6 +185,12 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, return snprintf(buf, PAGE_SIZE, "%s\n", subsys_states[state]); } static ssize_t crash_count_show(struct device *dev, struct device_attribute *attr, char *buf) { return snprintf(buf, PAGE_SIZE, "%d\n", to_subsys(dev)->crash_count); } static ssize_t restart_level_show(struct device *dev, struct device_attribute *attr, char *buf) { Loading Loading @@ -247,6 +255,7 @@ EXPORT_SYMBOL(subsys_default_online); static struct device_attribute subsys_attrs[] = { __ATTR_RO(name), __ATTR_RO(state), __ATTR_RO(crash_count), __ATTR(restart_level, 0644, restart_level_show, restart_level_store), __ATTR_NULL, }; Loading Loading @@ -437,6 +446,7 @@ static void subsystem_shutdown(struct subsys_device *dev, void *data) if (dev->desc->shutdown(dev->desc, true) < 0) panic("subsys-restart: [%p]: Failed to shutdown %s!", current, name); dev->crash_count++; subsys_set_state(dev, SUBSYS_OFFLINE); disable_all_irqs(dev); } Loading