# Re: \[PATCH v1 05/47\] pci: add pci\_iomap\_wc() variants

- From: Toshi Kani \<hidden\>
- Date: 2015-03-27 19:36:56 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2015/03/4461019
- Thread: https://ratatoskr.run/linux-fbdev/2015/03/4456096/t.md

```text
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


```
