pai_root
pai_root[idx].mapptr = NULL;
idx, refcount_read(&pai_root[idx].refcnt));
if (!refcount_inc_not_zero(&pai_root[idx].refcnt)) {
pai_root[idx].mapptr = alloc_percpu(struct pai_mapptr);
if (!pai_root[idx].mapptr)
refcount_set(&pai_root[idx].refcnt, 1);
struct pai_mapptr *mp = per_cpu_ptr(pai_root[idx].mapptr, cpu);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
mp = per_cpu_ptr(pai_root[idx].mapptr, cpu);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
struct pai_mapptr *mp = this_cpu_ptr(pai_root[idx].mapptr);
} pai_root[PAI_PMU_MAX];
if (refcount_dec_and_test(&pai_root[idx].refcnt)) {
free_percpu(pai_root[idx].mapptr);