[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090527071736.GA26774@ywang-moblin2.bj.intel.com>
Date: Wed, 27 May 2009 15:17:36 +0800
From: Yong Wang <yong.y.wang@...ux.intel.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>
Cc: linux-kernel@...r.kernel.org
Subject: One question about perf_counter on IA
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists