pipeline: Fix conversion of preset gravitiy values
PATCH 1/1 pipeline: Fix conversion of preset gravitiy values
From: Jan Kiszka <[email protected]>
The values in xnclock_gravity are in ticks, not nanoseconds. Make sure nanosecond values are converted before storing them.
This was originally broken by bc761d8cf25c, 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 <[email protected]>
---
The I-pipe part is to be ported to stable as well.
.../arch/arm/dovetail/include/asm/xenomai/calibration.h | 7 ++++--- .../arch/arm64/dovetail/include/asm/xenomai/calibration.h | 7 ++++--- .../arch/x86/dovetail/include/asm/xenomai/calibration.h | 7 ++++--- .../arch/x86/ipipe/include/asm/xenomai/calibration.h | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-)
kernel/cobalt/arch/arm/dovetail/include/asm/xenomai/calibration.h +4 -3
@@ -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 */
kernel/cobalt/arch/arm64/dovetail/include/asm/xenomai/calibration.h +4 -3
@@ -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 */
kernel/cobalt/arch/x86/dovetail/include/asm/xenomai/calibration.h +4 -3
@@ -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 */
kernel/cobalt/arch/x86/ipipe/include/asm/xenomai/calibration.h +4 -3
@@ -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 */
Signature · 1 line
2.31.1