public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Subject: Re: [PATCH 4/4] DSPBRIDGE: Ensure write posting when acking mailbox irq
Date: Fri, 31 Oct 2008 14:06:55 -0700	[thread overview]
Message-ID: <20081031210654.GF28924@atomide.com> (raw)
In-Reply-To: <1225480873-30835-5-git-send-email-tony@atomide.com>

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

* Tony Lindgren <tony@atomide.com> [081031 12:21]:
> The only way to ensure write posting to L4 bus is to do a read back
> of the same register right after the write.
> 
> This seems to be mostly needed in interrupt handlers to avoid
> causing spurious interrupts.
> 
> The earlier fix has been to mark the L4 bus as strongly ordered
> memory, which solves the problem, but causes performance penalties.
> 
> Similar fixes may be needed in other interrupt handlers too.

Here's this one updated to say "flush posted write" for easy grepping.

Tony

[-- Attachment #2: flush-dspbridge-v2.patch --]
[-- Type: text/x-diff, Size: 1531 bytes --]

>From 0124b6a0f24e3d8a305e61d897a9866903b12485 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Fri, 31 Oct 2008 12:02:57 -0700
Subject: [PATCH] DSPBRIDGE: Flush posted write when acking mailbox irq

The only way to flush posted write to L4 bus is to do a read back
of the same register right after the write.

This seems to be mostly needed in interrupt handlers to avoid
causing spurious interrupts.

The earlier fix has been to mark the L4 bus as strongly ordered
memory, which solves the problem, but causes performance penalties.

Similar fixes may be needed in other interrupt handlers too.

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

diff --git a/drivers/dsp/bridge/hw/hw_mbox.c b/drivers/dsp/bridge/hw/hw_mbox.c
index 7055259..e07e5a7 100644
--- a/drivers/dsp/bridge/hw/hw_mbox.c
+++ b/drivers/dsp/bridge/hw/hw_mbox.c
@@ -251,5 +251,19 @@ HW_STATUS HW_MBOX_EventAck(const u32 baseAddress, const HW_MBOX_Id_t mailBoxId,
 	MLBMAILBOX_IRQSTATUS___0_3WriteRegister32(baseAddress, (u32)userId,
 					     (u32)irqStatusReg);
 
+	/*
+	 * FIXME: Replace all this custom register access with standard
+	 * __raw_read/write().
+	 *
+	 * FIXME: Replace all interrupt handlers with standard linux style
+	 * interrupt handlers.
+	 *
+	 * FIXME: Replace direct access to PRCM registers with omap standard
+	 * PRCM register access.
+	 *
+	 * Flush posted write for the irq status to avoid spurious interrupts.
+	 */
+	MLBMAILBOX_IRQSTATUS___0_3ReadRegister32(baseAddress, (u32)userId);
+
 	return status;
 }

  reply	other threads:[~2008-10-31 21:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31 19:21 [PATCH 0/4] 34xx spurious interrupts unravelling Tony Lindgren
2008-10-31 19:21 ` [PATCH 1/4] Revert "Add MT_MEMORY_SO, mark L3 and L4 to use it" Tony Lindgren
2008-10-31 19:21   ` [PATCH 2/4] ARM: OMAP3: Print debug info on spurious interrupts Tony Lindgren
2008-10-31 19:21     ` [PATCH 3/4] I2C: Ensure write posting for critical i2c-omap writes Tony Lindgren
2008-10-31 19:21       ` [PATCH 4/4] DSPBRIDGE: Ensure write posting when acking mailbox irq Tony Lindgren
2008-10-31 21:06         ` Tony Lindgren [this message]
2008-11-01  3:43         ` Woodruff, Richard
2008-11-02 22:10           ` Tony Lindgren
2008-11-03 18:54             ` Tony Lindgren
2008-10-31 21:03       ` [PATCH 3/4] I2C: Ensure write posting for critical i2c-omap writes Tony Lindgren
2008-10-31 20:55     ` [PATCH 2/4] ARM: OMAP3: Print debug info on spurious interrupts Tony Lindgren
2008-10-31 20:07 ` [PATCH 0/4] 34xx spurious interrupts unravelling David Brownell
2008-10-31 20:35   ` Tony Lindgren
2008-10-31 21:59     ` David Brownell
2008-11-01  4:01       ` Woodruff, Richard
2008-11-01  6:08         ` David Brownell
2008-11-01 12:57           ` Woodruff, Richard
2008-11-01 21:14 ` Felipe Contreras

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=20081031210654.GF28924@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.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