public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* One question about perf_counter on IA
@ 2009-05-27  7:17 Yong Wang
  2009-05-27 14:46 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Yong Wang @ 2009-05-27  7:17 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar; +Cc: linux-kernel

I noticed that the LVT error register is masked and then unmasked during
perf_counter initialization on IA in arch/x86/kernel/cpu/perf_counter.c

void perf_counters_lapic_init(int nmi)
{
	u32 apic_val;

	if (!x86_pmu_initialized())
		return;

	/*
	 * Enable the performance counter vector in the APIC LVT:
	 */
	apic_val = apic_read(APIC_LVTERR);

	apic_write(APIC_LVTERR, apic_val | APIC_LVT_MASKED);
	if (nmi)
		apic_write(APIC_LVTPC, APIC_DM_NMI);
	else
		apic_write(APIC_LVTPC, LOCAL_PERF_VECTOR);
	apic_write(APIC_LVTERR, apic_val);
}

Why is this needed? Is this documented somewhere in the spec? I tried
commenting out the masking and unmasking operations and I did not any
error interrupt generated.

Thanks
-Yong

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-27 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-27  7:17 One question about perf_counter on IA Yong Wang
2009-05-27 14:46 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox