Commit 747e0fad authored by Jan Kiszka's avatar Jan Kiszka
Browse files

pipeline: Fix conversion of preset gravitiy values

The values in xnclock_gravity are in ticks, not nanoseconds. Make sure
nanosecond values are converted before storing them.

This was originally broken by bc761d8c

, for all architectures except
arm, arm64 and powerpc. During the dovetail port, this also sneaked into
the arm and arm64 headers.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent e1bfe616
......@@ -31,9 +31,10 @@ static inline void xnarch_get_latencies(struct xnclock_gravity *p)
#else
sched_latency = 5000;
#endif
p->user = sched_latency;
p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;
p->user = xnclock_ns_to_ticks(&nkclock, sched_latency);
p->kernel = xnclock_ns_to_ticks(&nkclock,
CONFIG_XENO_OPT_TIMING_KSCHEDLAT);
p->irq = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_IRQLAT);
}
#endif /* !_COBALT_ARM_DOVETAIL_CALIBRATION_H */
......@@ -16,9 +16,10 @@ static inline void xnarch_get_latencies(struct xnclock_gravity *p)
#else
sched_latency = 5000;
#endif
p->user = sched_latency;
p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;
p->user = xnclock_ns_to_ticks(&nkclock, sched_latency);
p->kernel = xnclock_ns_to_ticks(&nkclock,
CONFIG_XENO_OPT_TIMING_KSCHEDLAT);
p->irq = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_IRQLAT);
}
#endif /* !_COBALT_ARM64_DOVETAIL_CALIBRATION_H */
......@@ -29,9 +29,10 @@ static inline void xnarch_get_latencies(struct xnclock_gravity *p)
sched_latency = num_online_cpus() > 1 ? 3350 : 2000;
#endif /* !CONFIG_XENO_OPT_TIMING_SCHEDLAT */
p->user = sched_latency;
p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;
p->user = xnclock_ns_to_ticks(&nkclock, sched_latency);
p->kernel = xnclock_ns_to_ticks(&nkclock,
CONFIG_XENO_OPT_TIMING_KSCHEDLAT);
p->irq = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_IRQLAT);
}
#endif /* !_COBALT_X86_ASM_CALIBRATION_H */
......@@ -62,9 +62,10 @@ static inline void xnarch_get_latencies(struct xnclock_gravity *p)
}
#endif /* !CONFIG_XENO_OPT_TIMING_SCHEDLAT */
p->user = sched_latency;
p->kernel = CONFIG_XENO_OPT_TIMING_KSCHEDLAT;
p->irq = CONFIG_XENO_OPT_TIMING_IRQLAT;
p->user = xnclock_ns_to_ticks(&nkclock, sched_latency);
p->kernel = xnclock_ns_to_ticks(&nkclock,
CONFIG_XENO_OPT_TIMING_KSCHEDLAT);
p->irq = xnclock_ns_to_ticks(&nkclock, CONFIG_XENO_OPT_TIMING_IRQLAT);
}
#endif /* !_COBALT_X86_ASM_CALIBRATION_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment