summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2005-03-02 14:17:43 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2005-03-02 14:17:43 +0000
commitd19788990f704f17dcb219a13131c71a70215a9d (patch)
tree8073c850e927291500ec823e9cea2e1ecf9e561e
parent6675b36ec590d424710c99aba8034de6d8b7f0c5 (diff)
Notes
-rw-r--r--sys/i386/i386/local_apic.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/sys/i386/i386/local_apic.c b/sys/i386/i386/local_apic.c
index debb691f96e8..307764e35acd 100644
--- a/sys/i386/i386/local_apic.c
+++ b/sys/i386/i386/local_apic.c
@@ -66,9 +66,9 @@ CTASSERT(APIC_TIMER_INT < APIC_LOCAL_INTS);
CTASSERT(APIC_LOCAL_INTS == 240);
CTASSERT(IPI_STOP < APIC_SPURIOUS_INT);
-#define LAPIC_TIMER_HZ_DIVIDER 3
-#define LAPIC_TIMER_STATHZ_DIVIDER 23
-#define LAPIC_TIMER_PROFHZ_DIVIDER 2
+#define LAPIC_TIMER_HZ_DIVIDER 2
+#define LAPIC_TIMER_STATHZ_DIVIDER 15
+#define LAPIC_TIMER_PROFHZ_DIVIDER 3
/*
* Support for local APICs. Local APICs manage interrupts on each
@@ -130,8 +130,6 @@ static u_int32_t lapic_timer_divisors[] = {
volatile lapic_t *lapic;
static u_long lapic_timer_divisor, lapic_timer_period, lapic_timer_hz;
-static u_long *lapic_virtual_hardclock, *lapic_virtual_statclock,
- *lapic_virtual_profclock;
static void lapic_enable(void);
static void lapic_timer_enable_intr(void);
@@ -372,9 +370,6 @@ lapic_setup_clock(void)
stathz = lapic_timer_hz / LAPIC_TIMER_STATHZ_DIVIDER;
profhz = lapic_timer_hz / LAPIC_TIMER_PROFHZ_DIVIDER;
lapic_timer_period = value / lapic_timer_hz;
- intrcnt_add("lapic: hardclock", &lapic_virtual_hardclock);
- intrcnt_add("lapic: statclock", &lapic_virtual_statclock);
- intrcnt_add("lapic: profclock", &lapic_virtual_profclock);
/*
* Start up the timer on the BSP. The APs will kick off their
@@ -628,10 +623,9 @@ lapic_handle_timer(struct clockframe frame)
la->la_hard_ticks += hz;
if (la->la_hard_ticks >= lapic_timer_hz) {
la->la_hard_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0) {
- (*lapic_virtual_hardclock)++;
+ if (PCPU_GET(cpuid) == 0)
hardclock(&frame);
- } else
+ else
hardclock_process(&frame);
}
@@ -639,8 +633,6 @@ lapic_handle_timer(struct clockframe frame)
la->la_stat_ticks += stathz;
if (la->la_stat_ticks >= lapic_timer_hz) {
la->la_stat_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0)
- (*lapic_virtual_statclock)++;
statclock(&frame);
}
@@ -648,8 +640,6 @@ lapic_handle_timer(struct clockframe frame)
la->la_prof_ticks += profhz;
if (la->la_prof_ticks >= lapic_timer_hz) {
la->la_prof_ticks -= lapic_timer_hz;
- if (PCPU_GET(cpuid) == 0)
- (*lapic_virtual_profclock)++;
if (profprocs != 0)
profclock(&frame);
}