All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/4] ARM: Add atomic_io_modify optimized routines
Date: Wed, 28 Aug 2013 12:39:18 +0100	[thread overview]
Message-ID: <20130828113918.GB58575@MacBook-Pro.local> (raw)
In-Reply-To: <20130828120122.487e6ed6@skate>

On Wed, Aug 28, 2013 at 11:01:22AM +0100, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
> 
> On Wed, 28 Aug 2013 06:49:08 -0300, Ezequiel Garcia wrote:
> 
> > > Is this any different from the generic one introduced in patch 1/4? I
> > > would rather just use the generic definition.
> > 
> > Well, according to Will Deacon (and as documented in the commit log)
> > we can optimize in ARM by using readl_relaxed instead of readl.
> > 
> > Now, I'm sure you now better than me if that results (or not) in any
> > significant optimization.
> > 
> > > Similarly, a generic
> > > atomic_io_modify_relaxed() but guarded with something like
> > > __HAVE_ARCH_RELAXED_IO.
> > > 
> > 
> > No, that's not possible. As far as I understand, there's no guarantee
> > of _relaxed variants to be available architecture-wide.
> 
> I think what Catalin was suggesting is that atomic_io_modify() should
> use readl() and writel() (i.e *not* the relaxed variants), and that a
> separate atomic_io_modify_relaxed() could be added on architectures
> that define __HAVE_ARCH_RELAXED_IO.
> 
> I think you misread Catalin's comment when you say there's no guarantee
> of _relaxed variants to be available architecture-wide, since Catalin
> precisely suggested to guard that with __HAVE_ARCH_RELAXED_IO, which
> indicates that _relaxed variants are available.

Indeed, thanks for the translation ;).

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>,
	Baruch Siach <baruch@tkos.co.il>,
	Will Deacon <Will.Deacon@arm.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH v4 2/4] ARM: Add atomic_io_modify optimized routines
Date: Wed, 28 Aug 2013 12:39:18 +0100	[thread overview]
Message-ID: <20130828113918.GB58575@MacBook-Pro.local> (raw)
In-Reply-To: <20130828120122.487e6ed6@skate>

On Wed, Aug 28, 2013 at 11:01:22AM +0100, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
> 
> On Wed, 28 Aug 2013 06:49:08 -0300, Ezequiel Garcia wrote:
> 
> > > Is this any different from the generic one introduced in patch 1/4? I
> > > would rather just use the generic definition.
> > 
> > Well, according to Will Deacon (and as documented in the commit log)
> > we can optimize in ARM by using readl_relaxed instead of readl.
> > 
> > Now, I'm sure you now better than me if that results (or not) in any
> > significant optimization.
> > 
> > > Similarly, a generic
> > > atomic_io_modify_relaxed() but guarded with something like
> > > __HAVE_ARCH_RELAXED_IO.
> > > 
> > 
> > No, that's not possible. As far as I understand, there's no guarantee
> > of _relaxed variants to be available architecture-wide.
> 
> I think what Catalin was suggesting is that atomic_io_modify() should
> use readl() and writel() (i.e *not* the relaxed variants), and that a
> separate atomic_io_modify_relaxed() could be added on architectures
> that define __HAVE_ARCH_RELAXED_IO.
> 
> I think you misread Catalin's comment when you say there's no guarantee
> of _relaxed variants to be available architecture-wide, since Catalin
> precisely suggested to guard that with __HAVE_ARCH_RELAXED_IO, which
> indicates that _relaxed variants are available.

Indeed, thanks for the translation ;).

-- 
Catalin

  reply	other threads:[~2013-08-28 11:39 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-24 15:35 [PATCH v4 0/4] Introduce atomic MMIO modify Ezequiel Garcia
2013-08-24 15:35 ` Ezequiel Garcia
2013-08-24 15:35 ` [PATCH v4 1/4] lib: " Ezequiel Garcia
2013-08-24 15:35   ` Ezequiel Garcia
2013-08-24 18:27   ` richard -rw- weinberger
2013-08-24 18:27     ` richard -rw- weinberger
2013-08-24 19:58     ` Ezequiel Garcia
2013-08-24 19:58       ` Ezequiel Garcia
2013-08-24 20:35       ` Richard Weinberger
2013-08-24 20:35         ` Richard Weinberger
2013-08-24 20:49         ` Ezequiel Garcia
2013-08-24 20:49           ` Ezequiel Garcia
2013-08-24 20:53           ` Richard Weinberger
2013-08-24 20:53             ` Richard Weinberger
2013-08-24 23:15       ` Russell King - ARM Linux
2013-08-24 23:15         ` Russell King - ARM Linux
2013-08-27 14:37   ` Ezequiel Garcia
2013-08-27 14:37     ` Ezequiel Garcia
2013-08-27 20:37   ` Andrew Morton
2013-08-27 20:37     ` Andrew Morton
2013-08-28 10:24     ` Ezequiel Garcia
2013-08-28 10:24       ` Ezequiel Garcia
2013-08-28 19:33       ` Andrew Morton
2013-08-28 19:33         ` Andrew Morton
2013-08-29  8:03         ` Thomas Petazzoni
2013-08-29  8:03           ` Thomas Petazzoni
2013-08-28 10:37   ` Ezequiel Garcia
2013-08-28 10:37     ` Ezequiel Garcia
2013-08-28 16:16     ` Linus Torvalds
2013-08-28 16:16       ` Linus Torvalds
2013-08-24 15:35 ` [PATCH v4 2/4] ARM: Add atomic_io_modify optimized routines Ezequiel Garcia
2013-08-24 15:35   ` Ezequiel Garcia
2013-08-28  8:53   ` Catalin Marinas
2013-08-28  8:53     ` Catalin Marinas
2013-08-28  9:49     ` Ezequiel Garcia
2013-08-28  9:49       ` Ezequiel Garcia
2013-08-28 10:01       ` Thomas Petazzoni
2013-08-28 10:01         ` Thomas Petazzoni
2013-08-28 11:39         ` Catalin Marinas [this message]
2013-08-28 11:39           ` Catalin Marinas
2013-08-24 15:35 ` [PATCH v4 3/4] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2013-08-24 15:35   ` Ezequiel Garcia
2013-08-24 15:35 ` [PATCH v4 4/4] watchdog: " Ezequiel Garcia
2013-08-24 15:35   ` 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=20130828113918.GB58575@MacBook-Pro.local \
    --to=catalin.marinas@arm.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 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.