[PATCH v3 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks

Paul Walmsley paul at pwsan.com
Mon Sep 28 09:35:51 PDT 2015


On Thu, 24 Sep 2015, Lokesh Vutla wrote:

> On Thursday 27 August 2015 09:51 AM, Lokesh Vutla wrote:
> > On Thursday 23 July 2015 06:55 PM, Lokesh Vutla wrote:
> >> This series implements lock and unlock functions for RTC and hooks
> >> the same to DRA7 and AMx3xx hwmod.
> >> This is dependent on the patch https://patchwork.kernel.org/patch/6578281/,
> >> which is queued recently by Paul.
> > Gentle ping on this series.
> Do you have any comments on this series?

Looks pretty good.  I'm slightly concerned about the latency jitter impact 
on -rt kernels for that local_irq_disable() section.  Looks like it could 
hold off interrupts for ~(50 udelay µs) + 50*((RTC register read time) + 
1).  But I'm not sure if preempt_enable/disable() is a good alternative 
since a bunch of interrupt top halves could conceivably run after the RTC 
goes non-busy and result in the RTC not being locked/unlocked.  

Is there an RTC IP block register that the code can read, or a safe 
sequence that the code can execute, after the RTC lock/unlock operation to 
verify that the RTC has successfully been locked or unlocked?  If so then 
it's probably worth converting the local_irq_disable/enable() to 
preempt_disable/enable() and testing that, then retrying the lock/unlock 
if it fails.


- Paul


More information about the linux-arm-kernel mailing list