Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Cortex A9 private timer



Nick Hudson <nick.hudson%gmx.co.uk@localhost> writes:

>> (Cortex A9) because both a9tmr and a9ptmr are enabled. The kernel hangs
>> [...]
>
> Does the attached patch fix things?

Not as is, because we also have to switch cycv_platform to using a9ptmr
instead of a9tmr if we go this route. (I'm currently compiling a release
in order to test this)

> We track mainline Linux DTS so this local change should be reverted.

I'm not against removing this local change if indeed your workaround
also works but your sentence is not valid: sometimes the DTS has missing
pieces or conveys broken information. As you can see we have quite a
handful of such local changes to other DTSs in the same directory.

>> So far, we had a9tmr on Cortex A5/A9 and gtmr on other Cortex. They both
>> call hardclock() and don't collide because no SoC can provide both so
>> only one will attach at runtime.
>>
>> I see that the meson platform mandates the use of a9ptmr_delay, so there
>> is certainly a reason for this support but it breaks other ports and was
>> pulled up to netbsd-9 very quickly... :-/ May I ask for a little
>> explanation?

I think we still need to address the issue of having multiple timers
competing and the question is still open. We probably need to use a
generic way to choose the main timer, now that there are several
possibilities on a given ARM platform.

As you can see in src/sys/external/gpl2/dts/dist/arch/arm/boot/dts
(unaltered DTS from our Linux import):

$ grep -l cortex-a9-global-timer * | xargs grep -l cortex-a9-twd-timer
am4372.dtsi
armada-38x.dtsi
artpec6.dtsi
bcm-hr2.dtsi
bcm-nsp.dtsi
bcm5301x.dtsi
bcm63138.dtsi
berlin2cd.dtsi
hip01.dtsi
meson8.dtsi
owl-s500.dtsi
rk3xxx.dtsi
uniphier-ld4.dtsi
uniphier-pro4.dtsi
uniphier-pro5.dtsi
uniphier-pxs2.dtsi
uniphier-sld8.dtsi
zynq-7000.dtsi
$

From a quick glance, the global timer is "disabled" in meson8.dtsi, but
both timers are enabled e.g. in rk3xxx.dtsi and zynq-7000.dtsi which are
IMHO platforms of interest.

Regards,
 Aymeric


Home | Main Index | Thread Index | Old Index