From: Andrew Morton <akpm@linux-foundation.org>
To: Matt Fleming <matt@console-pimps.org>
Cc: Magnus Damm <magnus.damm@gmail.com>,
Yusuke Goda <yusuke.goda.sx@renesas.com>,
linux-mmc@vger.kernel.org, Ian Molton <ian@mnementh.co.uk>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] tmio_mmc: Prevents unexpected status clear
Date: Thu, 26 Aug 2010 15:16:40 -0700 [thread overview]
Message-ID: <20100826151640.04d11be0.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100826221024.GA11300@console-pimps.org>
On Thu, 26 Aug 2010 23:10:24 +0100
Matt Fleming <matt@console-pimps.org> wrote:
> I've stuck my oar in and confused everybody now, it seems.
I've just unconfused myself my dropping the patch ;) Please send new
one(s) when the dust has settled?
The only tmio_mmc patch in my tree at present is
tmio_mmc-dont-clear-unhandled-pending-interrupts:
From: Yusuke Goda <yusuke.goda.sx@renesas.com>
Previously, it was possible for ack_mmc_irqs() to clear pending interrupt
bits in the CTL_STATUS register, even though the interrupt handler had not
been called. This was because of a race that existed when doing a
read-modify-write sequence on CTL_STATUS. After the read step in this
sequence, if an interrupt occurred (causing one of the bits in CTL_STATUS
to be set) the write step would inadvertently clear it.
This patch eliminates this race by only writing to CTL_STATUS and clearing
the interrupts that were passed as an argument to ack_mmc_irqs()."
[matt@console-pimps.org: rewrote changelog]
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Matt Fleming <matt@console-pimps.org>
Cc: Ian Molton <ian@mnementh.co.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mmc/host/tmio_mmc.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff -puN drivers/mmc/host/tmio_mmc.h~tmio_mmc-dont-clear-unhandled-pending-interrupts drivers/mmc/host/tmio_mmc.h
--- a/drivers/mmc/host/tmio_mmc.h~tmio_mmc-dont-clear-unhandled-pending-interrupts
+++ a/drivers/mmc/host/tmio_mmc.h
@@ -82,10 +82,7 @@
#define ack_mmc_irqs(host, i) \
do { \
- u32 mask;\
- mask = sd_ctrl_read32((host), CTL_STATUS); \
- mask &= ~((i) & TMIO_MASK_IRQ); \
- sd_ctrl_write32((host), CTL_STATUS, mask); \
+ sd_ctrl_write32((host), CTL_STATUS, ~(i)); \
} while (0)
_
next prev parent reply other threads:[~2010-08-26 22:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 1:59 [PATCH] tmio_mmc: Prevents unexpected status clear Yusuke Goda
2010-07-08 21:46 ` Andrew Morton
2010-07-13 1:16 ` Yusuke Goda
2010-07-15 20:25 ` Andrew Morton
2010-08-25 22:11 ` Matt Fleming
2010-08-25 23:07 ` Andrew Morton
2010-08-26 0:53 ` Yusuke Goda
2010-08-26 6:53 ` Matt Fleming
2010-08-26 6:58 ` Magnus Damm
2010-08-26 7:26 ` Matt Fleming
2010-08-26 21:12 ` Andrew Morton
2010-08-26 22:10 ` Matt Fleming
2010-08-26 22:16 ` Andrew Morton [this message]
2010-08-26 22:30 ` Matt Fleming
2010-08-27 8:02 ` Magnus Damm
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=20100826151640.04d11be0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ian@mnementh.co.uk \
--cc=lethal@linux-sh.org \
--cc=linux-mmc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=matt@console-pimps.org \
--cc=yusuke.goda.sx@renesas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.