From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753910AbbJSQ7g (ORCPT ); Mon, 19 Oct 2015 12:59:36 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:33968 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753529AbbJSQ7a (ORCPT ); Mon, 19 Oct 2015 12:59:30 -0400 MIME-Version: 1.0 In-Reply-To: <20151019160842.GF32054@sirena.org.uk> References: <20151009221537.32203.5867.stgit@dwillia2-desk3.jf.intel.com> <20151009221635.32203.30755.stgit@dwillia2-desk3.jf.intel.com> <20151019152641.GC32054@sirena.org.uk> <20151019160842.GF32054@sirena.org.uk> Date: Mon, 19 Oct 2015 09:59:29 -0700 Message-ID: Subject: Re: [PATCH 11/20] sound, skylake: switch from ioremap_cache to memremap From: Dan Williams To: Mark Brown Cc: Takashi Iwai , Liam Girdwood , Jeeja KP , "linux-arm-kernel@lists.infradead.org" , Jaroslav Kysela , linux-arch@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2015 at 9:08 AM, Mark Brown wrote: > On Mon, Oct 19, 2015 at 05:34:48PM +0200, Takashi Iwai wrote: >> Mark Brown wrote: > >> > On Fri, Oct 09, 2015 at 06:16:36PM -0400, Dan Williams wrote: >> > > In preparation for deprecating ioremap_cache() convert its usage in >> > > skl-nhlt to memremap. > >> > > -void __iomem *skl_nhlt_init(struct device *dev) >> > > +void *skl_nhlt_init(struct device *dev) > >> > Why are we loosing the annotation here? > >> It's the exact purpose of this patchset, as far as I understand. >> memremap() allows the driver accessing the mapped memory just like a >> normal memory unlike ioremap(). > > There's no mention of what the purpose of the conversion is in either > the patch or the cover letter so it's a bit unclear, some confirmation > would be good :( The cover letter linked this article which talked through the motivation: https://lwn.net/Articles/653585/ Essentially an "__iomem" annotation on a cached mapping is inconsistent as __iomem indicates "may have side effects, use special accessors" and cached means "pre-fetching, asynchronous write-backs, and cpu determined i/o sizes are permissible". From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Williams Subject: Re: [PATCH 11/20] sound, skylake: switch from ioremap_cache to memremap Date: Mon, 19 Oct 2015 09:59:29 -0700 Message-ID: References: <20151009221537.32203.5867.stgit@dwillia2-desk3.jf.intel.com> <20151009221635.32203.30755.stgit@dwillia2-desk3.jf.intel.com> <20151019152641.GC32054@sirena.org.uk> <20151019160842.GF32054@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20151019160842.GF32054@sirena.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: Mark Brown Cc: Takashi Iwai , Liam Girdwood , Jeeja KP , "linux-arm-kernel@lists.infradead.org" , Jaroslav Kysela , linux-arch@vger.kernel.org, "linux-kernel@vger.kernel.org" List-Id: linux-arch.vger.kernel.org On Mon, Oct 19, 2015 at 9:08 AM, Mark Brown wrote: > On Mon, Oct 19, 2015 at 05:34:48PM +0200, Takashi Iwai wrote: >> Mark Brown wrote: > >> > On Fri, Oct 09, 2015 at 06:16:36PM -0400, Dan Williams wrote: >> > > In preparation for deprecating ioremap_cache() convert its usage in >> > > skl-nhlt to memremap. > >> > > -void __iomem *skl_nhlt_init(struct device *dev) >> > > +void *skl_nhlt_init(struct device *dev) > >> > Why are we loosing the annotation here? > >> It's the exact purpose of this patchset, as far as I understand. >> memremap() allows the driver accessing the mapped memory just like a >> normal memory unlike ioremap(). > > There's no mention of what the purpose of the conversion is in either > the patch or the cover letter so it's a bit unclear, some confirmation > would be good :( The cover letter linked this article which talked through the motivation: https://lwn.net/Articles/653585/ Essentially an "__iomem" annotation on a cached mapping is inconsistent as __iomem indicates "may have side effects, use special accessors" and cached means "pre-fetching, asynchronous write-backs, and cpu determined i/o sizes are permissible". From mboxrd@z Thu Jan 1 00:00:00 1970 From: dan.j.williams@intel.com (Dan Williams) Date: Mon, 19 Oct 2015 09:59:29 -0700 Subject: [PATCH 11/20] sound, skylake: switch from ioremap_cache to memremap In-Reply-To: <20151019160842.GF32054@sirena.org.uk> References: <20151009221537.32203.5867.stgit@dwillia2-desk3.jf.intel.com> <20151009221635.32203.30755.stgit@dwillia2-desk3.jf.intel.com> <20151019152641.GC32054@sirena.org.uk> <20151019160842.GF32054@sirena.org.uk> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Oct 19, 2015 at 9:08 AM, Mark Brown wrote: > On Mon, Oct 19, 2015 at 05:34:48PM +0200, Takashi Iwai wrote: >> Mark Brown wrote: > >> > On Fri, Oct 09, 2015 at 06:16:36PM -0400, Dan Williams wrote: >> > > In preparation for deprecating ioremap_cache() convert its usage in >> > > skl-nhlt to memremap. > >> > > -void __iomem *skl_nhlt_init(struct device *dev) >> > > +void *skl_nhlt_init(struct device *dev) > >> > Why are we loosing the annotation here? > >> It's the exact purpose of this patchset, as far as I understand. >> memremap() allows the driver accessing the mapped memory just like a >> normal memory unlike ioremap(). > > There's no mention of what the purpose of the conversion is in either > the patch or the cover letter so it's a bit unclear, some confirmation > would be good :( The cover letter linked this article which talked through the motivation: https://lwn.net/Articles/653585/ Essentially an "__iomem" annotation on a cached mapping is inconsistent as __iomem indicates "may have side effects, use special accessors" and cached means "pre-fetching, asynchronous write-backs, and cpu determined i/o sizes are permissible".