summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/apicvar.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-08-14 21:05:08 +0000
committerjhb <jhb@FreeBSD.org>2009-08-14 21:05:08 +0000
commitd51166f15e1c08fdaa3df0992553ad5127da220c (patch)
tree1e489c7e0c2d17d61d5e2834cc3640b7fd564688 /sys/amd64/include/apicvar.h
parent0bf7e62afcd04d831d3e938d18021d02451fd181 (diff)
downloadFreeBSD-src-d51166f15e1c08fdaa3df0992553ad5127da220c.zip
FreeBSD-src-d51166f15e1c08fdaa3df0992553ad5127da220c.tar.gz
Adjust the handling of the local APIC PMC interrupt vector:
- Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs. Reported by: rnoland Reviewed by: jkoshy Approved by: re (kib) MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/include/apicvar.h')
-rw-r--r--sys/amd64/include/apicvar.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/amd64/include/apicvar.h b/sys/amd64/include/apicvar.h
index 73fff6c..9d6d538 100644
--- a/sys/amd64/include/apicvar.h
+++ b/sys/amd64/include/apicvar.h
@@ -201,7 +201,9 @@ int ioapic_set_triggermode(void *cookie, u_int pin,
int ioapic_set_smi(void *cookie, u_int pin);
void lapic_create(u_int apic_id, int boot_cpu);
void lapic_disable(void);
+void lapic_disable_pmc(void);
void lapic_dump(const char *str);
+int lapic_enable_pmc(void);
void lapic_eoi(void);
u_int lapic_error(void);
int lapic_id(void);
@@ -212,6 +214,7 @@ void lapic_ipi_vectored(u_int vector, int dest);
int lapic_ipi_wait(int delay);
void lapic_handle_intr(int vector, struct trapframe *frame);
void lapic_handle_timer(struct trapframe *frame);
+void lapic_reenable_pmc(void);
void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id);
int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked);
int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode);
OpenPOWER on IntegriCloud