Lines Matching defs:cluster
71 static bool hip04_cluster_is_down(unsigned int cluster)
76 if (hip04_cpu_table[cluster][i])
81 static void hip04_set_snoop_filter(unsigned int cluster, unsigned int on)
89 data |= 1 << cluster;
91 data &= ~(1 << cluster);
100 unsigned int mpidr, cpu, cluster;
106 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
110 if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER)
115 if (hip04_cpu_table[cluster][cpu])
118 sys_dreq = sysctrl + SC_CPU_RESET_DREQ(cluster);
119 sys_status = sysctrl + SC_CPU_RESET_STATUS(cluster);
120 if (hip04_cluster_is_down(cluster)) {
127 hip04_set_snoop_filter(cluster, 1);
146 hip04_cpu_table[cluster][cpu]++;
155 unsigned int mpidr, cpu, cluster;
160 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
163 hip04_cpu_table[cluster][cpu]--;
164 if (hip04_cpu_table[cluster][cpu] == 1) {
168 } else if (hip04_cpu_table[cluster][cpu] > 1) {
169 pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu);
173 last_man = hip04_cluster_is_down(cluster);
193 unsigned int mpidr, cpu, cluster;
198 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
199 BUG_ON(cluster >= HIP04_MAX_CLUSTERS ||
205 if (hip04_cpu_table[cluster][cpu])
208 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster));
212 /* Wait for clean L2 when the whole cluster is down. */
220 writel_relaxed(data, sysctrl + SC_CPU_RESET_REQ(cluster));
223 data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster));
229 if (hip04_cluster_is_down(cluster))
230 hip04_set_snoop_filter(cluster, 0);
249 unsigned int mpidr, cpu, cluster;
253 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
255 if (cluster >= HIP04_MAX_CLUSTERS ||
260 hip04_set_snoop_filter(cluster, 1);
261 hip04_cpu_table[cluster][cpu] = 1;