Lines Matching refs:imc_global_refc
51 static struct imc_pmu_ref imc_global_refc = { variable
52 .lock = __MUTEX_INITIALIZER(imc_global_refc.lock),
716 mutex_lock(&imc_global_refc.lock); in ppc_core_imc_cpu_offline()
717 if (imc_global_refc.id == IMC_DOMAIN_CORE) in ppc_core_imc_cpu_offline()
718 imc_global_refc.refc--; in ppc_core_imc_cpu_offline()
720 mutex_unlock(&imc_global_refc.lock); in ppc_core_imc_cpu_offline()
735 mutex_lock(&imc_global_refc.lock); in reset_global_refc()
736 imc_global_refc.refc--; in reset_global_refc()
743 if (imc_global_refc.refc <= 0) { in reset_global_refc()
744 imc_global_refc.refc = 0; in reset_global_refc()
745 imc_global_refc.id = 0; in reset_global_refc()
747 mutex_unlock(&imc_global_refc.lock); in reset_global_refc()
870 mutex_lock(&imc_global_refc.lock); in core_imc_event_init()
871 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_CORE) { in core_imc_event_init()
876 imc_global_refc.id = IMC_DOMAIN_CORE; in core_imc_event_init()
877 imc_global_refc.refc++; in core_imc_event_init()
879 mutex_unlock(&imc_global_refc.lock); in core_imc_event_init()
882 mutex_unlock(&imc_global_refc.lock); in core_imc_event_init()
954 mutex_lock(&imc_global_refc.lock); in ppc_thread_imc_cpu_offline()
955 if (imc_global_refc.id == IMC_DOMAIN_THREAD) in ppc_thread_imc_cpu_offline()
956 imc_global_refc.refc--; in ppc_thread_imc_cpu_offline()
957 mutex_unlock(&imc_global_refc.lock); in ppc_thread_imc_cpu_offline()
997 mutex_lock(&imc_global_refc.lock); in thread_imc_event_init()
1002 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_THREAD) { in thread_imc_event_init()
1003 imc_global_refc.id = IMC_DOMAIN_THREAD; in thread_imc_event_init()
1004 imc_global_refc.refc++; in thread_imc_event_init()
1006 mutex_unlock(&imc_global_refc.lock); in thread_imc_event_init()
1009 mutex_unlock(&imc_global_refc.lock); in thread_imc_event_init()
1242 mutex_lock(&imc_global_refc.lock); in ppc_trace_imc_cpu_offline()
1243 if (imc_global_refc.id == IMC_DOMAIN_TRACE) in ppc_trace_imc_cpu_offline()
1244 imc_global_refc.refc--; in ppc_trace_imc_cpu_offline()
1245 mutex_unlock(&imc_global_refc.lock); in ppc_trace_imc_cpu_offline()
1444 mutex_lock(&imc_global_refc.lock); in trace_imc_event_init()
1445 if (imc_global_refc.id == 0 || imc_global_refc.id == IMC_DOMAIN_TRACE) { in trace_imc_event_init()
1450 imc_global_refc.id = IMC_DOMAIN_TRACE; in trace_imc_event_init()
1451 imc_global_refc.refc++; in trace_imc_event_init()
1453 mutex_unlock(&imc_global_refc.lock); in trace_imc_event_init()
1456 mutex_unlock(&imc_global_refc.lock); in trace_imc_event_init()