Lines Matching refs:cluster

74 static bool hip04_cluster_is_down(unsigned int cluster)  in hip04_cluster_is_down()  argument
79 if (hip04_cpu_table[cluster][i]) in hip04_cluster_is_down()
84 static void hip04_set_snoop_filter(unsigned int cluster, unsigned int on) in hip04_set_snoop_filter() argument
92 data |= 1 << cluster; in hip04_set_snoop_filter()
94 data &= ~(1 << cluster); in hip04_set_snoop_filter()
103 unsigned int mpidr, cpu, cluster; in hip04_boot_secondary() local
109 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_boot_secondary()
113 if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER) in hip04_boot_secondary()
118 if (hip04_cpu_table[cluster][cpu]) in hip04_boot_secondary()
121 sys_dreq = sysctrl + SC_CPU_RESET_DREQ(cluster); in hip04_boot_secondary()
122 sys_status = sysctrl + SC_CPU_RESET_STATUS(cluster); in hip04_boot_secondary()
123 if (hip04_cluster_is_down(cluster)) { in hip04_boot_secondary()
130 hip04_set_snoop_filter(cluster, 1); in hip04_boot_secondary()
149 hip04_cpu_table[cluster][cpu]++; in hip04_boot_secondary()
158 unsigned int mpidr, cpu, cluster; in hip04_cpu_die() local
163 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_die()
166 hip04_cpu_table[cluster][cpu]--; in hip04_cpu_die()
167 if (hip04_cpu_table[cluster][cpu] == 1) { in hip04_cpu_die()
171 } else if (hip04_cpu_table[cluster][cpu] > 1) { in hip04_cpu_die()
172 pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu); in hip04_cpu_die()
176 last_man = hip04_cluster_is_down(cluster); in hip04_cpu_die()
196 unsigned int mpidr, cpu, cluster; in hip04_cpu_kill() local
201 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_kill()
202 BUG_ON(cluster >= HIP04_MAX_CLUSTERS || in hip04_cpu_kill()
208 if (hip04_cpu_table[cluster][cpu]) in hip04_cpu_kill()
211 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); in hip04_cpu_kill()
223 writel_relaxed(data, sysctrl + SC_CPU_RESET_REQ(cluster)); in hip04_cpu_kill()
226 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); in hip04_cpu_kill()
232 if (hip04_cluster_is_down(cluster)) in hip04_cpu_kill()
233 hip04_set_snoop_filter(cluster, 0); in hip04_cpu_kill()
252 unsigned int mpidr, cpu, cluster; in hip04_cpu_table_init() local
256 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_table_init()
258 if (cluster >= HIP04_MAX_CLUSTERS || in hip04_cpu_table_init()
263 hip04_set_snoop_filter(cluster, 1); in hip04_cpu_table_init()
264 hip04_cpu_table[cluster][cpu] = 1; in hip04_cpu_table_init()