linux-sg2042/drivers
Brian Starkey 20d7a35bc8 drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings
Use memset_io() for DMA_MEMORY_IO mappings which are mapped as I/O
memory, and regular memset() for DMA_MEMORY_MAP mappings.

This fixes the below alignment fault on arm64 for DMA_MEMORY_IO
mappings, where memset() uses the DC ZVA instruction which is invalid on
device memory.

   Unhandled fault: alignment fault (0x96000061) at 0xffffff8000380000
   Internal error: : 96000061 [#1] PREEMPT SMP
   Modules linked in: hdlcd(+) clk_scpi
   CPU: 4 PID: 1355 Comm: systemd-udevd Not tainted 4.4.0-rc1+ #5
   Hardware name: ARM Juno development board (r0) (DT)
   task: ffffffc9763eee00 ti: ffffffc9758c4000 task.ti: ffffffc9758c4000
   PC is at __efistub_memset+0x1ac/0x200
   LR is at dma_alloc_from_coherent+0xb0/0x120
   pc : [<ffffffc00030ff2c>] lr : [<ffffffc00042a918>] pstate: 400001c5
   sp : ffffffc9758c79a0
   x29: ffffffc9758c79a0 x28: ffffffc000635cd0
   x27: 0000000000000124 x26: ffffffc000119ef4
   x25: 0000000000010000 x24: 0000000000000140
   x23: ffffffc07e9ac3a8 x22: ffffffc9758c7a58
   x21: ffffffc9758c7a68 x20: 0000000000000004
   x19: ffffffc07e9ac380 x18: 0000000000000001
   x17: 0000007fae1bbba8 x16: ffffffc0001b2d1c
   x15: ffffffffffffffff x14: 0ffffffffffffffe
   x13: 0000000000000010 x12: ffffff800837ffff
   x11: ffffff800837ffff x10: 0000000040000000
   x9 : 0000000000000000 x8 : ffffff8000380000
   x7 : 0000000000000000 x6 : 000000000000003f
   x5 : 0000000000000040 x4 : 0000000000000000
   x3 : 0000000000000004 x2 : 000000000000ffc0
   x1 : 0000000000000000 x0 : ffffff8000380000

Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-03-22 15:36:02 -07:00
..
accessibility
acpi libnvdimm for 4.6 2016-03-16 17:45:56 -07:00
amba
android
ata Merge branch 'for-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2016-03-18 20:06:46 -07:00
atm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-03-17 21:38:27 -07:00
auxdisplay
base drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings 2016-03-22 15:36:02 -07:00
bcma
block virtio/vhost: new features, performance improvements, cleanups 2016-03-20 13:28:18 -07:00
bluetooth Bluetooth: btmrvl_sdio: fix firmware activation failure 2016-03-10 19:51:29 +01:00
bus arm[64] perf updates for 4.6: 2016-03-21 13:14:16 -07:00
cdrom
char ipmi/watchdog: use nmi_panic() when kernel panics in NMI handler 2016-03-22 15:36:02 -07:00
clk ARM: SoC driver updates for v4.6 2016-03-20 15:40:32 -07:00
clocksource One of the largest releases for KVM... Hardly any generic improvement, 2016-03-16 09:55:35 -07:00
connector
cpufreq ARM: SoC driver updates for v4.6 2016-03-20 15:40:32 -07:00
cpuidle
crypto Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-03-17 21:38:27 -07:00
dca
devfreq
dio
dma ARM: SoC platform updates for v4.6 2016-03-20 14:57:08 -07:00
dma-buf
edac EDAC queue for 4.6 2016-03-16 08:36:55 -07:00
eisa
extcon
firewire firewire: use in_compat_syscall to check ioctl compatness 2016-03-22 15:36:02 -07:00
firmware kernel: add kcov code coverage 2016-03-22 15:36:02 -07:00
fmc
fpga
gpio - New Drivers 2016-03-18 10:15:11 -07:00
gpu drivers/gpu/drm/amd/amdkfd: use in_compat_syscall to check open() caller type 2016-03-22 15:36:02 -07:00
hid drivers/hid/uhid.c: check write() bitness using in_compat_syscall 2016-03-22 15:36:02 -07:00
hsi
hv Char/Misc patches for 4.6-rc1 2016-03-17 13:47:50 -07:00
hwmon ARM: SoC driver updates for v4.6 2016-03-20 15:40:32 -07:00
hwspinlock
hwtracing
i2c i2c: designware: Add device HID for future AMD I2C controller 2016-03-10 21:34:47 +01:00
ide ide: hpt366: convert to use match_string() helper 2016-03-17 15:09:34 -07:00
idle
iio - New Drivers 2016-03-18 10:15:11 -07:00
infiniband Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
input input: redefine INPUT_COMPAT_TEST as in_compat_syscall() 2016-03-22 15:36:02 -07:00
iommu Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
ipack
irqchip irqchip/irq-alpine-msi: Release the correct domain on error 2016-03-11 10:06:55 +01:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-03-19 10:05:34 -07:00
leds leds: triggers: simplify led_trigger_store 2016-03-14 09:22:23 +01:00
lguest
lightnvm Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
macintosh
mailbox Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2016-03-20 12:58:32 -07:00
mcb
md Merge tag 'md/4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2016-03-21 14:18:10 -07:00
media [media] vsp1: use proper dma alloc/free functions 2016-03-21 13:49:01 -07:00
memory
memstick
message
mfd - New Drivers 2016-03-18 10:15:11 -07:00
misc Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
mmc MMC core: 2016-03-21 14:35:52 -07:00
mtd This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
net rapidio/rionet: add mport removal handling 2016-03-22 15:36:02 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2016-03-19 10:05:34 -07:00
ntb
nubus
nvdimm Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2016-03-19 16:31:54 -07:00
nvme Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
nvmem
of DeviceTree updates for 4.6: 2016-03-19 15:15:07 -07:00
oprofile
parisc PCI changes for the v4.6 merge window: 2016-03-16 14:45:55 -07:00
parport
pci powerpc updates for 4.6 2016-03-19 15:38:41 -07:00
pcmcia
perf drivers/perf: arm_pmu: avoid NULL dereference when not using devicetree 2016-03-21 11:36:17 +00:00
phy
pinctrl Merge branch 'akpm' (patches from Andrew) 2016-03-18 19:26:54 -07:00
platform Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-03-21 13:48:00 -07:00
pnp PNP / ACPI: add ACPI_RESOURCE_TYPE_SERIAL_BUS as a valid type 2016-03-09 23:50:55 +01:00
power Merge branch 'akpm' (patches from Andrew) 2016-03-18 19:26:54 -07:00
powercap
pps
ps3
ptp Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-15 12:13:56 -07:00
pwm
rapidio rapidio: add mport char device driver 2016-03-22 15:36:02 -07:00
ras
regulator - New Drivers 2016-03-18 10:15:11 -07:00
remoteproc
reset
rpmsg
rtc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-03-17 21:38:27 -07:00
s390 virtio/vhost: new features, performance improvements, cleanups 2016-03-20 13:28:18 -07:00
sbus
scsi Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-03-20 19:08:56 -07:00
sfi
sh
sn
soc ARM: SoC driver updates for v4.6 2016-03-20 15:40:32 -07:00
spi dmaengine updates for 4.6 2016-03-17 12:34:54 -07:00
spmi
ssb
staging staging/lustre: switch from is_compat_task to in_compat_syscall 2016-03-22 15:36:02 -07:00
target Configfs changes for the 4.6 merge window: 2016-03-17 16:25:46 -07:00
tc
thermal
thunderbolt
tty
uio
usb ARM: SoC driver updates for v4.6 2016-03-20 15:40:32 -07:00
uwb
vfio VFIO updates for v4.6-rc1 2016-03-17 13:05:09 -07:00
vhost vhost_net: basic polling support 2016-03-11 02:18:53 +02:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2016-03-21 13:48:00 -07:00
virt
virtio virtio/vhost: new features, performance improvements, cleanups 2016-03-20 13:28:18 -07:00
vlynq
vme
w1
watchdog hpwdt: use nmi_panic() when kernel panics in NMI handler 2016-03-22 15:36:02 -07:00
xen xen_balloon: support memory auto onlining policy 2016-03-15 16:55:16 -07:00
zorro
Kconfig
Makefile