Lines Matching refs:imc_global_refc
53 static struct imc_pmu_ref imc_global_refc = { variable
54 .lock = __SPIN_LOCK_UNLOCKED(imc_global_refc.lock),
727 spin_lock(&imc_global_refc.lock); in ppc_core_imc_cpu_offline()
728 if (imc_global_refc.id == IMC_DOMAIN_CORE) in ppc_core_imc_cpu_offline()
729 imc_global_refc.refc--; in ppc_core_imc_cpu_offline()
731 spin_unlock(&imc_global_refc.lock); in ppc_core_imc_cpu_offline()
746 spin_lock(&imc_global_refc.lock); in reset_global_refc()
747 imc_global_refc.refc--; in reset_global_refc()
754 if (imc_global_refc.refc <= 0) { in reset_global_refc()
755 imc_global_refc.refc = 0; in reset_global_refc()
756 imc_global_refc.id = 0; in reset_global_refc()
758 spin_unlock(&imc_global_refc.lock); in reset_global_refc()
880 spin_lock(&imc_global_refc.lock); in core_imc_event_init()
881 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_CORE) { in core_imc_event_init()
886 imc_global_refc.id = IMC_DOMAIN_CORE; in core_imc_event_init()
887 imc_global_refc.refc++; in core_imc_event_init()
889 spin_unlock(&imc_global_refc.lock); in core_imc_event_init()
892 spin_unlock(&imc_global_refc.lock); in core_imc_event_init()
964 spin_lock(&imc_global_refc.lock); in ppc_thread_imc_cpu_offline()
965 if (imc_global_refc.id == IMC_DOMAIN_THREAD) in ppc_thread_imc_cpu_offline()
966 imc_global_refc.refc--; in ppc_thread_imc_cpu_offline()
967 spin_unlock(&imc_global_refc.lock); in ppc_thread_imc_cpu_offline()
1007 spin_lock(&imc_global_refc.lock); in thread_imc_event_init()
1012 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_THREAD) { in thread_imc_event_init()
1013 imc_global_refc.id = IMC_DOMAIN_THREAD; in thread_imc_event_init()
1014 imc_global_refc.refc++; in thread_imc_event_init()
1016 spin_unlock(&imc_global_refc.lock); in thread_imc_event_init()
1019 spin_unlock(&imc_global_refc.lock); in thread_imc_event_init()
1252 spin_lock(&imc_global_refc.lock); in ppc_trace_imc_cpu_offline()
1253 if (imc_global_refc.id == IMC_DOMAIN_TRACE) in ppc_trace_imc_cpu_offline()
1254 imc_global_refc.refc--; in ppc_trace_imc_cpu_offline()
1255 spin_unlock(&imc_global_refc.lock); in ppc_trace_imc_cpu_offline()
1454 spin_lock(&imc_global_refc.lock); in trace_imc_event_init()
1455 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_TRACE) { in trace_imc_event_init()
1460 imc_global_refc.id = IMC_DOMAIN_TRACE; in trace_imc_event_init()
1461 imc_global_refc.refc++; in trace_imc_event_init()
1463 spin_unlock(&imc_global_refc.lock); in trace_imc_event_init()
1466 spin_unlock(&imc_global_refc.lock); in trace_imc_event_init()