Lines Matching refs:cluster
129 struct k3_r5_cluster *cluster; member
249 static int k3_r5_lockstep_reset(struct k3_r5_cluster *cluster) in k3_r5_lockstep_reset() argument
255 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
266 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
279 list_for_each_entry_continue_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
284 core = list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_lockstep_reset()
286 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
294 static int k3_r5_lockstep_release(struct k3_r5_cluster *cluster) in k3_r5_lockstep_release() argument
300 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
312 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
324 list_for_each_entry_continue(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
328 core = list_first_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_lockstep_release()
330 list_for_each_entry_from(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
362 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_prepare() local
367 ret = (cluster->mode == CLUSTER_MODE_LOCKSTEP) ? in k3_r5_rproc_prepare()
368 k3_r5_lockstep_release(cluster) : k3_r5_split_release(core); in k3_r5_rproc_prepare()
401 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_unprepare() local
406 ret = (cluster->mode == CLUSTER_MODE_LOCKSTEP) ? in k3_r5_rproc_unprepare()
407 k3_r5_lockstep_reset(cluster) : k3_r5_split_reset(core); in k3_r5_rproc_unprepare()
429 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_start() local
474 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_start()
475 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_rproc_start()
489 list_for_each_entry_continue(core, &cluster->cores, elem) { in k3_r5_rproc_start()
520 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_stop() local
525 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_stop()
526 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_rproc_stop()
544 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_rproc_stop()
663 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_configure() local
672 core0 = list_first_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_rproc_configure()
673 core = (cluster->mode == CLUSTER_MODE_LOCKSTEP) ? core0 : kproc->core; in k3_r5_rproc_configure()
684 if (!lockstep_en && cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_configure()
685 dev_err(cluster->dev, "lockstep mode not permitted, force configuring for split-mode\n"); in k3_r5_rproc_configure()
686 cluster->mode = CLUSTER_MODE_SPLIT; in k3_r5_rproc_configure()
717 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_configure()
723 list_for_each_entry(temp, &cluster->cores, elem) { in k3_r5_rproc_configure()
860 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_rproc_init() local
869 core1 = list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_cluster_rproc_init()
870 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_cluster_rproc_init()
892 kproc->cluster = cluster; in k3_r5_cluster_rproc_init()
919 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) in k3_r5_cluster_rproc_init()
934 if (cluster->mode == CLUSTER_MODE_SPLIT && core == core1) { in k3_r5_cluster_rproc_init()
945 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_rproc_exit() local
955 core = (cluster->mode == CLUSTER_MODE_LOCKSTEP) ? in k3_r5_cluster_rproc_exit()
956 list_first_entry(&cluster->cores, struct k3_r5_core, elem) : in k3_r5_cluster_rproc_exit()
957 list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_cluster_rproc_exit()
959 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_cluster_rproc_exit()
1260 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_of_exit() local
1264 list_for_each_entry_safe_reverse(core, temp, &cluster->cores, elem) { in k3_r5_cluster_of_exit()
1273 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_of_init() local
1299 list_add_tail(&core->elem, &cluster->cores); in k3_r5_cluster_of_init()
1313 struct k3_r5_cluster *cluster; in k3_r5_probe() local
1317 cluster = devm_kzalloc(dev, sizeof(*cluster), GFP_KERNEL); in k3_r5_probe()
1318 if (!cluster) in k3_r5_probe()
1321 cluster->dev = dev; in k3_r5_probe()
1322 cluster->mode = CLUSTER_MODE_LOCKSTEP; in k3_r5_probe()
1323 INIT_LIST_HEAD(&cluster->cores); in k3_r5_probe()
1325 ret = of_property_read_u32(np, "ti,cluster-mode", &cluster->mode); in k3_r5_probe()
1339 platform_set_drvdata(pdev, cluster); in k3_r5_probe()