linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirqus@gmail.com>
To: Daniel Mack <daniel@caiaq.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
	Dan Williams <dan.j.williams@intel.com>,
	Volker Ernst <volker.ernst@txtr.com>,
	Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH 2/3] ARM: MXC: mxcmmc: Teach the driver SDIO operations
Date: Wed, 31 Mar 2010 18:41:36 +0200	[thread overview]
Message-ID: <m2ke2d7436a1003310941t18aeab59qb41f96bc58618960@mail.gmail.com> (raw)
In-Reply-To: <20100331132946.GH30807@buzzloop.caiaq.de>

2010/3/31 Daniel Mack <daniel@caiaq.de>:
> On Wed, Mar 31, 2010 at 03:03:39PM +0200, Sascha Hauer wrote:
>> On Tue, Mar 30, 2010 at 08:32:00PM +0200, Daniel Mack wrote:
>> > +static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
>> > +{
>> > +   struct mxcmci_host *host = mmc_priv(mmc);
>> > +   unsigned long flags;
>> > +   u32 int_cntr;
>> > +
>> > +   spin_lock_irqsave(&host->lock, flags);
>> > +   host->use_sdio = enable;
>> > +   int_cntr = readl(host->base + MMC_REG_INT_CNTR);
>> > +
>> > +   if (enable)
>> > +           int_cntr |= INT_SDIO_IRQ_EN;
>> > +   else
>> > +           int_cntr &= ~INT_SDIO_IRQ_EN;
>> > +
>> > +   writel(int_cntr, host->base + MMC_REG_INT_CNTR);
>> > +   spin_unlock_irqrestore(&host->lock, flags);
>>
>> The other places where MMC_REG_INT_CNTR is touched should be protected
>> by this spinlock aswell.
> Hmm, all other place don't do a read/modify/write cycle, so I'd say the
> don't need protection?

If you miss spinlocks around the unconditional writes they might
happen between your readl() and writel().

Best Regards,
Michał Mirosław

  reply	other threads:[~2010-03-31 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 18:31 [PATCH 1/3] ARM: MXC: mxcmmc: misc cleanups Daniel Mack
2010-03-30 18:32 ` [PATCH 2/3] ARM: MXC: mxcmmc: Teach the driver SDIO operations Daniel Mack
2010-03-31 13:03   ` Sascha Hauer
2010-03-31 13:29     ` Daniel Mack
2010-03-31 16:41       ` Michał Mirosław [this message]
2010-03-30 18:32 ` [PATCH 3/3] ARM: MXC: mxcmmc: work around a bug in the SDHC busy line handling Daniel Mack
2010-03-31 12:38 ` [PATCH 1/3] ARM: MXC: mxcmmc: misc cleanups Sascha Hauer
2010-03-31 13:02   ` Daniel Mack

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=m2ke2d7436a1003310941t18aeab59qb41f96bc58618960@mail.gmail.com \
    --to=mirqus@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@caiaq.de \
    --cc=jkosina@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=volker.ernst@txtr.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;
as well as URLs for NNTP newsgroup(s).