linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] ARM: Introduce atomic MMIO modify
Date: Wed, 11 Dec 2013 17:49:43 -0300	[thread overview]
Message-ID: <20131211204942.GF5461@localhost> (raw)
In-Reply-To: <20131210170025.GA4360@n2100.arm.linux.org.uk>

On Tue, Dec 10, 2013 at 05:00:25PM +0000, Russell King - ARM Linux wrote:
> On Tue, Dec 10, 2013 at 04:49:07PM +0000, Mark Brown wrote:
> > On Tue, Dec 10, 2013 at 11:41:35AM -0300, Ezequiel Garcia wrote:
> > 
> > > +void atomic_io_modify_relaxed(void __iomem *reg, u32 mask, u32 set)
> > > +{
> > > +	unsigned long flags;
> > > +	u32 value;
> > > +
> > > +	raw_spin_lock_irqsave(&__io_lock, flags);
> > > +	value = readl_relaxed(reg) & ~mask;
> > > +	value |= (set & mask);
> > > +	writel_relaxed(value, reg);
> > > +	raw_spin_unlock_irqrestore(&__io_lock, flags);
> > > +}
> > > +EXPORT_SYMBOL(atomic_io_modify_relaxed);
> > 
> > This looks quite generic - why is it in architecture specific code?
> 
> because the _relaxed IO operators don't exist on other architectures, and
> there's been some discussion around whether they should with no conclusions
> being reached.

Exactly.

Will? Catalin? Any comments on this?

-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  parent reply	other threads:[~2013-12-11 20:49 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 14:41 [PATCH v5 0/3] Introduce atomic MMIO register modify Ezequiel Garcia
2013-12-10 14:41 ` [PATCH v5 1/3] ARM: Introduce atomic MMIO modify Ezequiel Garcia
2013-12-10 16:49   ` Mark Brown
2013-12-10 17:00     ` Russell King - ARM Linux
2013-12-10 17:09       ` Mark Brown
2013-12-11 20:49       ` Ezequiel Garcia [this message]
2013-12-12 13:58         ` Will Deacon
2013-12-12 14:02           ` Jason Cooper
2013-12-12 14:07             ` Will Deacon
2013-12-12 14:36               ` Jason Cooper
2013-12-12 15:05               ` Ezequiel Garcia
2014-01-02 11:30   ` Russell King - ARM Linux
2014-01-02 14:47     ` Jason Cooper
2014-01-02 14:58       ` Ezequiel Garcia
2014-01-12 14:52         ` Ezequiel Garcia
2014-01-13 13:58           ` Catalin Marinas
2014-01-13 14:02             ` Russell King - ARM Linux
2014-01-13 15:28               ` Will Deacon
2014-01-15 17:15               ` Jason Cooper
2013-12-10 14:41 ` [PATCH v5 2/3] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2013-12-12 13:53   ` Jason Cooper
2013-12-10 14:41 ` [PATCH v5 3/3] watchdog: " Ezequiel Garcia
2013-12-12 13:53   ` Jason Cooper
2013-12-12 13:52 ` [PATCH v5 0/3] Introduce atomic MMIO register modify Jason Cooper
2013-12-12 15:07   ` Ezequiel Garcia

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=20131211204942.GF5461@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --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).