#1375 closed defect (fixed)

uC5282 BSP rtems_cpu_usage_report/bsp_clock_nanoseconds_since_last_tick reports negative times

Reported by: strauman Owned by: Joel Sherrill
Priority: normal Milestone: 4.9
Component: bsps Version: 4.9
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The clock driver routine (uC5282 BSP)
'bsp_clock_nanoseconds_since_last_tick()'
is wrong. It computes the time as if the
programmable high-resolution timer (PIT)
was counting up but it is in fact counting
down.

As a consequence, the CPU usage reported
by rtems_cpu_usage_report() is screwed up
on the uC5282 platform.

The attached patch fixes this and also
explains a few details...

Attachments (2)

rtems-uC5282-ns_clock.diff (2.7 KB) - added by strauman on Feb 12, 2009 at 10:05:55 PM.
proposed fix
pr1375.diff (2.7 KB) - added by Joel Sherrill on Mar 2, 2009 at 6:06:11 PM.
Patch to 4.9 and newer

Download all attachments as: .zip

Change History (4)

Changed on Feb 12, 2009 at 10:05:55 PM by strauman

Attachment: rtems-uC5282-ns_clock.diff added

proposed fix

Changed on Mar 2, 2009 at 6:06:11 PM by Joel Sherrill

Attachment: pr1375.diff added

Patch to 4.9 and newer

comment:1 Changed on Mar 2, 2009 at 6:06:11 PM by Joel Sherrill

attachments.isobsolete: 01

comment:2 Changed on Mar 2, 2009 at 6:06:24 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Applied to 4.9 and head

Note: See TracTickets for help on using tickets.