linux-stable/drivers
Tom Murphy 37ec8eb851 iommu/amd: Remove unnecessary locking from AMD iommu driver
With or without locking it doesn't make sense for two writers to be
writing to the same IOVA range at the same time. Even with locking we
still have a race condition, whoever gets the lock first, so we still
can't be sure what the result will be. With locking the result will be
more sane, it will be correct for the last writer, but still useless
because we can't be sure which writer will get the lock last. It's a
fundamentally broken design to have two writers writing to the same
IOVA range at the same time.

So we can remove the locking and work on the assumption that no two
writers will be writing to the same IOVA range at the same time.

The only exception is when we have to allocate a middle page in the page
tables, the middle page can cover more than just the IOVA range a writer
has been allocated. However this isn't an issue in the AMD driver
because it can atomically allocate middle pages using "cmpxchg64()".

Signed-off-by: Tom Murphy <murphyt7@tcd.ie>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2019-10-15 11:31:03 +02:00
..
accessibility
acpi Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
amba ARM updates for 5.4-rc1: 2019-09-22 09:39:09 -07:00
android binder: Fix comment headers on binder_alloc_prepare_to_free() 2019-10-10 14:39:23 +02:00
ata Revert "libata, freezer: avoid block device removal while system is frozen" 2019-10-06 09:11:37 -06:00
atm atm: he: clean up an indentation issue 2019-09-25 13:54:45 +02:00
auxdisplay
base driver core: platform: Add platform_get_irq_byname_optional() 2019-10-07 12:52:44 +02:00
bcma
block for-linus-20191010 2019-10-11 08:45:32 -07:00
bluetooth
bus ARM: SoC fixes 2019-09-30 10:04:28 -07:00
cdrom
char char/random: Add a newline at the end of the file 2019-10-02 13:49:43 -07:00
clk Fixes for omaps for v5.4-rc cycle 2019-10-03 09:15:19 -07:00
clocksource timer-of: don't use conditional expression with mixed 'void' types 2019-10-02 16:16:07 -07:00
connector
counter
cpufreq
cpuidle
crypto Merge branch 'akpm' (patches from Andrew) 2019-09-24 16:10:23 -07:00
dax
dca
devfreq
dio
dma Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
dma-buf
edac ARM updates for 5.4-rc1: 2019-09-22 09:39:09 -07:00
eisa
extcon
firewire
firmware Char/Misc driver fixes for 5.4-rc3. 2019-10-12 15:47:19 -07:00
fpga
fsi
gnss
gpio gpio: max77620: Use correct unit for debounce times 2019-10-04 23:58:10 +02:00
gpu xen: fixes for 5.4-rc3 2019-10-12 14:11:21 -07:00
greybus
hid HID: hyperv: Use in-place iterator API in the channel callback 2019-10-01 14:49:41 -04:00
hsi HSI changes for the 5.4 series 2019-09-22 12:02:21 -07:00
hv Drivers: hv: vmbus: Fix harmless building warnings without CONFIG_PM_SLEEP 2019-10-01 14:49:45 -04:00
hwmon hwmon: (nct7904) Add array fan_alarm and vsen_alarm to store the alarms in nct7904_data struct. 2019-10-02 06:42:48 -07:00
hwspinlock
hwtracing
i2c i2c: slave-eeprom: Add read only mode 2019-09-28 20:44:12 +02:00
i3c
ide
idle
iio First set of IIO fixes for the 5.4 cycle. 2019-10-10 11:18:37 +02:00
infiniband RDMA/mlx5: Add missing synchronize_srcu() for MW cases 2019-10-04 15:54:22 -03:00
input
interconnect
iommu iommu/amd: Remove unnecessary locking from AMD iommu driver 2019-10-15 11:31:03 +02:00
ipack
irqchip Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
isdn mISDN: enforce CAP_NET_RAW for raw sockets 2019-09-24 16:37:18 +02:00
leds
lightnvm
macintosh
mailbox
mcb
md for-5.4/post-2019-09-24 2019-09-24 16:31:50 -07:00
media media: stkwebcam: fix runtime PM after driver unbind 2019-10-04 14:38:46 +02:00
memory
memstick
message
mfd Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2019-09-29 10:24:23 -07:00
misc misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach 2019-10-04 18:22:14 +02:00
mmc mmc: host: sdhci-pci: Add Genesys Logic GL975x support 2019-09-27 20:48:20 +02:00
mtd mtd: rawnand: au1550nd: Fix au_read_buf16() prototype 2019-10-07 09:56:36 +02:00
mux
net RDMA subsystem updates for 5.4-rc 2019-10-09 09:46:46 -07:00
nfc NFC: st95hf: clean up indentation issue 2019-09-27 20:31:18 +02:00
ntb NTB: fix IDT Kconfig typos/spellos 2019-09-23 17:20:40 -04:00
nubus
nvdimm libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
nvme Merge branch 'nvme-5.4' of git://git.infradead.org/nvme into for-linus 2019-09-27 13:17:37 -06:00
nvmem
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-28 17:47:33 -07:00
opp
oprofile
parisc
parport
pci Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
pcmcia Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
perf
phy pci-v5.4-changes 2019-09-23 19:16:01 -07:00
pinctrl
platform platform-drivers-x86 for v5.4-2 2019-09-24 12:39:40 -07:00
pnp
power power supply and reset changes for the v5.4 series 2019-09-22 12:04:59 -07:00
powercap
pps
ps3
ptp ptp_qoriq: Initialize the registers' spinlock before calling ptp_qoriq_settime 2019-10-02 12:20:38 -04:00
pwm pwm: Changes for v5.4-rc1 2019-09-27 12:19:47 -07:00
rapidio
ras
regulator
remoteproc remoteproc updates for v5.4 2019-09-22 10:55:08 -07:00
reset ARM: SoC fixes 2019-09-30 10:04:28 -07:00
rpmsg
rtc RTC for 5.4 2019-09-22 11:05:43 -07:00
s390 s390/cio: fix virtio-ccw DMA without PV 2019-10-10 10:49:46 +02:00
sbus
scsi SCSI fixes on 20191004 2019-10-05 12:53:27 -07:00
sfi
sh
siox
slimbus
soc
soundwire soundwire updates for v5.4-rc1 2019-09-22 10:52:23 -07:00
spi
spmi
ssb
staging Staging/IIO driver fixes for 5.4-rc3 2019-10-12 15:44:46 -07:00
target mm: introduce page_size() 2019-09-24 15:54:08 -07:00
tc
tee tee/shm: untag user pointers in tee_shm_register 2019-09-25 17:51:41 -07:00
thermal Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2019-09-29 10:24:23 -07:00
thunderbolt
tty tty: serial: imx: Use platform_get_irq_optional() for optional IRQs 2019-10-10 13:12:28 +02:00
uio
usb USB: yurex: fix NULL-derefs on disconnect 2019-10-10 14:24:06 +02:00
vfio vfio/type1: untag user pointers in vaddr_get_pfn 2019-09-25 17:51:41 -07:00
vhost
video video/logo: do not generate unneeded logo C files 2019-10-05 15:29:49 +09:00
virt virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr 2019-10-10 14:50:32 +02:00
virtio
visorbus
vlynq
vme
w1 w1: ds250x: Fix build error without CRC16 2019-10-10 15:35:41 +02:00
watchdog linux-watchdog 5.4-rc1 tag 2019-09-27 11:17:38 -07:00
xen xen: fixes for 5.4-rc3 2019-10-12 14:11:21 -07:00
zorro
Kconfig
Makefile