On Tue, 2 Jun 2015, Carsten Emde wrote: > static void __iomem *tcaddr; > +static cycle_t (*do_sched_clock_get_cycles)(struct clocksource *cs); what's that for? Indirection for indirection sake? > static cycle_t tc_get_cycles(struct clocksource *cs) > { > @@ -61,6 +63,13 @@ static cycle_t tc_get_cycles32(struct cl > return __raw_readl(tcaddr + ATMEL_TC_REG(0, CV)); > } > > +u64 sched_clock_get_cycles(void) Static? > +{ > + struct clocksource *cs = NULL; > + > + return (u64) do_sched_clock_get_cycles(cs); What's wrong with implementing this like: static u64 sched_clock_get_cycles(void) { return tc_get_cycles(NULL); } Hmm? > @@ -273,6 +282,7 @@ static int __init tcb_clksrc_init(void) > int clk32k_divisor_idx = -1; > int i; > int ret; > + unsigned long flags; > > tc = atmel_tc_alloc(CONFIG_ATMEL_TCB_CLKSRC_BLOCK); > if (!tc) { > @@ -339,6 +349,11 @@ static int __init tcb_clksrc_init(void) > if (ret) > goto err_disable_t1; > > + do_sched_clock_get_cycles = clksrc.read; Sigh. > + local_irq_save(flags); What's the purpose of this? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html