linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"chris@zankel.net" <chris@zankel.net>,
	"cmetcalf@tilera.com" <cmetcalf@tilera.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"deller@gmx.de" <deller@gmx.de>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"jcmvbkbc@gmail.com" <jcmvbkbc@gmail.com>,
	"jesper.nilsson@axis.com" <jesper.nilsson@axis.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"monstr@monstr.eu" <monstr@monstr.eu>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"sam@ravnborg.org" <sam@ravnborg.org>,
	"schwidefsky@de.ibm.com" <schwidefsk>
Subject: Re: [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors
Date: Thu, 25 Sep 2014 17:07:47 +0200	[thread overview]
Message-ID: <3361270.4SkjDs5lox@wuerfel> (raw)
In-Reply-To: <20140925145538.GN20043@arm.com>

On Thursday 25 September 2014 15:55:38 Will Deacon wrote:
> On Thu, Sep 25, 2014 at 02:15:10PM +0100, Arnd Bergmann wrote:
> > On Wednesday 24 September 2014 18:17:19 Will Deacon wrote:
> > > This is version three of the series I've originally posted here:
> > > 
> > >   v1: https://lkml.org/lkml/2014/4/17/269
> > >   v2: https://lkml.org/lkml/2014/5/22/468
> > > 
> > > This is basically just a rebase on top of 3.17-rc6, minus the alpha patch
> > > (which was merged into mainline).
> > > 
> > > I looked at reworking the non-relaxed accessors to imply mmiowb, but it
> > > quickly got messy as some architectures (e.g. mips) deliberately keep
> > > mmiowb and readX/writeX separate whilst others (e.g. powerpc) don't trust
> > > drivers to get mmiowb correct, so add barriers to both. Given that
> > > arm/arm64/x86 don't care about mmiowb, I've left that as an exercise for
> > > an architecture that does care.
> > > 
> > > In order to get this lot merged, we probably want to merge the asm-generic
> > > patch (1/17) first, so Acks would be much appreciated on the architecture
> > > bits.
> > > 
> > > As before, I've included the original cover letter below, as that describes
> > > what I'm trying to do in more detail.
> > > 
> > 
> > I've now applied the parts of your series that are required to have
> > every architecture provide all the 'relaxed' accessors to the
> > asm-generic tree, on top of Thierry's series.
> 
> Brill, thanks Arnd! I'll repost what's left during the next cycle, however
> I think you also need to pick the microblaze patch as it includes
> <asm-generic/io.h> before defining its relaxed accessors, so I think
> you'll get a redefinition warning from the preprocessor.

Good point, I'll add that on top then.

> > I had to change your first patch significantly because all the context
> > changed in his patches. See below for the new version. Thierry, can
> > you also confirm that this matches up with the intention of your
> > series? Since that now adds a separate #ifdef for each symbol, I
> > ended up putting the #ifdef for the relaxed version inside of the
> > #ifdef for the non-relaxed version, but it could alternatively
> > be defined outside of it as well.
> 
> I think both work, as I can't find any architectures that define the
> relaxed variants but not the non-relaxed versions.

Actually I just made up my mind about that: Architectures are actually
supposed to provide the non-relaxed versions themselves using inline
assembly, but they don't need to provide the relaxed version.

The current version doesn't let you do that, so I'll keel the #ifdef
sections separate. This also means that I won't apply your patch 17:
we will keep needing the #ifdef to support all three relevant combinations:

a) architectures that provide neither and want to get the defaults
   from asm-generic
b) architectures that provide the non-relaxed versions and want tog
   to get just the relaxed version from asm-generic
c) architectures that provide both

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"chris@zankel.net" <chris@zankel.net>,
	"cmetcalf@tilera.com" <cmetcalf@tilera.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"deller@gmx.de" <deller@gmx.de>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"geert@linux-m68k.org" <geert@linux-m68k.org>,
	"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"jcmvbkbc@gmail.com" <jcmvbkbc@gmail.com>,
	"jesper.nilsson@axis.com" <jesper.nilsson@axis.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"monstr@monstr.eu" <monstr@monstr.eu>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>,
	"sam@ravnborg.org" <sam@ravnborg.org>,
	"schwidefsky@de.ibm.com" <schwidefsky@de.ibm.com>,
	"starvik@axis.com" <starvik@axis.com>,
	"takata@linux-m32r.org" <takata@linux-m32r.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"tony.luck@intel.com" <tony.luck@intel.com>,
	"daniel.thompson@linaro.org" <daniel.thompson@linaro.org>,
	"broonie@linaro.org" <broonie@linaro.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>
Subject: Re: [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors
Date: Thu, 25 Sep 2014 17:07:47 +0200	[thread overview]
Message-ID: <3361270.4SkjDs5lox@wuerfel> (raw)
Message-ID: <20140925150747.0LlYzdWLJ1rhjtlQi_8t_I8soo-COMWWP8_ao3pB6NA@z> (raw)
In-Reply-To: <20140925145538.GN20043@arm.com>

On Thursday 25 September 2014 15:55:38 Will Deacon wrote:
> On Thu, Sep 25, 2014 at 02:15:10PM +0100, Arnd Bergmann wrote:
> > On Wednesday 24 September 2014 18:17:19 Will Deacon wrote:
> > > This is version three of the series I've originally posted here:
> > > 
> > >   v1: https://lkml.org/lkml/2014/4/17/269
> > >   v2: https://lkml.org/lkml/2014/5/22/468
> > > 
> > > This is basically just a rebase on top of 3.17-rc6, minus the alpha patch
> > > (which was merged into mainline).
> > > 
> > > I looked at reworking the non-relaxed accessors to imply mmiowb, but it
> > > quickly got messy as some architectures (e.g. mips) deliberately keep
> > > mmiowb and readX/writeX separate whilst others (e.g. powerpc) don't trust
> > > drivers to get mmiowb correct, so add barriers to both. Given that
> > > arm/arm64/x86 don't care about mmiowb, I've left that as an exercise for
> > > an architecture that does care.
> > > 
> > > In order to get this lot merged, we probably want to merge the asm-generic
> > > patch (1/17) first, so Acks would be much appreciated on the architecture
> > > bits.
> > > 
> > > As before, I've included the original cover letter below, as that describes
> > > what I'm trying to do in more detail.
> > > 
> > 
> > I've now applied the parts of your series that are required to have
> > every architecture provide all the 'relaxed' accessors to the
> > asm-generic tree, on top of Thierry's series.
> 
> Brill, thanks Arnd! I'll repost what's left during the next cycle, however
> I think you also need to pick the microblaze patch as it includes
> <asm-generic/io.h> before defining its relaxed accessors, so I think
> you'll get a redefinition warning from the preprocessor.

Good point, I'll add that on top then.

> > I had to change your first patch significantly because all the context
> > changed in his patches. See below for the new version. Thierry, can
> > you also confirm that this matches up with the intention of your
> > series? Since that now adds a separate #ifdef for each symbol, I
> > ended up putting the #ifdef for the relaxed version inside of the
> > #ifdef for the non-relaxed version, but it could alternatively
> > be defined outside of it as well.
> 
> I think both work, as I can't find any architectures that define the
> relaxed variants but not the non-relaxed versions.

Actually I just made up my mind about that: Architectures are actually
supposed to provide the non-relaxed versions themselves using inline
assembly, but they don't need to provide the relaxed version.

The current version doesn't let you do that, so I'll keel the #ifdef
sections separate. This also means that I won't apply your patch 17:
we will keep needing the #ifdef to support all three relevant combinations:

a) architectures that provide neither and want to get the defaults
   from asm-generic
b) architectures that provide the non-relaxed versions and want tog
   to get just the relaxed version from asm-generic
c) architectures that provide both

	Arnd

  parent reply	other threads:[~2014-09-25 15:07 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 17:17 [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors Will Deacon
2014-09-24 17:17 ` [PATCH v3 01/17] asm-generic: io: implement relaxed accessor macros as conditional wrappers Will Deacon
2014-09-25 10:32   ` Arnd Bergmann
2014-09-25 10:32     ` Arnd Bergmann
2014-09-25 10:38     ` Will Deacon
2014-09-25 10:38       ` Will Deacon
2014-09-25 10:43       ` Arnd Bergmann
2014-09-25 10:43         ` Arnd Bergmann
2014-09-25 11:44         ` Will Deacon
2014-09-25 11:44           ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 02/17] microblaze: io: remove dummy relaxed accessor macros Will Deacon
2014-09-24 17:17 ` [PATCH v3 03/17] s390: io: remove dummy relaxed accessor macros for reads Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 04/17] xtensa: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-25 15:22   ` Max Filippov
2014-09-25 15:22     ` Max Filippov
2014-09-24 17:17 ` [PATCH v3 05/17] frv: io: implement dummy relaxed accessor macros for writes Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 06/17] cris: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 07/17] ia64: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 08/17] m32r: " Will Deacon
2014-09-24 17:17 ` [PATCH v3 09/17] m68k: " Will Deacon
2014-09-25  1:05   ` Greg Ungerer
2014-09-25  9:33     ` Will Deacon
2014-09-25  9:33       ` Will Deacon
2014-09-25  9:51       ` Geert Uytterhoeven
2014-09-25  9:51         ` Geert Uytterhoeven
2014-09-25 10:33         ` Will Deacon
2014-09-25 10:33           ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 10/17] mn10300: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 11/17] parisc: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-25 20:00   ` Helge Deller
2014-09-24 17:17 ` [PATCH v3 12/17] powerpc: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 13/17] sparc: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 14/17] tile: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 15/17] x86: " Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-24 17:17 ` [PATCH v3 16/17] documentation: memory-barriers: clarify relaxed io accessor semantics Will Deacon
2014-09-24 17:17 ` [PATCH v3 17/17] asm-generic: io: define relaxed accessor macros unconditionally Will Deacon
2014-09-24 17:17   ` Will Deacon
2014-09-25 10:42 ` [PATCH v3 00/17] Cross-architecture definitions of relaxed MMIO accessors Arnd Bergmann
2014-09-25 13:15 ` Arnd Bergmann
2014-09-25 13:15   ` Arnd Bergmann
2014-09-25 14:55   ` Will Deacon
2014-09-25 14:55     ` Will Deacon
2014-09-25 15:07     ` Arnd Bergmann [this message]
2014-09-25 15:07       ` Arnd Bergmann
2014-09-25 15:15       ` Arnd Bergmann
2014-09-25 15:15         ` Arnd Bergmann
2014-09-25 15:24         ` Daniel Thompson
2014-09-25 15:24           ` Daniel Thompson
2014-09-25 19:17           ` Arnd Bergmann
2014-09-25 19:17             ` Arnd Bergmann
2014-09-25 20:17             ` Geert Uytterhoeven
2014-09-25 20:17               ` Geert Uytterhoeven
2014-09-26  8:40             ` Russell King - ARM Linux
2014-09-26  8:40               ` Russell King - ARM Linux
2014-09-26  9:28               ` Arnd Bergmann
2014-09-26  9:28                 ` Arnd Bergmann
2014-09-26  8:05         ` Thierry Reding
2014-09-26  8:05           ` Thierry Reding
2014-09-26 13:39           ` Arnd Bergmann
2014-09-26 13:39             ` Arnd Bergmann
2014-09-26 13:46             ` Russell King - ARM Linux
2014-09-26 13:46               ` Russell King - ARM Linux
2014-09-26 21:36               ` Arnd Bergmann
2014-09-26 21:36                 ` Arnd Bergmann
2014-09-29  8:23                 ` Thierry Reding
2014-09-29  8:23                   ` Thierry Reding
2014-09-29  9:50                   ` Arnd Bergmann
2014-09-29  9:50                     ` Arnd Bergmann
2014-10-01 15:23                     ` Thierry Reding
2014-10-01 15:23                       ` Thierry Reding
2014-10-01 18:34                       ` Arnd Bergmann
2014-10-01 18:34                         ` Arnd Bergmann
2014-09-29  9:25                 ` Will Deacon
2014-09-29  9:25                   ` Will Deacon
2014-09-29  9:48                   ` Arnd Bergmann
2014-09-29  9:48                     ` Arnd Bergmann
2014-10-30 16:59   ` Will Deacon
2014-10-30 16:59     ` Will Deacon
2014-10-30 20:04     ` Arnd Bergmann
2014-10-30 20:04       ` Arnd Bergmann
2014-10-31 11:09       ` Thierry Reding
2014-10-31 11:09         ` Thierry Reding

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=3361270.4SkjDs5lox@wuerfel \
    --to=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=chris@zankel.net \
    --cc=cmetcalf@tilera.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jesper.nilsson@axis.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rdunlap@infradead.org \
    --cc=sam@ravnborg.org \
    --cc=will.deacon@arm.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).