From: Mika Westerberg <mika.westerberg@iki.fi>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Rafal Prylowski <prylowski@metasoft.pl>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"vinod.koul@intel.com" <vinod.koul@intel.com>,
"rmallon@gmail.com" <rmallon@gmail.com>
Subject: Re: [PATCH] ep93xx: Implement double buffering for M2M DMA channels
Date: Sun, 1 Apr 2012 21:49:13 +0300 [thread overview]
Message-ID: <20120401184913.GJ5812@mwesterb-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F002069702575E@AUSP01VMBX24.collaborationhost.net>
On Thu, Mar 29, 2012 at 05:33:49PM -0500, H Hartley Sweeten wrote:
> I tried doing a bit more debugging with the handle_one_vic function. It
> appears that the timer tick is what's causing the spi dma interrupts grief.
> I'm just not sure how it's happening or how to fix it...
>
> I modified handle_one_vic to output a message when multiple interrupts
> are detected in the stat. Then, if multiple interrupts were detected, to output
> a message with the new calculated stat and the actual stat. These "should"
> occur one right after the other when multiple interrupts are detected. But
> that's not what I'm getting. Here's a sample trace with comments:
>
> handle_one_vic: stat:0x00060000 - handling irq:17 now
> stat shows interrupts 17 and 18
> handle_one_vic: stat:0x00040010 - handling irq:4 now
> stat shows interrupts 4 and 18, 17 was handled
> handle_one_vic: next stat:0x00040000 - actual stat:0x00040000
> next stat shows interrupt 18, 4 was handled, 18 is pending
> handle_one_vic: stat:0x00040000 - handling irq:18 now
> stat shows interrupt 18
> handle_one_vic: next stat:0x00000000 - actual stat:0x00000010
> next stat shows no interrupts, 18 was handled, 4 is pending
> handle_one_vic: next stat:0x00040000 - actual stat:0x00000000
> next stat shows interrupt 18, it was already handled, none are pending
> handle_one_vic: stat:0x00040000 - handling irq:18 now
> stat shows interrupt 18 (which was already handled)
> dma dma1chan1: spurious interrupt: status=00002180
> bang... spurious interrupt
>
> It looks like the timer interrupt (4) is causing vic_handle_irq to start
> iterating over the VIC's while an iteration is already in progress. One
> of the iterations is handling interrupt 18 correctly but, since the stat
> is only read once, the second iteration also tries to handle it.
>
> Any ideas?
Unfortunately no :-/ I've been investigating this also and so far haven't
found anything which could explain this behaviour. It is good that you found
that the timer interrupt might have something to do with this. I'm going to
add some more debugging code and see if that helps to identify the reason for
this.
It might also be that the ep93xx_dma driver is doing something wrong in its
interrupt handler which causes the DONE bit to stay asserted even though the
first thing it does is to write 0 to M2M_INTERRUPT register which is supposed
to clear the interrupt..
next prev parent reply other threads:[~2012-04-01 18:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 8:09 Rafal Prylowski
2012-03-21 7:07 ` Mika Westerberg
2012-03-21 7:47 ` Rafal Prylowski
2012-03-21 19:33 ` Mika Westerberg
2012-03-21 17:12 ` H Hartley Sweeten
2012-03-21 19:32 ` Mika Westerberg
2012-03-22 0:47 ` H Hartley Sweeten
2012-03-22 7:37 ` Mika Westerberg
2012-03-22 18:52 ` H Hartley Sweeten
2012-03-22 20:03 ` Mika Westerberg
2012-03-22 21:36 ` H Hartley Sweeten
2012-03-22 23:56 ` H Hartley Sweeten
2012-03-23 7:00 ` Mika Westerberg
2012-03-22 10:16 ` Rafal Prylowski
2012-03-21 19:38 ` Mika Westerberg
2012-03-23 2:19 ` H Hartley Sweeten
2012-03-23 7:04 ` Mika Westerberg
2012-03-23 16:09 ` H Hartley Sweeten
2012-03-24 7:32 ` Mika Westerberg
2012-03-26 6:44 ` Rafal Prylowski
2012-03-29 22:33 ` H Hartley Sweeten
2012-04-01 18:49 ` Mika Westerberg [this message]
2012-04-10 17:28 ` Mika Westerberg
2012-04-10 17:55 ` H Hartley Sweeten
2012-04-11 7:18 ` Rafal Prylowski
2012-04-16 18:59 ` H Hartley Sweeten
2012-04-17 7:15 ` Rafal Prylowski
2012-04-17 15:46 ` H Hartley Sweeten
2012-04-17 20:51 ` H Hartley Sweeten
2012-04-18 16:41 ` Rafal Prylowski
2012-04-18 17:01 ` H Hartley Sweeten
2012-03-22 0:57 ` Ryan Mallon
2012-03-22 10:00 ` Rafal Prylowski
2012-03-22 13:14 ` Sergei Shtylyov
2012-03-22 14:13 ` Rafal Prylowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120401184913.GJ5812@mwesterb-mobl.ger.corp.intel.com \
--to=mika.westerberg@iki.fi \
--cc=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prylowski@metasoft.pl \
--cc=rmallon@gmail.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®