Lines Matching refs:uncore
129 struct amd_uncore *uncore = event_to_amd_uncore(event); in amd_uncore_add() local
133 if (hwc->idx != -1 && uncore->events[hwc->idx] == event) in amd_uncore_add()
136 for (i = 0; i < uncore->num_counters; i++) { in amd_uncore_add()
137 if (uncore->events[i] == event) { in amd_uncore_add()
145 for (i = 0; i < uncore->num_counters; i++) { in amd_uncore_add()
146 if (cmpxchg(&uncore->events[i], NULL, event) == NULL) { in amd_uncore_add()
156 hwc->config_base = uncore->msr_base + (2 * hwc->idx); in amd_uncore_add()
157 hwc->event_base = uncore->msr_base + 1 + (2 * hwc->idx); in amd_uncore_add()
158 hwc->event_base_rdpmc = uncore->rdpmc_base + hwc->idx; in amd_uncore_add()
170 struct amd_uncore *uncore = event_to_amd_uncore(event); in amd_uncore_del() local
175 for (i = 0; i < uncore->num_counters; i++) { in amd_uncore_del()
176 if (cmpxchg(&uncore->events[i], event, NULL) == event) in amd_uncore_del()
210 struct amd_uncore *uncore; in amd_uncore_event_init() local
237 uncore = event_to_amd_uncore(event); in amd_uncore_event_init()
238 if (!uncore) in amd_uncore_event_init()
245 event->cpu = uncore->cpu; in amd_uncore_event_init()
444 struct amd_uncore *uncore; in amd_uncore_cpu_starting() local
447 uncore = *per_cpu_ptr(amd_uncore_nb, cpu); in amd_uncore_cpu_starting()
449 uncore->id = ecx & 0xff; in amd_uncore_cpu_starting()
451 uncore = amd_uncore_find_online_sibling(uncore, amd_uncore_nb); in amd_uncore_cpu_starting()
452 *per_cpu_ptr(amd_uncore_nb, cpu) = uncore; in amd_uncore_cpu_starting()
456 uncore = *per_cpu_ptr(amd_uncore_llc, cpu); in amd_uncore_cpu_starting()
457 uncore->id = get_llc_id(cpu); in amd_uncore_cpu_starting()
459 uncore = amd_uncore_find_online_sibling(uncore, amd_uncore_llc); in amd_uncore_cpu_starting()
460 *per_cpu_ptr(amd_uncore_llc, cpu) = uncore; in amd_uncore_cpu_starting()
468 struct amd_uncore *uncore; in uncore_clean_online() local
471 hlist_for_each_entry_safe(uncore, n, &uncore_unused_list, node) { in uncore_clean_online()
472 hlist_del(&uncore->node); in uncore_clean_online()
473 kfree(uncore); in uncore_clean_online()
480 struct amd_uncore *uncore = *per_cpu_ptr(uncores, cpu); in uncore_online() local
484 if (cpu == uncore->cpu) in uncore_online()
485 cpumask_set_cpu(cpu, uncore->active_mask); in uncore_online()
538 struct amd_uncore *uncore = *per_cpu_ptr(uncores, cpu); in uncore_dead() local
540 if (cpu == uncore->cpu) in uncore_dead()
541 cpumask_clear_cpu(cpu, uncore->active_mask); in uncore_dead()
543 if (!--uncore->refcnt) in uncore_dead()
544 kfree(uncore); in uncore_dead()