aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/mcpm.h
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2015-04-28 14:11:07 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2015-05-06 11:45:46 -0400
commit7cc8b991cdc985aaa73bf9c429c810cd442fb74d (patch)
tree8b5f9290847562b1cd0000581b64b6febc95a0f8 /arch/arm/include/asm/mcpm.h
parent77404d81cadf192cc1261d6269f622a06b83cdd5 (diff)
ARM: MCPM: make internal helpers private to the core code
This concerns the following helpers: __mcpm_cpu_going_down() __mcpm_cpu_down() __mcpm_outbound_enter_critical() __mcpm_outbound_leave_critical() __mcpm_cluster_state() They are and should only be used by the core code now. Therefore their declarations are removed from mcpm.h and their definitions are made static, hence the need to move them before their users which accounts for the bulk of this patch. This left the mcpm_sync_struct definition at an odd location, therefore it is moved as well with some comment clarifications. Signed-off-by: Nicolas Pitre <nico@linaro.org> Acked-by: Dave Martin <Dave.Martin@arm.com>
Diffstat (limited to 'arch/arm/include/asm/mcpm.h')
-rw-r--r--arch/arm/include/asm/mcpm.h52
1 files changed, 23 insertions, 29 deletions
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index e2118c941dbf..6a40d5f8db60 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -245,35 +245,6 @@ struct mcpm_platform_ops {
245 */ 245 */
246int __init mcpm_platform_register(const struct mcpm_platform_ops *ops); 246int __init mcpm_platform_register(const struct mcpm_platform_ops *ops);
247 247
248/* Synchronisation structures for coordinating safe cluster setup/teardown: */
249
250/*
251 * When modifying this structure, make sure you update the MCPM_SYNC_ defines
252 * to match.
253 */
254struct mcpm_sync_struct {
255 /* individual CPU states */
256 struct {
257 s8 cpu __aligned(__CACHE_WRITEBACK_GRANULE);
258 } cpus[MAX_CPUS_PER_CLUSTER];
259
260 /* cluster state */
261 s8 cluster __aligned(__CACHE_WRITEBACK_GRANULE);
262
263 /* inbound-side state */
264 s8 inbound __aligned(__CACHE_WRITEBACK_GRANULE);
265};
266
267struct sync_struct {
268 struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS];
269};
270
271void __mcpm_cpu_going_down(unsigned int cpu, unsigned int cluster);
272void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster);
273void __mcpm_outbound_leave_critical(unsigned int cluster, int state);
274bool __mcpm_outbound_enter_critical(unsigned int this_cpu, unsigned int cluster);
275int __mcpm_cluster_state(unsigned int cluster);
276
277/** 248/**
278 * mcpm_sync_init - Initialize the cluster synchronization support 249 * mcpm_sync_init - Initialize the cluster synchronization support
279 * 250 *
@@ -312,6 +283,29 @@ int __init mcpm_loopback(void (*cache_disable)(void));
312 283
313void __init mcpm_smp_set_ops(void); 284void __init mcpm_smp_set_ops(void);
314 285
286/*
287 * Synchronisation structures for coordinating safe cluster setup/teardown.
288 * This is private to the MCPM core code and shared between C and assembly.
289 * When modifying this structure, make sure you update the MCPM_SYNC_ defines
290 * to match.
291 */
292struct mcpm_sync_struct {
293 /* individual CPU states */
294 struct {
295 s8 cpu __aligned(__CACHE_WRITEBACK_GRANULE);
296 } cpus[MAX_CPUS_PER_CLUSTER];
297
298 /* cluster state */
299 s8 cluster __aligned(__CACHE_WRITEBACK_GRANULE);
300
301 /* inbound-side state */
302 s8 inbound __aligned(__CACHE_WRITEBACK_GRANULE);
303};
304
305struct sync_struct {
306 struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS];
307};
308
315#else 309#else
316 310
317/* 311/*