David Woodhouse ae749c7ab4 PCI: Add arch_can_pci_mmap_wc() macro
Most of the almost-identical versions of pci_mmap_page_range() silently
ignore the 'write_combine' argument and give uncached mappings.

Yet we allow the PCIIOC_WRITE_COMBINE ioctl in /proc/bus/pci, expose the
'resourceX_wc' file in sysfs, and allow an attempted mapping to apparently
succeed.

To fix this, introduce a macro arch_can_pci_mmap_wc() which indicates
whether the platform can do a write-combining mapping.  On x86 this ends up
being pat_enabled(), while the few other platforms that support it can just
set it to a literal '1'.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-04-18 13:01:42 -05:00
..
2015-06-10 14:26:32 -07:00
2016-04-18 12:45:54 +02:00
2014-08-26 13:45:52 -04:00
2016-01-12 20:46:55 +02:00
2014-04-18 14:20:35 +02:00
2013-02-26 02:46:08 -05:00
2016-08-07 23:55:50 -04:00
2015-06-10 14:26:32 -07:00
2015-06-10 14:26:32 -07:00
2016-03-17 15:09:34 -07:00
2016-03-31 13:35:08 +02:00
2015-06-10 14:26:32 -07:00
2012-03-28 18:30:02 +01:00
2010-06-09 11:12:36 +02:00
2012-03-28 18:30:02 +01:00
2010-05-18 14:45:52 -07:00
2015-06-10 14:26:32 -07:00
2011-03-31 11:26:23 -03:00
2017-04-18 13:01:42 -05:00
2012-03-28 18:30:02 +01:00
2013-01-03 15:57:13 -08:00
2014-08-26 13:45:52 -04:00