Re: [PATCH v2 08/25] arch: introduce memremap()

2016-04-21 Thread Luis R. Rodriguez
On Wed, Aug 12, 2015 at 12:13 AM, Dan Williams wrote: > On Tue, Aug 11, 2015 at 3:52 PM, Luis R. Rodriguez wrote: >> On Tue, Aug 11, 2015 at 3:40 PM, Toshi Kani wrote: >>> On Tue, 2015-08-11 at 23:30 +0200, Luis R. Rodriguez wrote: On Wed, Jul 29, 2015 at 06:00:04PM -0600, Toshi Kani wrote:

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-08-11 Thread Dan Williams
On Tue, Aug 11, 2015 at 3:52 PM, Luis R. Rodriguez wrote: > On Tue, Aug 11, 2015 at 3:40 PM, Toshi Kani wrote: >> On Tue, 2015-08-11 at 23:30 +0200, Luis R. Rodriguez wrote: >>> On Wed, Jul 29, 2015 at 06:00:04PM -0600, Toshi Kani wrote: >>> > On Wed, 2015-07-29 at 23:43 +0200, Luis R. Rodriguez

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-08-11 Thread Luis R. Rodriguez
On Tue, Aug 11, 2015 at 3:40 PM, Toshi Kani wrote: > On Tue, 2015-08-11 at 23:30 +0200, Luis R. Rodriguez wrote: >> On Wed, Jul 29, 2015 at 06:00:04PM -0600, Toshi Kani wrote: >> > On Wed, 2015-07-29 at 23:43 +0200, Luis R. Rodriguez wrote: >> > > On Wed, Jul 29, 2015 at 03:00:38PM -0600, Toshi Ka

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-08-11 Thread Toshi Kani
On Tue, 2015-08-11 at 23:30 +0200, Luis R. Rodriguez wrote: > On Wed, Jul 29, 2015 at 06:00:04PM -0600, Toshi Kani wrote: > > On Wed, 2015-07-29 at 23:43 +0200, Luis R. Rodriguez wrote: > > > On Wed, Jul 29, 2015 at 03:00:38PM -0600, Toshi Kani wrote: > > > > On Wed, 2015-07-29 at 11:33 -0700, Dan

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-08-11 Thread Luis R. Rodriguez
On Wed, Jul 29, 2015 at 06:00:04PM -0600, Toshi Kani wrote: > On Wed, 2015-07-29 at 23:43 +0200, Luis R. Rodriguez wrote: > > On Wed, Jul 29, 2015 at 03:00:38PM -0600, Toshi Kani wrote: > > > On Wed, 2015-07-29 at 11:33 -0700, Dan Williams wrote: > > > > On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Ro

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Toshi Kani
On Wed, 2015-07-29 at 23:43 +0200, Luis R. Rodriguez wrote: > On Wed, Jul 29, 2015 at 03:00:38PM -0600, Toshi Kani wrote: > > On Wed, 2015-07-29 at 11:33 -0700, Dan Williams wrote: > > > On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Rodriguez > > > wrote: > > > > On Wed, Jul 29, 2015 at 08:50:04AM +0

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Luis R. Rodriguez
On Wed, Jul 29, 2015 at 02:47:40PM -0700, Dan Williams wrote: > On Wed, Jul 29, 2015 at 2:43 PM, Luis R. Rodriguez wrote: > > While at it, Dan, will / should memremap() support overlapping calls ? > > What is the expectation on behaviour ? > > It will be the same as ioremap(). Each mapping gets

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Luis R. Rodriguez
On Wed, Jul 29, 2015 at 03:00:38PM -0600, Toshi Kani wrote: > On Wed, 2015-07-29 at 11:33 -0700, Dan Williams wrote: > > On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Rodriguez > > wrote: > > > On Wed, Jul 29, 2015 at 08:50:04AM +0200, Christoph Hellwig wrote: > > > > On Mon, Jul 27, 2015 at 04:26:03

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Dan Williams
On Wed, Jul 29, 2015 at 2:43 PM, Luis R. Rodriguez wrote: > While at it, Dan, will / should memremap() support overlapping calls ? > What is the expectation on behaviour ? It will be the same as ioremap(). Each mapping gets its own virtual address and overlapping calls are permitted. The only p

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Toshi Kani
On Wed, 2015-07-29 at 15:00 -0600, Toshi Kani wrote: > On Wed, 2015-07-29 at 11:33 -0700, Dan Williams wrote: > > On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Rodriguez > > wrote: > > > On Wed, Jul 29, 2015 at 08:50:04AM +0200, Christoph Hellwig wrote: > > > > On Mon, Jul 27, 2015 at 04:26:03PM -070

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Toshi Kani
On Wed, 2015-07-29 at 11:33 -0700, Dan Williams wrote: > On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Rodriguez > wrote: > > On Wed, Jul 29, 2015 at 08:50:04AM +0200, Christoph Hellwig wrote: > > > On Mon, Jul 27, 2015 at 04:26:03PM -0700, Dan Williams wrote: > > > > Oh, because all we have at this

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Dan Williams
On Wed, Jul 29, 2015 at 11:27 AM, Luis R. Rodriguez wrote: > On Wed, Jul 29, 2015 at 08:50:04AM +0200, Christoph Hellwig wrote: >> On Mon, Jul 27, 2015 at 04:26:03PM -0700, Dan Williams wrote: >> > Oh, because all we have at this point is ioremap_cache() which >> > silently falls back. It's not u

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-29 Thread Luis R. Rodriguez
On Wed, Jul 29, 2015 at 08:50:04AM +0200, Christoph Hellwig wrote: > On Mon, Jul 27, 2015 at 04:26:03PM -0700, Dan Williams wrote: > > Oh, because all we have at this point is ioremap_cache() which > > silently falls back. It's not until the introduction of > > arch_memremp() where we update the a

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-28 Thread Christoph Hellwig
On Mon, Jul 27, 2015 at 04:26:03PM -0700, Dan Williams wrote: > Oh, because all we have at this point is ioremap_cache() which > silently falls back. It's not until the introduction of > arch_memremp() where we update the arch code to break that behavior. Ok, makes sense. Might be worth to docum

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-27 Thread Dan Williams
On Mon, Jul 27, 2015 at 4:43 PM, Luis R. Rodriguez wrote: > On Mon, Jul 27, 2015 at 04:31:09PM -0700, Dan Williams wrote: >> On Mon, Jul 27, 2015 at 4:17 PM, Luis R. Rodriguez wrote: >> > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: >> >> Existing users of ioremap_cache() are map

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-27 Thread Dan Williams
On Mon, Jul 27, 2015 at 4:17 PM, Luis R. Rodriguez wrote: > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: >> Existing users of ioremap_cache() are mapping memory that is known in >> advance to not have i/o side effects. These users are forced to cast >> away the __iomem annotation

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-27 Thread Luis R. Rodriguez
On Mon, Jul 27, 2015 at 04:31:09PM -0700, Dan Williams wrote: > On Mon, Jul 27, 2015 at 4:17 PM, Luis R. Rodriguez wrote: > > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: > >> Existing users of ioremap_cache() are mapping memory that is known in > >> advance to not have i/o side e

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-27 Thread Dan Williams
On Sun, Jul 26, 2015 at 10:12 PM, Christoph Hellwig wrote: > On Sun, Jul 26, 2015 at 10:49:39AM -0700, Dan Williams wrote: >> On Sun, Jul 26, 2015 at 10:25 AM, Christoph Hellwig wrote: >> > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: >> >> The behavior change to return NULL on a

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-27 Thread Luis R. Rodriguez
On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: > Existing users of ioremap_cache() are mapping memory that is known in > advance to not have i/o side effects. These users are forced to cast > away the __iomem annotation, or otherwise neglect to fix the sparse > errors thrown when de

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-26 Thread Christoph Hellwig
On Sun, Jul 26, 2015 at 10:49:39AM -0700, Dan Williams wrote: > On Sun, Jul 26, 2015 at 10:25 AM, Christoph Hellwig wrote: > > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: > >> The behavior change to return NULL on an unsupported request is reserved > >> for a later patch. > > > >

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-26 Thread Christoph Hellwig
On Sun, Jul 26, 2015 at 10:49:39AM -0700, Dan Williams wrote: > > What's the point of having this MEMREMAP_CACHE alias? > > For developers that are used to seeing ioremap_cache()... Meh. We've got git logs that show clearly what replaced a previous API. Duplicate names for the same API are highl

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-26 Thread Dan Williams
On Sun, Jul 26, 2015 at 10:25 AM, Christoph Hellwig wrote: > On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: >> The behavior change to return NULL on an unsupported request is reserved >> for a later patch. > > Why? This is for drivers like pmem that care about the mapping type. Fo

Re: [PATCH v2 08/25] arch: introduce memremap()

2015-07-26 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 10:38:42PM -0400, Dan Williams wrote: > The behavior change to return NULL on an unsupported request is reserved > for a later patch. Why? > +enum { > + MEMREMAP_WB = 1 << 0, > + MEMREMAP_WT = 1 << 1, > + MEMREMAP_CACHE = MEMREMAP_WB, What's the point of havin

[PATCH v2 08/25] arch: introduce memremap()

2015-07-24 Thread Dan Williams
Existing users of ioremap_cache() are mapping memory that is known in advance to not have i/o side effects. These users are forced to cast away the __iomem annotation, or otherwise neglect to fix the sparse errors thrown when dereferencing pointers to this memory. Provide memremap() as a non __io