Lines Matching refs:cluster

71 static bool hip04_cluster_is_down(unsigned int cluster)  in hip04_cluster_is_down()  argument
76 if (hip04_cpu_table[cluster][i]) in hip04_cluster_is_down()
81 static void hip04_set_snoop_filter(unsigned int cluster, unsigned int on) in hip04_set_snoop_filter() argument
89 data |= 1 << cluster; in hip04_set_snoop_filter()
91 data &= ~(1 << cluster); in hip04_set_snoop_filter()
100 unsigned int mpidr, cpu, cluster; in hip04_boot_secondary() local
106 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_boot_secondary()
110 if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER) in hip04_boot_secondary()
115 if (hip04_cpu_table[cluster][cpu]) in hip04_boot_secondary()
118 sys_dreq = sysctrl + SC_CPU_RESET_DREQ(cluster); in hip04_boot_secondary()
119 sys_status = sysctrl + SC_CPU_RESET_STATUS(cluster); in hip04_boot_secondary()
120 if (hip04_cluster_is_down(cluster)) { in hip04_boot_secondary()
127 hip04_set_snoop_filter(cluster, 1); in hip04_boot_secondary()
146 hip04_cpu_table[cluster][cpu]++; in hip04_boot_secondary()
155 unsigned int mpidr, cpu, cluster; in hip04_cpu_die() local
160 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_die()
163 hip04_cpu_table[cluster][cpu]--; in hip04_cpu_die()
164 if (hip04_cpu_table[cluster][cpu] == 1) { in hip04_cpu_die()
168 } else if (hip04_cpu_table[cluster][cpu] > 1) { in hip04_cpu_die()
169 pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu); in hip04_cpu_die()
173 last_man = hip04_cluster_is_down(cluster); in hip04_cpu_die()
193 unsigned int mpidr, cpu, cluster; in hip04_cpu_kill() local
198 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_kill()
199 BUG_ON(cluster >= HIP04_MAX_CLUSTERS || in hip04_cpu_kill()
205 if (hip04_cpu_table[cluster][cpu]) in hip04_cpu_kill()
208 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); in hip04_cpu_kill()
220 writel_relaxed(data, sysctrl + SC_CPU_RESET_REQ(cluster)); in hip04_cpu_kill()
223 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); in hip04_cpu_kill()
229 if (hip04_cluster_is_down(cluster)) in hip04_cpu_kill()
230 hip04_set_snoop_filter(cluster, 0); in hip04_cpu_kill()
249 unsigned int mpidr, cpu, cluster; in hip04_cpu_table_init() local
253 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_table_init()
255 if (cluster >= HIP04_MAX_CLUSTERS || in hip04_cpu_table_init()
260 hip04_set_snoop_filter(cluster, 1); in hip04_cpu_table_init()
261 hip04_cpu_table[cluster][cpu] = 1; in hip04_cpu_table_init()