Commit 9466bfd1 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/clock: drop timer calibration

The calibrated timer setup time is currently accounted for in the
timer gravity triplet (.user, also used as default .irq latency),
exclusively. This forces in a dynamically calculated parameter with no
way to override it. Meanwhile, this value would be already included in
every gravity value which autotune may determine, so this setting is
pretty much redundant.

Drop nktimerlat and the requirement for the machine section to provide
a timer calibration handler, we don't need these.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent d9499c1e
......@@ -104,8 +104,6 @@ struct xnclock_ratelimit_state {
extern struct xnclock nkclock;
extern unsigned long nktimerlat;
int xnclock_register(struct xnclock *clock,
const cpumask_t *affinity);
......
......@@ -24,7 +24,6 @@ struct cobalt_machine {
int (*late_init)(void);
void (*cleanup)(void);
void (*prefault)(struct vm_area_struct *vma);
unsigned long (*calibrate)(void);
const char *const *fault_labels;
};
......@@ -46,11 +45,6 @@ struct cobalt_pipeline {
#endif
};
static inline unsigned long xnarch_timer_calibrate(void)
{
return cobalt_machine.calibrate();
}
int pipeline_init(void);
int pipeline_late_init(void);
......
......@@ -32,7 +32,6 @@
*
* @{
*/
unsigned long nktimerlat;
#ifdef XNARCH_HAVE_NODIV_LLIMD
......@@ -456,8 +455,6 @@ void print_core_clock_status(struct xnclock *clock,
xnvfile_printf(it, "%8s: timer=%s, clock=%s\n",
"devices", pipeline_timer_name(), pipeline_clock_name());
xnvfile_printf(it, "%8s: %s\n", "watchdog", wd_status);
xnvfile_printf(it, "%8s: %Lu\n", "setup",
xnclock_ticks_to_ns(&nkclock, nktimerlat));
}
static int clock_show(struct xnvfile_regular_iterator *it, void *data)
......@@ -784,11 +781,8 @@ static void reset_core_clock_gravity(struct xnclock *clock)
struct xnclock_gravity gravity;
xnarch_get_latencies(&gravity);
gravity.user += nktimerlat;
if (gravity.kernel == 0)
gravity.kernel = gravity.user;
if (gravity.irq == 0)
gravity.irq = nktimerlat;
set_core_clock_gravity(clock, &gravity);
}
......@@ -817,7 +811,6 @@ int __init xnclock_init()
xnarch_init_u32frac(&bln_frac, 1, 1000000000);
#endif
pipeline_init_clock();
nktimerlat = xnarch_timer_calibrate();
xnclock_reset_gravity(&nkclock);
xnclock_register(&nkclock, &xnsched_realtime_cpus);
......
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