linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dwalker@codeaurora.org (Daniel Walker)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 04/12] arm: mm: cache-l2x0: add l2x0 suspend and resume functions
Date: Fri, 29 Jan 2010 10:29:32 -0800	[thread overview]
Message-ID: <1264789772.1818.8.camel@c-dwalke-linux.qualcomm.com> (raw)
In-Reply-To: <179C5F34D68DF54C8898E904FC5BAF8C79E15B77CD@NALASEXMB09.na.qualcomm.com>

On Fri, 2010-01-29 at 10:23 -0800, Ruan, Willie wrote:
> > From: Daniel Walker [mailto:dwalker at codeaurora.org] 
> > Sent: Friday, January 29, 2010 9:59 AM
> >
> > What if there are multiple cpu's calling cache_sync() at the same time?
> > Disable interrupt wouldn't prevent it ..
> 
> cache_sync() is calling sync_writel(), which is using spin_lock_irqsave().
> So, each call of cache_sync() and sync_writel() is SMP safe individually
> in l2x0_flush_all() as in l2x0_inv_all(), unless we need to protect the
> two calls together, which seems not necessary to me.

This is the current version,

static inline void cache_wait(void __iomem *reg, unsigned long mask)
{
        /* wait for the operation to complete */
        while (readl(reg) & mask)
                ;
}

static inline void cache_sync(void)
{
        void __iomem *base = l2x0_base;
        writel(0, base + L2X0_CACHE_SYNC);
        cache_wait(base + L2X0_CACHE_SYNC, 1);
}

Maybe cache_sync was recently changed to "writel" instead sync_writel()
due it getting called with the lock already held.

Daniel

  reply	other threads:[~2010-01-29 18:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 22:59 [RFC PATCH 04/12] arm: mm: cache-l2x0: add l2x0 suspend and resume functions Daniel Walker
2010-01-29  6:49 ` Pavel Machek
2010-01-29 17:54   ` Ruan, Willie
2010-01-29 11:08 ` [RFC PATCH 04/12] arm: mm: cache-l2x0: add l2x0 suspend and resumefunctions Catalin Marinas
2010-01-29 17:55   ` [RFC PATCH 04/12] arm: mm: cache-l2x0: add l2x0 suspend and resume functions Ruan, Willie
2010-01-29 17:59     ` Daniel Walker
2010-01-29 18:23       ` Ruan, Willie
2010-01-29 18:29         ` Daniel Walker [this message]
2010-01-29 19:03           ` Russell King - ARM Linux
2010-01-29 19:12             ` Daniel Walker
2010-01-29 19:43               ` Russell King - ARM Linux
2010-01-29 20:01                 ` Daniel Walker
2010-01-29 14:14 ` Russell King - ARM Linux
2010-01-29 14:35   ` Daniel Walker

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=1264789772.1818.8.camel@c-dwalke-linux.qualcomm.com \
    --to=dwalker@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).