Loading drivers/hwtracing/coresight/coresight.c +35 −1 Original line number Diff line number Diff line Loading @@ -991,8 +991,42 @@ int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) return -EAGAIN; } static ssize_t reset_source_sink_store(struct bus_type *bus, const char *buf, size_t size) { int ret = 0; unsigned long val; struct coresight_path *cspath = NULL; struct coresight_path *cspath_next = NULL; struct coresight_device *csdev; ret = kstrtoul(buf, 10, &val); if (ret) return ret; mutex_lock(&coresight_mutex); list_for_each_entry_safe(cspath, cspath_next, &cs_active_paths, link) { csdev = coresight_get_source(cspath->path); if (!csdev) continue; coresight_disable(csdev); } mutex_unlock(&coresight_mutex); return size; } static BUS_ATTR_WO(reset_source_sink); static struct attribute *coresight_reset_source_sink_attrs[] = { &bus_attr_reset_source_sink.attr, NULL, }; ATTRIBUTE_GROUPS(coresight_reset_source_sink); struct bus_type coresight_bustype = { .name = "coresight", .bus_groups = coresight_reset_source_sink_groups, }; static int __init coresight_init(void) Loading Loading
drivers/hwtracing/coresight/coresight.c +35 −1 Original line number Diff line number Diff line Loading @@ -991,8 +991,42 @@ int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) return -EAGAIN; } static ssize_t reset_source_sink_store(struct bus_type *bus, const char *buf, size_t size) { int ret = 0; unsigned long val; struct coresight_path *cspath = NULL; struct coresight_path *cspath_next = NULL; struct coresight_device *csdev; ret = kstrtoul(buf, 10, &val); if (ret) return ret; mutex_lock(&coresight_mutex); list_for_each_entry_safe(cspath, cspath_next, &cs_active_paths, link) { csdev = coresight_get_source(cspath->path); if (!csdev) continue; coresight_disable(csdev); } mutex_unlock(&coresight_mutex); return size; } static BUS_ATTR_WO(reset_source_sink); static struct attribute *coresight_reset_source_sink_attrs[] = { &bus_attr_reset_source_sink.attr, NULL, }; ATTRIBUTE_GROUPS(coresight_reset_source_sink); struct bus_type coresight_bustype = { .name = "coresight", .bus_groups = coresight_reset_source_sink_groups, }; static int __init coresight_init(void) Loading