linux/drivers
Linus Torvalds e16c4790de Revert "iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}()"
This reverts commit b468620f2a.

It turns out that this broke drm on AMD platforms. Quoting Gabriel C:
 "I can confirm reverting b468620f2a fixes
  that issue for me.

  The GPU is working fine with SME enabled.

  Now with working GPU :) I can also confirm performance is back to
  normal without doing any other workarounds"

Christan König analyzed it partially:
 "As far as I analyzed it we now get an -ENOMEM from dma_alloc_attrs()
  in drivers/gpu/drm/ttm/ttm_page_alloc_dma.c when IOMMU is enabled"

and Christoph Hellwig responded:
 "I think the prime issue is that dma_direct_alloc respects the dma
  mask. Which we don't need if actually using the iommu. This would be
  mostly harmless exept for the the SEV bit high in the address that
  makes the checks fail.

  For now I'd say revert this commit for 4.17/4.18-rc and I'll look into
  addressing these issues properly"

Reported-and-bisected-by: Gabriel C <nix.or.die@gmail.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Christian König <christian.koenig@amd.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org		# v4.17
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-11 12:22:12 -07:00
..
accessibility
acpi libnvdimm for 4.18 2018-06-08 17:21:52 -07:00
amba Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2018-06-06 13:49:25 -07:00
android
ata SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
atm atm: zatm: fix memcmp casting 2018-05-29 09:59:53 -04:00
auxdisplay
base arm64 updates for 4.18: 2018-06-08 11:10:58 -07:00
bcma dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
block for-linus-20180608 2018-06-08 13:36:19 -07:00
bluetooth Bluetooth: btusb: Add additional device ID for RTL8822BE 2018-05-30 15:45:01 +02:00
bus
cdrom
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2018-06-09 11:14:30 -07:00
clk This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
clocksource This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
connector Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
cpufreq ACPI updates for 4.18-rc1 2018-06-05 10:08:27 -07:00
cpuidle powerpc updates for 4.18 2018-06-07 10:23:33 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-06-05 15:51:21 -07:00
dax libnvdimm for 4.18 2018-06-08 17:21:52 -07:00
dca
devfreq
dio
dma dmaengine updates for 4.18-rc1 2018-06-08 11:02:21 -07:00
dma-buf
edac
eisa
extcon
firewire treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
firmware Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
fmc
fpga
fsi
gpio This is the bulk of GPIO changes for the v4.18 development 2018-06-08 10:31:52 -07:00
gpu msm next, i915, vc4, v3d fixes 2018-06-11 07:17:36 -07:00
hid Merge branch 'for-4.18/wacom' into for-linus 2018-06-08 10:28:24 +02:00
hsi
hv SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
hwmon powerpc updates for 4.18 2018-06-07 10:23:33 -07:00
hwspinlock hwspinlock updates for v4.18 2018-06-11 12:09:19 -07:00
hwtracing Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
i2c USB/PHY patches for 4.18-rc1 2018-06-05 16:14:12 -07:00
ide ide: don't enable/disable interrupts in force threaded-IRQ mode 2018-06-05 16:26:47 -04:00
idle
iio Staging/IIO patches for 4.18-rc1 2018-06-09 10:32:39 -07:00
infiniband 4.18 Merge window pull request 2018-06-07 13:04:07 -07:00
input - New Device Support 2018-06-11 07:20:17 -07:00
iommu Revert "iommu/amd_iommu: Use CONFIG_DMA_DIRECT_OPS=y and dma_direct_{alloc,free}()" 2018-06-11 12:22:12 -07:00
ipack
irqchip irqchip/ls-scfg-msi: Map MSIs in the iommu 2018-06-06 12:05:19 +02:00
isdn Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
leds
lightnvm lightnvm: pblk: fix resource leak of invalid_bitmap 2018-06-05 09:20:27 -06:00
macintosh powerpc updates for 4.18 2018-06-07 10:23:33 -07:00
mailbox - Remove HAS_DMA config dependencies 2018-06-07 13:35:59 -07:00
mcb
md Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2018-06-09 12:01:36 -07:00
media media updates for v4.18-rc1 2018-06-07 12:34:37 -07:00
memory
memstick
message SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
mfd - New Device Support 2018-06-11 07:20:17 -07:00
misc pci-v4.18-changes 2018-06-07 12:45:58 -07:00
mmc MMC core: 2018-06-05 16:11:43 -07:00
mtd This pull request contains updates for both UBI and UBIFS: 2018-06-10 15:52:09 -07:00
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-06-10 19:25:23 -07:00
nfc NFC: pn533: don't send USB data off of the stack 2018-05-31 12:43:14 +02:00
ntb
nubus Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
nvdimm Merge branch 'for-4.18/mcsafe' into libnvdimm-for-next 2018-06-08 15:16:44 -07:00
nvme for-linus-20180608 2018-06-08 13:36:19 -07:00
nvmem
of DeviceTree updates for v4.18: 2018-06-07 14:06:31 -07:00
opp OPP: Allow same OPP table to be used for multiple genpd 2018-05-30 15:38:21 +05:30
oprofile
parisc dma-mapping updates for 4.18: 2018-06-04 10:58:12 -07:00
parport
pci pci-v4.18-changes 2018-06-07 12:45:58 -07:00
pcmcia
perf drivers/bus: arm-cci: fix build warnings 2018-05-29 16:38:16 +01:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
pinctrl This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
platform - New Device Support 2018-06-11 07:20:17 -07:00
pnp media updates for v4.18-rc1 2018-06-07 12:34:37 -07:00
power power supply and reset changes for the v4.18 series 2018-06-09 12:11:09 -07:00
powercap
pps
ps3
ptp
pwm pwm: stm32: Initialize raw local variables 2018-06-04 07:13:40 +01:00
rapidio
ras
regulator regulator: Updates for v4.18 2018-06-08 13:08:57 -07:00
remoteproc remoteproc: q6v5: Allow defining GLINK edge for mss remoteproc 2018-05-29 20:10:34 -07:00
reset - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
rpmsg rpmsg: smd: do not use mananged resources for endpoints and channels 2018-06-04 12:35:03 -07:00
rtc - New Device Support 2018-06-11 07:20:17 -07:00
s390 SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
sbus
scsi SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
sfi
sh
siox
slimbus
sn
soc This time we have a good set of changes to the core framework that do some 2018-06-09 12:06:24 -07:00
soundwire Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
spi Power management updates for 4.18-rc1 2018-06-05 09:38:39 -07:00
spmi
ssb
staging - Core Frameworks 2018-06-11 07:23:19 -07:00
target SCSI misc on 20180610 2018-06-10 13:01:12 -07:00
tc
tee
thermal - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
thunderbolt
tty powerpc updates for 4.18 2018-06-07 10:23:33 -07:00
uio
usb - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
uwb
vfio Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 13:57:43 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-06-06 18:39:49 -07:00
video - Core Frameworks 2018-06-11 07:23:19 -07:00
virt
virtio
visorbus
vlynq
vme
w1 Char/Misc driver patches for 4.18-rc1 2018-06-05 16:20:22 -07:00
watchdog
xen xen: fixes and features for v4-18-rc1 2018-06-08 09:24:54 -07:00
zorro - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
Kconfig
Makefile