diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2019-06-14 11:50:35 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2019-06-14 11:50:35 +0000 |
| commit | e9cfdcf5824dcbac054caaee8153fb8ccefccd85 (patch) | |
| tree | f4875afe23eedd3db2328a3c5c341a5af5fcc1b2 /sys/dev/tprof | |
| parent | 9f92811faa2075b51342912eb510c4ba9cff0ab6 (diff) | |
Fix compile error (s/LAPIC_PCINT/LAPIC_LVT_PCINT/)
Diffstat (limited to 'sys/dev/tprof')
| -rw-r--r-- | sys/dev/tprof/tprof_x86_amd.c | 10 | ||||
| -rw-r--r-- | sys/dev/tprof/tprof_x86_intel.c | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/tprof/tprof_x86_amd.c b/sys/dev/tprof/tprof_x86_amd.c index 1e4302e1a9f..4264729abf6 100644 --- a/sys/dev/tprof/tprof_x86_amd.c +++ b/sys/dev/tprof/tprof_x86_amd.c @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_x86_amd.c,v 1.3 2019/05/29 17:09:17 maxv Exp $ */ +/* $NetBSD: tprof_x86_amd.c,v 1.4 2019/06/14 11:50:35 msaitoh Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.3 2019/05/29 17:09:17 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tprof_x86_amd.c,v 1.4 2019/06/14 11:50:35 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -135,8 +135,8 @@ tprof_amd_start_cpu(void *arg1, void *arg2) wrmsr(PERFCTR(ctrno), counter_reset_val); wrmsr(PERFEVTSEL(ctrno), pesr); - amd_lapic_saved[cpu_index(ci)] = lapic_readreg(LAPIC_PCINT); - lapic_writereg(LAPIC_PCINT, LAPIC_DLMODE_NMI); + amd_lapic_saved[cpu_index(ci)] = lapic_readreg(LAPIC_LVT_PCINT); + lapic_writereg(LAPIC_LVT_PCINT, LAPIC_DLMODE_NMI); wrmsr(PERFEVTSEL(ctrno), pesr | PESR_EN); } @@ -148,7 +148,7 @@ tprof_amd_stop_cpu(void *arg1, void *arg2) wrmsr(PERFEVTSEL(ctrno), 0); - lapic_writereg(LAPIC_PCINT, amd_lapic_saved[cpu_index(ci)]); + lapic_writereg(LAPIC_LVT_PCINT, amd_lapic_saved[cpu_index(ci)]); } static int diff --git a/sys/dev/tprof/tprof_x86_intel.c b/sys/dev/tprof/tprof_x86_intel.c index dabaf093b31..f94f1ee65b5 100644 --- a/sys/dev/tprof/tprof_x86_intel.c +++ b/sys/dev/tprof/tprof_x86_intel.c @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_x86_intel.c,v 1.2 2018/07/24 09:47:35 maxv Exp $ */ +/* $NetBSD: tprof_x86_intel.c,v 1.3 2019/06/14 11:50:35 msaitoh Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tprof_x86_intel.c,v 1.2 2018/07/24 09:47:35 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tprof_x86_intel.c,v 1.3 2019/06/14 11:50:35 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -119,8 +119,8 @@ tprof_intel_start_cpu(void *arg1, void *arg2) wrmsr(MSR_PERFCTR0, counter_reset_val); wrmsr(MSR_EVNTSEL0, evtval); - intel_lapic_saved[cpu_index(ci)] = lapic_readreg(LAPIC_PCINT); - lapic_writereg(LAPIC_PCINT, LAPIC_DLMODE_NMI); + intel_lapic_saved[cpu_index(ci)] = lapic_readreg(LAPIC_LVT_PCINT); + lapic_writereg(LAPIC_LVT_PCINT, LAPIC_DLMODE_NMI); } static void @@ -131,7 +131,7 @@ tprof_intel_stop_cpu(void *arg1, void *arg2) wrmsr(MSR_EVNTSEL0, 0); wrmsr(MSR_PERFCTR0, 0); - lapic_writereg(LAPIC_PCINT, intel_lapic_saved[cpu_index(ci)]); + lapic_writereg(LAPIC_LVT_PCINT, intel_lapic_saved[cpu_index(ci)]); } static int @@ -162,9 +162,9 @@ tprof_intel_nmi(const struct trapframe *tf, void *dummy) wrmsr(MSR_PERFCTR0, counter_reset_val); /* unmask PMI */ - pcint = lapic_readreg(LAPIC_PCINT); + pcint = lapic_readreg(LAPIC_LVT_PCINT); KASSERT((pcint & LAPIC_LVT_MASKED) != 0); - lapic_writereg(LAPIC_PCINT, pcint & ~LAPIC_LVT_MASKED); + lapic_writereg(LAPIC_LVT_PCINT, pcint & ~LAPIC_LVT_MASKED); return 1; } |
