lkml.org 
[lkml]   [2009]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectOne 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


\
 
 \ /
  Last update: 2009-05-27 09:53    [W:0.036 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site