[Letux-kernel] jz4730-i2c - clocksource

Paul Boddie paul at boddie.org.uk
Sat Mar 6 16:55:52 CET 2021


On Saturday, 6 March 2021 16:04:50 CET H. Nikolaus Schaller wrote:
> Hi Paul,
> seems as if I can now also boot with clocksource=ingenic-timer without
> problems.
> 
> So avoiding regmap and using at least 26 bits (I also want to check 32 bit
> again) makes it work.

Interesting to know that the counter width was an issue.

> BTW: there is one more fix: I am resetting the Underrun flag in the
> interrupt handler. Maybe this prevents that the IRQ stays activated or is
> still active immediately if a new timer request is written. But I have not
> checked if this is really needed.

I think that resetting the flag is just standard practice. Whether it is 
technically necessary I wouldn't know without testing: it would depend on the 
nature of the hardware, I suppose.

[...]

> This seems to be a new research project:
> a) what is the futex doing in sysbench (where is it hidden)?

I guess that somewhere in a library - maybe the C library - there is some 
concurrency handling that requires it.

> b) how is futex implemented on jz4730?

A brief look at arch/mips/include/asm/futex.h indicates that the LL/SC 
(https://en.wikipedia.org/wiki/Load-link/store-conditional) instruction is 
required for futex support. I am not sure this is provided on the JZ4730 or 
even on other early XBurst1 CPUs.

> c) why does it block that long?
> 
> Maybe this is also the reason why X11 is that slow.

If that is the cause then I guess it could also be the explanation.

Paul




More information about the Letux-kernel mailing list