public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Nathan Monson <nmonson@gmail.com>
Cc: Paul Walmsley <paul@pwsan.com>,
	"Woodruff, Richard" <r-woodruff2@ti.com>,
	"linux-omap@vger.kernel.org List" <linux-omap@vger.kernel.org>,
	"TK, Pratheesh Gangadhar" <pratheesh@ti.com>,
	Rick Bronson <rick@efn.org>
Subject: Re: omapfb: help from userspace
Date: Thu, 16 Oct 2008 13:57:43 -0700	[thread overview]
Message-ID: <20081016205743.GS15820@atomide.com> (raw)
In-Reply-To: <e5e6ade50810152349x38b6f5e2oe59780cc2008c837@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

* Nathan Monson <nmonson@gmail.com> [081016 07:52]:
> On Wed, Oct 15, 2008 at 4:57 AM, Paul Walmsley <paul@pwsan.com> wrote:
> > Hi Nathan,
> >
> > could you try Lauri's patch posted here:
> > http://marc.info/?l=linux-omap&m=122407150608770&w=2
> > without the strongly-ordered memory patches?
> 
> This patch works for my DSP test case.
> 
> I receive 10-20 kernel messages per second as follows:
> irq -33, desc: c0414580, depth: 0, count: 0, unhandled: 0
> 
> However, DSP Bridge continues to function normally without errors.

Here's my patch to attempt to fix this issue, could you all give it a
try please? So far it has worked for me, I'd like to hear what Nathan's
dsp test case does!

Basically it's modified patch from Russell, except reading back the
revision register is not enough. Looks like we need to read back the
same register we're writing.

I guess the L3/L4 is finer grained than ARM memory attributes?

Regards,

Tony

[-- Attachment #2: write-posting.patch --]
[-- Type: text/x-diff, Size: 1731 bytes --]

>From e708817b51069acf8a9bce20713243741981bd43 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Thu, 16 Oct 2008 10:52:51 -0700
Subject: [PATCH] ARM: OMAP: Read back the interrupt registers after write to ensure posting

On 34xx interrupts would occasionally get stuck in spurious interrupt
loop. Spurious interrupts are triggered on 34xx if the interrupt mask or
priority registers are changed while the interrupt is asserted, see
"10.5.4 MPU INTC Spurious Interrupt Handling" in the 34xx TRM.

TI's suggestion was to map L3 and L4 as strongly ordered, while Russell's
suggestion was to read back the revision register to ensure posting:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg02904.html

However, looks like reading back INTC_REVISION is not enough with L3 and L4
busses. We need to read back the same register as we're writing to ensure
it gets posted. See also "7.3 Memory attributes" in Cortex-A8 TRM.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 4ffb4f1..facf886 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -64,6 +64,7 @@ static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg)
 static void omap_ack_irq(unsigned int irq)
 {
 	intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL);
+	intc_bank_read_reg(&irq_banks[0], INTC_CONTROL);
 }
 
 static void omap_mask_irq(unsigned int irq)
@@ -73,6 +74,7 @@ static void omap_mask_irq(unsigned int irq)
 	irq &= (IRQ_BITS_PER_REG - 1);
 
 	intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset);
+	intc_bank_read_reg(&irq_banks[0], INTC_MIR_SET0 + offset);
 }
 
 static void omap_unmask_irq(unsigned int irq)

  reply	other threads:[~2008-10-16 20:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 18:36 omapfb: help from userspace Nathan Monson
2008-10-08 20:21 ` Nathan Monson
2008-10-08 20:37   ` Woodruff, Richard
2008-10-09  6:20     ` TK, Pratheesh Gangadhar
2008-10-09 12:43       ` Tony Lindgren
2008-10-09 17:55         ` Nathan Monson
2008-10-15 11:57           ` Paul Walmsley
2008-10-15 12:04             ` Lauri Leukkunen
2008-10-16  6:49             ` Nathan Monson
2008-10-16 20:57               ` Tony Lindgren [this message]
2008-10-16 22:07                 ` Nathan Monson
2008-10-16 22:10                   ` Tony Lindgren
2008-10-16 22:15                     ` Nathan Monson
2008-10-16 22:52                       ` Tony Lindgren
2008-10-16 22:59                         ` Tony Lindgren
2008-10-16 23:02                           ` Tony Lindgren
2008-10-16 23:20                             ` Nathan Monson
2008-10-16 23:24                               ` Tony Lindgren
2008-10-17  0:17   ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-09-15 14:38 Felipe Contreras
2008-09-15 20:24 ` Felipe Contreras
2008-09-15 20:46   ` Måns Rullgård

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=20081016205743.GS15820@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nmonson@gmail.com \
    --cc=paul@pwsan.com \
    --cc=pratheesh@ti.com \
    --cc=r-woodruff2@ti.com \
    --cc=rick@efn.org \
    /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