linux/drivers/pci
Bjorn Helgaas 3a92c319c4 PCI: Ignore write combining when mapping I/O port space
PCI exposes files like /proc/bus/pci/00/00.0 in procfs.  These files
support operations like this:

  ioctl(fd, PCIIOC_MMAP_IS_IO);           # request I/O port space
  ioctl(fd, PCIIOC_WRITE_COMBINE, 1);     # request write-combining
  mmap(fd, ...)

Write combining is useful on PCI memory space, but I don't think it makes
sense on PCI I/O port space.

We *could* change proc_bus_pci_ioctl() to make it impossible to set
mmap_state == pci_mmap_io and write_combine at the same time, but that
would break the following sequence, which is currently legal:

  mmap(fd, ...)                           # default is I/O, non-combining
  ioctl(fd, PCIIOC_WRITE_COMBINE, 1);     # request write-combining
  ioctl(fd, PCIIOC_MMAP_IS_MEM);          # request memory space
  mmap(fd, ...)                           # get write-combining mapping

Ignore the write-combining flag when mapping I/O port space.

This patch should have no functional effect, based on this analysis of all
implementations of pci_mmap_page_range():

  - ia64 mips parisc sh unicore32 x86 do not support mapping of I/O port
    space at all.

  - arm cris microblaze mn10300 sparc xtensa support mapping of I/O port
    space, but ignore the write_combine argument to pci_mmap_page_range().

  - powerpc supports mapping of I/O port space and uses write_combine, and
    it disables write combining for I/O port space in
    __pci_mmap_set_pgprot().

This patch makes it possible to remove __pci_mmap_set_pgprot() from
powerpc, which simplifies that path.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-06-17 14:43:33 -05:00
..
host Char / Misc driver update for 4.7-rc1 2016-05-20 21:20:31 -07:00
hotplug powerpc updates for 4.7 2016-05-20 10:12:41 -07:00
pcie Merge branches 'pci/hotplug' and 'pci/resource' into next 2016-05-17 14:35:38 -05:00
access.c PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Do not treat EPROBE_DEFER as device attach failure 2016-05-02 13:49:11 -05:00
ecam.c PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
ecam.h PCI: generic, thunder: Use generic ECAM API 2016-05-12 07:07:42 -05:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
irq.c
Kconfig PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
Makefile PCI: Provide common functions for ECAM mapping 2016-05-11 17:34:41 -05:00
msi.c PCI changes for the v4.5 merge window: 2016-01-21 11:52:16 -08:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Power management and ACPI updates for v4.5-rc1 2016-01-12 20:25:09 -08:00
pci-driver.c PCI / PM: Tune down retryable runtime suspend error messages 2015-12-02 15:24:21 +01:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-stub.c
pci-sysfs.c PCI changes for the v4.7 merge window: 2016-05-19 13:10:54 -07:00
pci.c Merge branches 'pci/arm64' and 'pci/host-hv' into next 2016-05-17 14:35:46 -05:00
pci.h PCI: Add pci_set_vpd_size() to set VPD size 2016-04-15 13:00:11 -05:00
probe.c Merge branches 'pci/hotplug' and 'pci/resource' into next 2016-05-17 14:35:38 -05:00
proc.c PCI: Ignore write combining when mapping I/O port space 2016-06-17 14:43:33 -05:00
quirks.c Merge branches 'pci/enumeration', 'pci/hotplug', 'pci/misc', 'pci/ntb', 'pci/thunderbolt' and 'pci/virtualization' into next 2016-04-25 14:35:26 -05:00
remove.c Merge branch 'pci/resource' into next 2016-03-15 08:56:28 -05:00
rom.c PCI: Remove unused IORESOURCE_ROM_COPY and IORESOURCE_ROM_BIOS_COPY 2016-03-12 06:00:29 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c PCI: Remove includes of empty asm-generic/pci-bridge.h 2016-02-05 16:28:36 -06:00
setup-irq.c PCI: Export symbols required for loadable host driver modules 2015-04-08 14:17:10 -05:00
setup-res.c PCI: Don't assign or reassign immutable resources 2016-03-08 12:14:31 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-02-15 14:34:57 +00:00