summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/clock.h2
-rw-r--r--sys/amd64/include/mptable.h19
-rw-r--r--sys/amd64/include/smp.h4
3 files changed, 13 insertions, 12 deletions
diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h
index f6ed717..140a345 100644
--- a/sys/amd64/include/clock.h
+++ b/sys/amd64/include/clock.h
@@ -16,6 +16,8 @@
*/
extern int adjkerntz;
extern int disable_rtc_set;
+extern int pscnt;
+extern int psdiv;
extern int statclock_disable;
extern u_int timer_freq;
extern int timer0_max_count;
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index 39d10d6..7960c51 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -63,6 +63,7 @@
#include <machine/apic.h>
#include <machine/atomic.h>
+#include <machine/clock.h>
#include <machine/cpu.h>
#include <machine/cpufunc.h>
#include <machine/mpapic.h>
@@ -2603,17 +2604,17 @@ ap_init(void)
* For statclock, we send an IPI to all CPU's to have them call this
* function.
*
- * WARNING! unpend() will call statclock_process() directly and skip this
+ * WARNING! unpend() will call statclock() directly and skip this
* routine.
*/
void
-forwarded_statclock(struct trapframe frame)
+forwarded_statclock(struct clockframe frame)
{
- mtx_lock_spin(&sched_lock);
- statclock_process(curthread->td_kse, TRAPF_PC(&frame),
- TRAPF_USERMODE(&frame));
- mtx_unlock_spin(&sched_lock);
+ if (profprocs != 0)
+ profclock(&frame);
+ if (pscnt == psdiv)
+ statclock(&frame);
}
void
@@ -2642,12 +2643,10 @@ forward_statclock(void)
* routine.
*/
void
-forwarded_hardclock(struct trapframe frame)
+forwarded_hardclock(struct clockframe frame)
{
- mtx_lock_spin(&sched_lock);
- hardclock_process(curthread, TRAPF_USERMODE(&frame));
- mtx_unlock_spin(&sched_lock);
+ hardclock_process(&frame);
}
void
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h
index f2250ff..2f576a2 100644
--- a/sys/amd64/include/smp.h
+++ b/sys/amd64/include/smp.h
@@ -113,9 +113,9 @@ void revoke_apic_irq(int irq);
void bsp_apic_configure(void);
void init_secondary(void);
void forward_statclock(void);
-void forwarded_statclock(struct trapframe frame);
+void forwarded_statclock(struct clockframe frame);
void forward_hardclock(void);
-void forwarded_hardclock(struct trapframe frame);
+void forwarded_hardclock(struct clockframe frame);
void ipi_selected(u_int cpus, u_int ipi);
void ipi_all(u_int ipi);
void ipi_all_but_self(u_int ipi);
OpenPOWER on IntegriCloud