[RTEMS Project] #2369: [PowerPC Book E] Invalid mftb instruction in _CPU_Counter_read()

RTEMS trac trac at rtems.org
Wed Jul 15 08:39:13 UTC 2015


#2369: [PowerPC Book E] Invalid mftb instruction in _CPU_Counter_read()
--------------------------+--------------------------------------------
 Reporter:  nick.withers  |       Owner:  Nick Withers <nick.withers@…>
     Type:  defect        |      Status:  closed
 Priority:  normal        |   Milestone:  4.11.1
Component:  General       |     Version:  4.11
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |
--------------------------+--------------------------------------------

Comment (by sebastian.huber):

 Replying to [comment:16 nick.withers]:
 > Replying to [comment:15 sebastian.huber]:
 > > Replying to [comment:14 nick.withers]:
 > > > Replying to [comment:12 sebastian.huber]:
 [...]
 > > The use case for the _CPU_Counter_read() is to measure short time
 intervals for the SMP lock profiling and short delay loops for device
 drivers.  Do you really want to busy wait for 123 seconds?
 >
 > Do you really want to busy wait 123 seconds instead of the intended
 short time interval because you lost the race and the lower 32 bits of the
 counter wrapped?

 The rtems_counter_delay_ticks() doesn't have this problem. I just may not
 account for the interrupted time if this time is in the range of one time
 base period.

--
Ticket URL: <http://devel.rtems.org/ticket/2369#comment:17>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list