* [dmaengine] [Q] jiffies value does not increase in dma_sync_wait()
@ 2012-02-03 8:37 javier Martin
2012-02-03 9:10 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: javier Martin @ 2012-02-03 8:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I have a Visstrim_M10 board, based on i.MX27, and I'm developing a
v4l2 driver for deinterlacing video frames.
Whenever I start a new dma transfer I call the function
"dma_wait_for_async_tx()" which internally ends up calling
"dma_sync_wait()":
http://lxr.linux.no/#linux+v3.2.2/drivers/dma/dmaengine.c#L255
In this function, there is a "do while" loop, which checks for dma
completion, with a timeout. However, when the system is too loaded
this function enters this "do while" loop and never gets out of it,
blocking the system.
I've introduced a couple of printk() to check why this timeout is not
triggered and I've found that the value of jiffies does not increase
between loop iterations (i. e. it's like time didn't advance).
Does anyobody know what reasons could make jiffies not being updated?
Regards.
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dmaengine] [Q] jiffies value does not increase in dma_sync_wait()
2012-02-03 8:37 [dmaengine] [Q] jiffies value does not increase in dma_sync_wait() javier Martin
@ 2012-02-03 9:10 ` Russell King - ARM Linux
2012-02-03 9:22 ` javier Martin
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2012-02-03 9:10 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 03, 2012 at 09:37:48AM +0100, javier Martin wrote:
> I've introduced a couple of printk() to check why this timeout is not
> triggered and I've found that the value of jiffies does not increase
> between loop iterations (i. e. it's like time didn't advance).
>
> Does anyobody know what reasons could make jiffies not being updated?
Are interrupts disabled?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dmaengine] [Q] jiffies value does not increase in dma_sync_wait()
2012-02-03 9:10 ` Russell King - ARM Linux
@ 2012-02-03 9:22 ` javier Martin
2012-02-03 9:24 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: javier Martin @ 2012-02-03 9:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell,
On 3 February 2012 10:10, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Feb 03, 2012 at 09:37:48AM +0100, javier Martin wrote:
>> I've introduced a couple of printk() to check why this timeout is not
>> triggered and I've found that the value of jiffies does not increase
>> between loop iterations (i. e. it's like time didn't advance).
>>
>> Does anyobody know what reasons could make jiffies not being updated?
>
> Are interrupts disabled?
Apparently not but, how could I check it for sure? Is
"irqs_disabled()" suitable for that purpose?
http://lxr.linux.no/#linux+v3.2.2/include/linux/irqflags.h#L120
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dmaengine] [Q] jiffies value does not increase in dma_sync_wait()
2012-02-03 9:22 ` javier Martin
@ 2012-02-03 9:24 ` Russell King - ARM Linux
2012-02-03 9:43 ` javier Martin
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2012-02-03 9:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Feb 03, 2012 at 10:22:00AM +0100, javier Martin wrote:
> Hi Russell,
>
> On 3 February 2012 10:10, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Fri, Feb 03, 2012 at 09:37:48AM +0100, javier Martin wrote:
> >> I've introduced a couple of printk() to check why this timeout is not
> >> triggered and I've found that the value of jiffies does not increase
> >> between loop iterations (i. e. it's like time didn't advance).
> >>
> >> Does anyobody know what reasons could make jiffies not being updated?
> >
> > Are interrupts disabled?
>
> Apparently not but, how could I check it for sure? Is
> "irqs_disabled()" suitable for that purpose?
Yes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dmaengine] [Q] jiffies value does not increase in dma_sync_wait()
2012-02-03 9:24 ` Russell King - ARM Linux
@ 2012-02-03 9:43 ` javier Martin
0 siblings, 0 replies; 5+ messages in thread
From: javier Martin @ 2012-02-03 9:43 UTC (permalink / raw)
To: linux-arm-kernel
On 3 February 2012 10:24, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Feb 03, 2012 at 10:22:00AM +0100, javier Martin wrote:
>> Hi Russell,
>>
>> On 3 February 2012 10:10, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>> > On Fri, Feb 03, 2012 at 09:37:48AM +0100, javier Martin wrote:
>> >> I've introduced a couple of printk() to check why this timeout is not
>> >> triggered and I've found that the value of jiffies does not increase
>> >> between loop iterations (i. e. it's like time didn't advance).
>> >>
>> >> Does anyobody know what reasons could make jiffies not being updated?
>> >
>> > Are interrupts disabled?
>>
>> Apparently not but, how could I check it for sure? Is
>> "irqs_disabled()" suitable for that purpose?
>
> Yes.
"irqs_disabled()" returns 0 in every iteration of the loop. So I guess
this means IRQs are properly enabled, but jiffies keeps being fixed.
--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-03 9:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 8:37 [dmaengine] [Q] jiffies value does not increase in dma_sync_wait() javier Martin
2012-02-03 9:10 ` Russell King - ARM Linux
2012-02-03 9:22 ` javier Martin
2012-02-03 9:24 ` Russell King - ARM Linux
2012-02-03 9:43 ` javier Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).