• David Woodhouse's avatar
    PCI: Add arch_can_pci_mmap_wc() macro · ae749c7a
    David Woodhouse authored
    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: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    ae749c7a
pci.h 3.8 KB