Re: Timer corruption when debugging

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

 



On Wed, 27 Apr 2016, John Syne wrote:

> I’m attempting to add DMA support to the ti_am335x_adc driver but when
> running the Lauterback debugger, I get strange timer corruption and the
> kernel completely loops forever in include/linux/math64.h and takes the
> “bhi” branch below and never gets to C00BB2A0.

> So here is what I see after single stepping and running and stopping several
> times. As you can see, the timer is negative and this is causing a lockup. I
> have seen the same occur with timekeeping_get_ns where delta is negative (
> tkr->cycle_last occurs after cycle_now) . Seems like a race condition. Does

It's not a race condition. By stopping the kernel you make the clocksource
wrap around resulting in a negative delta.

> anyone have any idea as to why this would be happening, or alternatively,
> how can I just cleanup this up when I get a negative value. I tried setting
> tkr->cycle_last = cycle_now, but that didn’t work.

Enabling CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE should fix that issue.

Thanks,

	tglx

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux