RE: hrtimers with ARM architected timer

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

 



Hi,

On 13 July 2017 14:28 Phil Edworthy wrote:
> On 13 July 2017 10:27, Phil Edworthy wrote:
> > On 12 July 2017 18:32, Grygorii Strashko wrote:
> > > On 07/12/2017 08:55 AM, Phil Edworthy wrote:
> > > > Hi,
> > > >
> > > > I'm new to rt-linux, so please forgive me if I ask some dumb questions.
> > > > I have searched for a while, but not found what I am looking for.
> > > >
> > > > I'm trying out the rt-linux patches (v4.9.35) on an out-of-tree
> > > > BSP for a new ARM Cortex A7 device. When I tried cyclictest, it
> > > > complained that I don't have High Resolution timers, so I checked
> > > > and sure enough /proc/timer_list showed the timer resolution is
> > > > 10ms. I've checked my kernel config and I have enabled hrtimers.
> > > >
> > > > This device uses the ARM architected timer
> > (CONFIG_ARM_ARCH_TIMER)
> > > > running at a lowly 6.25MHz.
> > > >
> > > > So, how can I tell if a driver is supposed to support hrtimers?
> > > > If the ARM architected timer driver does support hrtimers, what
> > > > could stop them being used?
> > >
> > >
> > > Most probably you do not have at least one tick_broadcast timer
> enabled.
> > > See:
> > > tick_check_oneshot_change()->tick_is_oneshot_available()
> > Many thanks for the pointer, I didn't know where to start looking.
> > You are right, tick_is_oneshot_available is returning 0 because in
> > tick_broadcast_oneshot_available () the code determines that the timer
> > doesn't have CLOCK_EVT_FEAT_ONESHOT. However, the ARM arch timer
> does
> > enable that feature.
> >
> > So does this mean the ARM arch timer is used for something else, thus
> > I cannot use it for an hrtimer?
> I found that I had to enable another timer on the device and now I've got
> hrtimers!
> If only one of the timers is enabled, no hrtimers.

For posterity, I found out why a system with just the ARM arch timer enabled
reported that hrtimers were not available. The timer had the
CLOCK_EVT_FEAT_C3STOP feature set - this is the default for the driver. If your
system does not stop the timer clock during suspend, you have to add the
"always-on" property to the armv7-timer DT node.

Phil
��.n��������+%������w��{.n�����{�����ǫ���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux