summaryrefslogtreecommitdiff
path: root/drivers/mfd/ti_am335x_tscadc.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-07-20 18:16:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-19 22:47:16 +0200
commit5092edd3dbfebf78b836f5000102e78736eefae6 (patch)
treed0f2b768d073ea2c50325aa469415d0a755495c9 /drivers/mfd/ti_am335x_tscadc.c
parent363bb035cb1d1bf42750c5428c83ff0978b504bc (diff)
iommu/ipmmu-vmsa: Fix allocation in atomic context
[ Upstream commit 46583e8c48c5a094ba28060615b3a7c8c576690f ] When attaching a device to an IOMMU group with CONFIG_DEBUG_ATOMIC_SLEEP=y: BUG: sleeping function called from invalid context at mm/slab.h:421 in_atomic(): 1, irqs_disabled(): 128, pid: 61, name: kworker/1:1 ... Call trace: ... arm_lpae_alloc_pgtable+0x114/0x184 arm_64_lpae_alloc_pgtable_s1+0x2c/0x128 arm_32_lpae_alloc_pgtable_s1+0x40/0x6c alloc_io_pgtable_ops+0x60/0x88 ipmmu_attach_device+0x140/0x334 ipmmu_attach_device() takes a spinlock, while arm_lpae_alloc_pgtable() allocates memory using GFP_KERNEL. Originally, the ipmmu-vmsa driver had its own custom page table allocation implementation using GFP_ATOMIC, hence the spinlock was fine. Fix this by replacing the spinlock by a mutex, like the arm-smmu driver does. Fixes: f20ed39f53145e45 ("iommu/ipmmu-vmsa: Use the ARM LPAE page table allocator") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd/ti_am335x_tscadc.c')
0 files changed, 0 insertions, 0 deletions