Lines Matching refs:cluster
157 struct k3_r5_cluster *cluster; member
277 static int k3_r5_lockstep_reset(struct k3_r5_cluster *cluster) in k3_r5_lockstep_reset() argument
283 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
294 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
307 list_for_each_entry_continue_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
312 core = list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_lockstep_reset()
314 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_reset()
322 static int k3_r5_lockstep_release(struct k3_r5_cluster *cluster) in k3_r5_lockstep_release() argument
328 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
340 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
352 list_for_each_entry_continue(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
356 core = list_first_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_lockstep_release()
358 list_for_each_entry_from(core, &cluster->cores, elem) { in k3_r5_lockstep_release()
397 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_prepare() local
411 ret = (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_rproc_prepare()
412 cluster->mode == CLUSTER_MODE_SINGLECPU) ? in k3_r5_rproc_prepare()
413 k3_r5_lockstep_release(cluster) : k3_r5_split_release(core); in k3_r5_rproc_prepare()
426 if (cluster->soc_data->tcm_ecc_autoinit && !mem_init_dis) { in k3_r5_rproc_prepare()
463 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_unprepare() local
469 ret = (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_rproc_unprepare()
470 cluster->mode == CLUSTER_MODE_SINGLECPU) ? in k3_r5_rproc_unprepare()
471 k3_r5_lockstep_reset(cluster) : k3_r5_split_reset(core); in k3_r5_rproc_unprepare()
497 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_start() local
542 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_start()
543 list_for_each_entry_reverse(core, &cluster->cores, elem) { in k3_r5_rproc_start()
557 list_for_each_entry_continue(core, &cluster->cores, elem) { in k3_r5_rproc_start()
592 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_stop() local
597 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_stop()
598 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_rproc_stop()
616 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_rproc_stop()
739 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_rproc_configure() local
749 core0 = list_first_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_rproc_configure()
750 if (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_rproc_configure()
751 cluster->mode == CLUSTER_MODE_SINGLECPU) { in k3_r5_rproc_configure()
766 if (cluster->soc_data->single_cpu_mode) { in k3_r5_rproc_configure()
769 if (single_cpu && cluster->mode == CLUSTER_MODE_SPLIT) { in k3_r5_rproc_configure()
770 dev_err(cluster->dev, "split-mode not permitted, force configuring for single-cpu mode\n"); in k3_r5_rproc_configure()
771 cluster->mode = CLUSTER_MODE_SINGLECPU; in k3_r5_rproc_configure()
778 if (!lockstep_en && cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_configure()
779 dev_err(cluster->dev, "lockstep mode not permitted, force configuring for split-mode\n"); in k3_r5_rproc_configure()
780 cluster->mode = CLUSTER_MODE_SPLIT; in k3_r5_rproc_configure()
788 if (cluster->soc_data->single_cpu_mode) { in k3_r5_rproc_configure()
795 if (cluster->mode == CLUSTER_MODE_SINGLECPU) in k3_r5_rproc_configure()
824 if (cluster->mode == CLUSTER_MODE_LOCKSTEP) { in k3_r5_rproc_configure()
830 list_for_each_entry(temp, &cluster->cores, elem) { in k3_r5_rproc_configure()
980 struct k3_r5_cluster *cluster = kproc->cluster; in k3_r5_adjust_tcm_sizes() local
985 if (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_adjust_tcm_sizes()
986 cluster->mode == CLUSTER_MODE_SINGLECPU || in k3_r5_adjust_tcm_sizes()
987 !cluster->soc_data->tcm_is_double) in k3_r5_adjust_tcm_sizes()
990 core0 = list_first_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_adjust_tcm_sizes()
1005 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_rproc_init() local
1014 core1 = list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_cluster_rproc_init()
1015 list_for_each_entry(core, &cluster->cores, elem) { in k3_r5_cluster_rproc_init()
1037 kproc->cluster = cluster; in k3_r5_cluster_rproc_init()
1066 if (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_cluster_rproc_init()
1067 cluster->mode == CLUSTER_MODE_SINGLECPU) in k3_r5_cluster_rproc_init()
1082 if (cluster->mode == CLUSTER_MODE_SPLIT && core == core1) { in k3_r5_cluster_rproc_init()
1093 struct k3_r5_cluster *cluster = platform_get_drvdata(data); in k3_r5_cluster_rproc_exit() local
1103 core = (cluster->mode == CLUSTER_MODE_LOCKSTEP || in k3_r5_cluster_rproc_exit()
1104 cluster->mode == CLUSTER_MODE_SINGLECPU) ? in k3_r5_cluster_rproc_exit()
1105 list_first_entry(&cluster->cores, struct k3_r5_core, elem) : in k3_r5_cluster_rproc_exit()
1106 list_last_entry(&cluster->cores, struct k3_r5_core, elem); in k3_r5_cluster_rproc_exit()
1108 list_for_each_entry_from_reverse(core, &cluster->cores, elem) { in k3_r5_cluster_rproc_exit()
1407 struct k3_r5_cluster *cluster = platform_get_drvdata(data); in k3_r5_cluster_of_exit() local
1411 list_for_each_entry_safe_reverse(core, temp, &cluster->cores, elem) { in k3_r5_cluster_of_exit()
1420 struct k3_r5_cluster *cluster = platform_get_drvdata(pdev); in k3_r5_cluster_of_init() local
1446 list_add_tail(&core->elem, &cluster->cores); in k3_r5_cluster_of_init()
1460 struct k3_r5_cluster *cluster; in k3_r5_probe() local
1471 cluster = devm_kzalloc(dev, sizeof(*cluster), GFP_KERNEL); in k3_r5_probe()
1472 if (!cluster) in k3_r5_probe()
1475 cluster->dev = dev; in k3_r5_probe()
1480 cluster->mode = data->single_cpu_mode ? in k3_r5_probe()
1482 cluster->soc_data = data; in k3_r5_probe()
1483 INIT_LIST_HEAD(&cluster->cores); in k3_r5_probe()
1485 ret = of_property_read_u32(np, "ti,cluster-mode", &cluster->mode); in k3_r5_probe()
1499 platform_set_drvdata(pdev, cluster); in k3_r5_probe()