[PATCH 2/2] Convert PowerPC macro spin_event_timeout() to architecture independent macro

Timur Tabi timur at tabi.org
Thu Aug 1 00:43:18 EDT 2013


Goel Arpit-B44344 wrote:
> PowerPC uses hardware timer registers provided by PowerPC architecture to implement spin_event_timeout(). These registers make
> PowerPC implementation of spin_event_timeout() more granular in comparison to ones using generic USECS_PER_JIFFY framework. This
> would handle those cases more granularly in which evaluation of "condition" is taking time or fails.

LOL, it seems I forgot how my own code works.  Thanks for the reminder. 
  For some reason, I thought the PowerPC version was also using 
'jiffies'.  The concern about using 'jiffies' makes a lot more sense now.

Almost every architecture has a timebase counter.  Wouldn't it make more 
sense to port tb_ticks_per_usec, get_tbl(), and tb_ticks_since() to 
other architectures instead?  I don't think 'jiffies' is granular enough 
for spin_event_timeout().



More information about the linux-arm-kernel mailing list