19 #ifndef _COBALT_X86_ASM_CALIBRATION_H 20 #define _COBALT_X86_ASM_CALIBRATION_H 22 #include <asm/processor.h> 24 static inline unsigned long __get_bogomips(
void)
26 return this_cpu_read(cpu_info.loops_per_jiffy)/(500000/HZ);
29 static inline void xnarch_get_latencies(
struct xnclock_gravity *p)
31 unsigned long sched_latency;
33 #if CONFIG_XENO_OPT_TIMING_SCHEDLAT != 0 34 sched_latency = CONFIG_XENO_OPT_TIMING_SCHEDLAT;
37 if (strcmp(ipipe_timer_name(),
"lapic") == 0) {
39 if (num_online_cpus() > 1)
46 }
else if (strcmp(ipipe_timer_name(),
"pit")) {
48 if (num_online_cpus() > 1)
56 sched_latency = (__get_bogomips() < 250 ? 17000 :
57 __get_bogomips() < 2500 ? 4200 :
60 sched_latency += 1000;
65 p->user = sched_latency;
66 p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
67 p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;