From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752307AbbC0Tg4 (ORCPT ); Fri, 27 Mar 2015 15:36:56 -0400 Received: from g4t3425.houston.hp.com ([15.201.208.53]:29535 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbbC0Tgy (ORCPT ); Fri, 27 Mar 2015 15:36:54 -0400 Message-ID: <1427483916.31093.30.camel@misato.fc.hp.com> Subject: Re: [PATCH v1 05/47] pci: add pci_iomap_wc() variants From: Toshi Kani To: Bjorn Helgaas Cc: "Luis R. Rodriguez" , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , jgross@suse.com, Jan Beulich , Borislav Petkov , Suresh Siddha , venkatesh.pallipadi@intel.com, Dave Airlie , "linux-kernel@vger.kernel.org" , linux-fbdev@vger.kernel.org, "x86@kernel.org" , "xen-devel@lists.xenproject.org" , "Luis R. Rodriguez" , Ingo Molnar , Daniel Vetter , Antonino Daplas , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dave Hansen , Arnd Bergmann , "Michael S. Tsirkin" , Stefan Bader , Konrad Rzeszutek Wilk , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , David Vrabel , Roger Pau =?ISO-8859-1?Q?Monn=E9?= , xen-devel Date: Fri, 27 Mar 2015 13:18:36 -0600 In-Reply-To: References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> <1426893517-2511-6-git-send-email-mcgrof@do-not-panic.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-03-23 at 12:20 -0500, Bjorn Helgaas wrote: : > pci_iomap_range() already makes a cacheable mapping if > IORESOURCE_CACHEABLE; I'm guessing that you would like it to > automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g., > > if (flags & IORESOURCE_CACHEABLE) > return ioremap(start, len); Is this supposed to be ioremap_cache()? ioremap() is the same as ioremap_nocache() at least on x86 per arch/x86/include/asm/io.h. > if (flags & IORESOURCE_PREFETCH) > return ioremap_wc(start, len); > return ioremap_nocache(start, len); > -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Date: Fri, 27 Mar 2015 19:18:36 +0000 Subject: Re: [PATCH v1 05/47] pci: add pci_iomap_wc() variants Message-Id: <1427483916.31093.30.camel@misato.fc.hp.com> List-Id: References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> <1426893517-2511-6-git-send-email-mcgrof@do-not-panic.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bjorn Helgaas Cc: "Luis R. Rodriguez" , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , jgross@suse.com, Jan Beulich , Borislav Petkov , Suresh Siddha , venkatesh.pallipadi@intel.com, Dave Airlie , "linux-kernel@vger.kernel.org" , linux-fbdev@vger.kernel.org, "x86@kernel.org" , "xen-devel@lists.xenproject.org" , "Luis R. Rodriguez" , Ingo Molnar , Daniel Vetter , Antonino Daplas , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dave Hansen , Arnd Bergmann , "Michael S. Tsirkin" , Stefan Bader , Konrad Rzeszutek Wilk , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , David Vrabel , Roger Pau =?ISO-8859-1?Q?Monn=E9?= , xen-devel On Mon, 2015-03-23 at 12:20 -0500, Bjorn Helgaas wrote: : > pci_iomap_range() already makes a cacheable mapping if > IORESOURCE_CACHEABLE; I'm guessing that you would like it to > automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g., > > if (flags & IORESOURCE_CACHEABLE) > return ioremap(start, len); Is this supposed to be ioremap_cache()? ioremap() is the same as ioremap_nocache() at least on x86 per arch/x86/include/asm/io.h. > if (flags & IORESOURCE_PREFETCH) > return ioremap_wc(start, len); > return ioremap_nocache(start, len); > -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH v1 05/47] pci: add pci_iomap_wc() variants Date: Fri, 27 Mar 2015 13:18:36 -0600 Message-ID: <1427483916.31093.30.camel@misato.fc.hp.com> References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> <1426893517-2511-6-git-send-email-mcgrof@do-not-panic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Bjorn Helgaas Cc: "Luis R. Rodriguez" , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , jgross@suse.com, Jan Beulich , Borislav Petkov , Suresh Siddha , venkatesh.pallipadi@intel.com, Dave Airlie , "linux-kernel@vger.kernel.org" , linux-fbdev@vger.kernel.org, "x86@kernel.org" , "xen-devel@lists.xenproject.org" , "Luis R. Rodriguez" , Ingo Molnar , Daniel Vetter , Antonino Daplas , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dave Hansen , Arnd Bergmann List-Id: xen-devel@lists.xenproject.org On Mon, 2015-03-23 at 12:20 -0500, Bjorn Helgaas wrote: : > pci_iomap_range() already makes a cacheable mapping if > IORESOURCE_CACHEABLE; I'm guessing that you would like it to > automatically use WC if the BAR if IORESOURCE_PREFETCH, e.g., > > if (flags & IORESOURCE_CACHEABLE) > return ioremap(start, len); Is this supposed to be ioremap_cache()? ioremap() is the same as ioremap_nocache() at least on x86 per arch/x86/include/asm/io.h. > if (flags & IORESOURCE_PREFETCH) > return ioremap_wc(start, len); > return ioremap_nocache(start, len); > -Toshi