--- - branch: MAIN date: Mon Dec 2 17:13:13 UTC 2019 files: - new: '1.39' old: '1.38' path: src/sys/dev/pci/pci_map.c pathrev: src/sys/dev/pci/pci_map.c@1.39 type: modified id: 20191202T171313Z.bae3e13f80a4b6d534810c91fba4d5f037506531 log: | Leave it entirely up to the driver whether to map prefetchable. We have only a few drivers that pass BUS_SPACE_MAP_PREFETCHABLE to pci_mapreg_map -- dev/pci/if_hme_pci.c, dev/pci/igma.c, dev/pci/radeonfb.c, dev/pci/wcfb.c -- and they all do it for ROM or framebuffers. Based on a subthread from macallan@ in the earlier discussion: https://mail-index.NetBSD.org/tech-kern/2017/03/23/msg021685.html The thrust is that: - a driver not asking for prefetchable mappings shouldn't get it - some devices are correctly used with prefetchable mappings, but for some reason fail to set the prefetchable bit in the BAR - nobody could identify any classes of device for which (a) the driver asks for prefetchable mappings, but (b) certain matching devices can't actually be used with prefetchable mappings This brings pci_mapreg_map in line with what the documentation says; the documentation never advertised that the prefetchable bit in the BAR could cause the bus_space mapping to be prefetchable. module: src subject: 'CVS commit: src/sys/dev/pci' unixtime: '1575306793' user: riastradh