linux-stable/drivers
Thomas Zimmermann 01fd30da04 dma-buf: Add struct dma-buf-map for storing struct dma_buf.vaddr_ptr
The new type struct dma_buf_map represents a mapping of dma-buf memory
into kernel space. It contains a flag, is_iomem, that signals users to
access the mapped memory with I/O operations instead of regular loads
and stores.

It was assumed that DMA buffer memory can be accessed with regular load
and store operations. Some architectures, such as sparc64, require the
use of I/O operations to access dma-map buffers that are located in I/O
memory. Providing struct dma_buf_map allows drivers to implement this.
This was specifically a problem when refreshing the graphics framebuffer
on such systems. [1]

As the first step, struct dma_buf stores an instance of struct dma_buf_map
internally. Afterwards, dma-buf's vmap and vunmap interfaces are be
converted. Finally, affected drivers can be fixed.

v3:
	* moved documentation into separate patch
	* test for NULL pointers with !<ptr>

[1] https://lore.kernel.org/dri-devel/20200725191012.GA434957@ravnborg.org/

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200925115601.23955-2-tzimmermann@suse.de
2020-09-29 12:40:36 +02:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi Merge branch 'acpi-mm' 2020-08-28 21:17:56 +02:00
amba
android
ata libata-5.9-2020-09-04 2020-09-04 13:19:19 -07:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
auxdisplay A trivial patch for auxdisplay: 2020-09-05 14:22:46 -07:00
base Driver core fixes for 5.9-rc5 2020-09-13 09:02:59 -07:00
bcma
block rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-07 13:14:30 +02:00
bluetooth
bus
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
clk
clocksource
connector
counter
cpufreq cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled 2020-09-01 21:15:00 +02:00
cpuidle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
dax libnvdimm fix for v5.9-rc5 2020-09-12 12:43:58 -07:00
dca
devfreq
dio
dma dmaengine fixes for v5.9-rc4 2020-09-04 12:12:39 -07:00
dma-buf dma-buf: Add struct dma-buf-map for storing struct dma_buf.vaddr_ptr 2020-09-29 12:40:36 +02:00
edac A fix to properly clear ghes_edac driver state on driver remove so that 2020-08-30 10:47:23 -07:00
eisa
extcon
firewire
firmware Driver core fixes for 5.9-rc5 2020-09-13 09:02:59 -07:00
fpga
fsi
gnss
gpio
gpu drm/qxl: simplify the return expression of qxl_plane_prepare_fb() 2020-09-29 11:24:00 +02:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-09-02 12:55:46 -07:00
hsi
hv hyperv-fixes for 5.9-rc3 2020-08-26 10:44:15 -07:00
hwmon hwmon fixes for v5.9-rc3 2020-08-29 12:37:00 -07:00
hwspinlock
hwtracing
i2c i2c: algo: pca: Reapply i2c bus settings after reset 2020-09-09 10:22:40 +02:00
i3c
ide
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio Staging / IIO driver fixes for 5.9-rc5 2020-09-13 09:15:20 -07:00
infiniband RDMA second 5.9-rc pull request 2020-09-11 10:02:36 -07:00
input
interconnect interconnect: qcom: Fix small BW votes being truncated to zero 2020-09-04 00:07:12 +03:00
iommu iommu/vt-d: Handle 36bit addressing for x86-32 2020-09-04 12:14:28 +02:00
ipack
irqchip A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md dm thin metadata: Fix use-after-free in dm_bm_set_read_only 2020-09-02 13:38:40 -04:00
media media fixes for v5.9-rc4 2020-09-03 08:22:16 -07:00
memory
memstick
message
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Char / Misc driver fixes for 5.9-rc5 2020-09-13 08:52:21 -07:00
mmc mmc: sdio: Use mmc_pre_req() / mmc_post_req() 2020-09-07 08:57:44 +02:00
most
mtd
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
ntb
nubus
nvdimm
nvme - Fix a regression in bdev partition locking (Christoph) 2020-09-11 11:55:28 -07:00
nvmem
of
opp Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-09-01 19:44:20 +02:00
oprofile
parisc
parport
pci
pcmcia
perf
phy phy: fixes for 5.9 2020-09-04 12:41:55 +02:00
pinctrl
platform
pnp
power
powercap powercap/intel_rapl: add support for AlderLake 2020-09-10 19:17:29 +02:00
pps
ps3
ptp
pwm
rapidio rapidio: Replace 'select' DMAENGINES 'with depends on' 2020-09-05 19:52:54 +03:00
ras
regulator regulator: Fixes for v5.9 2020-09-11 11:25:55 -07:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20200908 2020-09-08 11:42:58 -07:00
sfi
sh
siox
slimbus
soc
soundwire soundwire: fix double free of dangling pointer 2020-09-03 14:10:19 +05:30
spi spi: Fixes for v5.9 2020-09-11 11:35:55 -07:00
spmi
ssb
staging Staging / IIO driver fixes for 5.9-rc5 2020-09-13 09:15:20 -07:00
target SCSI fixes on 20200908 2020-09-08 11:42:58 -07:00
tc
tee
thermal - Fix bogus thermal shutdowns for omap4430 where bogus values 2020-09-04 12:49:03 -07:00
thunderbolt thunderbolt: Fixes for v5.9-rc4 2020-09-01 09:48:28 +02:00
tty TTY/Serial fixes for 5.9-rc3 2020-08-26 10:58:20 -07:00
uio
usb USB-serial fixes for 5.9-rc5 2020-09-08 17:50:58 +02:00
vdpa vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms 2020-08-26 08:13:59 -04:00
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
video fbdev: sbuslib: remove compat_alloc_user_space usage 2020-09-25 16:34:50 +02:00
virt
virtio Merge branch 'virtio-shm' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse into drm-misc-next 2020-09-16 13:18:32 +02:00
visorbus
vlynq
vme
w1
watchdog
xen xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
zorro
Kconfig
Makefile