x86: Unmask LVTPC on interrupt
PATCH 1/1 x86: Unmask LVTPC on interrupt
From: Nadav Amit <[email protected]>
According to the SDM: "When a performance monitoring counters interrupt is generated, the mask bit for its associated LVT entry is set."
Unmask LVTPC on each interrupt by reprogramming it. As the old value is known, no need for read-modify-write is needed.
Signed-off-by Nadav Amit <[email protected]>
--- x86/pmu.c | 1 + 1 file changed, 1 insertion(+)
x86/pmu.c +1 -0
@@ -184,6 +184,7 @@ static void start_event(pmu_counter_t *evt)wrmsr (MSR_CORE_PERF_FIXED_CTR_CTRL , ctrl); }global_enable (evt); +apic_write (APIC_LVTPC ,PC_VECTOR ); }static void stop_event (pmu_counter_t *evt)
Signature · 1 line
2.17.1
Quoted 19 lines · On 02/05/19 19:41, [email protected] wrote:
From: Nadav Amit <[email protected]>
According to the SDM: "When a performance monitoring counters interrupt is generated, the mask bit for its associated LVT entry is set."
Unmask LVTPC on each interrupt by reprogramming it. As the old value is known, no need for read-modify-write is needed.
Signed-off-by Nadav Amit <[email protected]>--- x86/pmu.c | 1 + 1 file changed, 1 insertion(+)x86/pmu.c +0
-0
x86/pmu.c static void start_event(pmu_counter_t *evt) · line 190
Quoted 7 lines
x86/pmu.c +1
-0@@ -184,6 +184,7 @@ static void start_event(pmu_counter_t *evt)wrmsr (MSR_CORE_PERF_FIXED_CTR_CTRL , ctrl); }global_enable (evt); +apic_write (APIC_LVTPC ,PC_VECTOR ); }static void stop_event (pmu_counter_t *evt)
Queued, thanks.
Paolo