linux_dsm_epyc7002/arch/x86/pci
Suresh Siddha 2992e545ea x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled
Thomas Schlichter reported:
> X.org uses libpciaccess which tries to mmap with write combining enabled via
> /sys/bus/pci/devices/*/resource0_wc. Currently, when PAT is not enabled, the
> kernel does fall back to uncached mmap. Then libpciaccess thinks it succeeded
> mapping with write combining enabled and does not set up suited MTRR entries.
> ;-(

Instead of silently mapping pci mmap region as UC minus in the case
of !pat_enabled and wc request, we can return error. Eric Anholt mentioned
that caller (like X) typically follows up with UC minus pci mmap request and
if there is a free mtrr slot, caller will manage adding WC mtrr.

Jesse Barnes says:
> Older versions of libpciaccess will behave better if we do it that way
> (iirc it only allocates an MTRR if the resource_wc file doesn't exist or
> fails to get mapped).

Reported-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-11-04 08:47:22 -08:00
..
acpi.c x86/PCI: print resources consistently with %pRt 2009-11-04 08:47:18 -08:00
amd_bus.c x86/PCI: read root resources from IOH on Intel 2009-11-04 08:47:09 -08:00
bus_numa.h x86/PCI: read root resources from IOH on Intel 2009-11-04 08:47:09 -08:00
common.c x86/PCI: Use generic cacheline sizing instead of per-vendor tests. 2009-11-04 08:47:12 -08:00
direct.c dmi: extend dmi_get_year() to dmi_get_date() 2009-09-08 21:17:48 -04:00
early.c PCI/x86: format early dump like other PCI output 2009-03-19 19:29:18 -07:00
fixup.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
i386.c x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled 2009-11-04 08:47:22 -08:00
init.c PCI: avoid early PCI mmconfig init if pci=noearly is given in cmdline 2009-01-07 11:12:46 -08:00
intel_bus.c x86/PCI: read root resources from IOH on Intel 2009-11-04 08:47:09 -08:00
irq.c x86, apic: introduce io_apic_irq_attr 2009-05-18 08:38:55 +02:00
legacy.c x86/PCI: make pci=lastbus=255 work when acpi is on 2009-03-26 16:07:49 -07:00
Makefile x86/PCI: read root resources from IOH on Intel 2009-11-04 08:47:09 -08:00
mmconfig_32.c SFI: Hook PCI MMCONFIG 2009-08-28 19:57:34 -04:00
mmconfig_64.c x86/PCI: host mmconfig detect clean up 2009-03-20 11:40:22 -07:00
mmconfig-shared.c SFI: Hook PCI MMCONFIG 2009-08-28 19:57:34 -04:00
numaq_32.c x86, apic: remove genapic.h 2009-02-17 17:52:44 +01:00
olpc.c x86, pci: move arch/x86/pci/pci.h to arch/x86/include/asm/pci_x86.h 2008-12-29 18:17:36 +01:00
pcbios.c x86: move mach-default/*.h files to asm/ 2009-01-29 14:16:51 +01:00
visws.c PCI: x86/visws: use generic INTx swizzle from PCI core 2009-01-07 11:13:16 -08:00