summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/apicvar.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2010-01-15 16:04:30 +0000
committerattilio <attilio@FreeBSD.org>2010-01-15 16:04:30 +0000
commit1a19fc806c79b22b5f74c37f6686ea202cd20a2f (patch)
tree8e172425057929ebbd5b2388a5f0cf7ea738df03 /sys/amd64/include/apicvar.h
parentfdf6718f335578395478ef7ac4837ac7e13700fa (diff)
downloadFreeBSD-src-1a19fc806c79b22b5f74c37f6686ea202cd20a2f.zip
FreeBSD-src-1a19fc806c79b22b5f74c37f6686ea202cd20a2f.tar.gz
Handling all the three clocks (hardclock, softclock, profclock) with the
LAPIC may lead to aliasing for softclock and profclock because frequencies are sized in order to fit mainly hardclock. atrtc used to take care of the softclock and profclock and it does still do, if the LAPIC can't handle the clocks properly. Revert the change when the LAPIC started taking charge of all three of them and let atrtc handle softclock and profclock if not explicitly requested. Such request can be made setting != 0 the new tunable machdep.lapic_allclocks or if the new device ATPIC is not present within the i386 kernel config (atrtc is linked to atpic presence). Diagnosed by: Sandvine Incorporated Reviewed by: jhb, emaste Sponsored by: Sandvine Incorporated MFC: 3 weeks
Diffstat (limited to 'sys/amd64/include/apicvar.h')
-rw-r--r--sys/amd64/include/apicvar.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/amd64/include/apicvar.h b/sys/amd64/include/apicvar.h
index 9d6d538..8f15d84 100644
--- a/sys/amd64/include/apicvar.h
+++ b/sys/amd64/include/apicvar.h
@@ -157,6 +157,12 @@
#define APIC_BUS_PCI 2
#define APIC_BUS_MAX APIC_BUS_PCI
+enum lapic_clock {
+ LAPIC_CLOCK_NONE,
+ LAPIC_CLOCK_HARDCLOCK,
+ LAPIC_CLOCK_ALL
+};
+
/*
* An APIC enumerator is a psuedo bus driver that enumerates APIC's including
* CPU's and I/O APIC's.
@@ -224,7 +230,7 @@ int lapic_set_lvt_triggermode(u_int apic_id, u_int lvt,
enum intr_trigger trigger);
void lapic_set_tpr(u_int vector);
void lapic_setup(int boot);
-int lapic_setup_clock(void);
+enum lapic_clock lapic_setup_clock(void);
#endif /* !LOCORE */
#endif /* _MACHINE_APICVAR_H_ */
OpenPOWER on IntegriCloud