From: Lee Jones <lee.jones@linaro.org>
To: stable@vger.kernel.org
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 4.4 02/16 (v2)] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants
Date: Mon, 18 May 2020 11:23:53 +0100 [thread overview]
Message-ID: <20200518102353.GR271301@dell> (raw)
In-Reply-To: <20200423204014.784944-3-lee.jones@linaro.org>
[ Upstream commit 3285170f28a850638794cdfe712eb6d93e51e706 ]
Recently splats like this started showing up:
WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0
Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide
CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G W 5.2.0-rc5-next-20190619+ #2317
Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018
Workqueue: msm msm_gem_free_work [msm]
pstate: 80c00005 (Nzcv daif +PAN +UAO)
pc : __iommu_dma_unmap+0xb8/0xc0
lr : __iommu_dma_unmap+0x54/0xc0
sp : ffff0000119abce0
x29: ffff0000119abce0 x28: 0000000000000000
x27: ffff8001f9946648 x26: ffff8001ec271068
x25: 0000000000000000 x24: ffff8001ea3580a8
x23: ffff8001f95ba010 x22: ffff80018e83ba88
x21: ffff8001e548f000 x20: fffffffffffff000
x19: 0000000000001000 x18: 00000000c00001fe
x17: 0000000000000000 x16: 0000000000000000
x15: ffff000015b70068 x14: 0000000000000005
x13: 0003142cc1be1768 x12: 0000000000000001
x11: ffff8001f6de9100 x10: 0000000000000009
x9 : ffff000015b78000 x8 : 0000000000000000
x7 : 0000000000000001 x6 : fffffffffffff000
x5 : 0000000000000fff x4 : ffff00001065dbc8
x3 : 000000000000000d x2 : 0000000000001000
x1 : fffffffffffff000 x0 : 0000000000000000
Call trace:
__iommu_dma_unmap+0xb8/0xc0
iommu_dma_unmap_sg+0x98/0xb8
put_pages+0x5c/0xf0 [msm]
msm_gem_free_work+0x10c/0x150 [msm]
process_one_work+0x1e0/0x330
worker_thread+0x40/0x438
kthread+0x12c/0x130
ret_from_fork+0x10/0x18
---[ end trace afc0dc5ab81a06bf ]---
Not quite sure what triggered that, but we really shouldn't be abusing
dma_{map,unmap}_sg() for cache maint.
Cc: Stephen Boyd <sboyd@kernel.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/gpu/drm/msm/msm_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 644faf3ae93a3..055859095cf01 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -104,7 +104,7 @@ static struct page **get_pages(struct drm_gem_object *obj)
* because display controller, GPU, etc. are not coherent:
*/
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
- dma_map_sg(dev->dev, msm_obj->sgt->sgl,
+ dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl,
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
}
@@ -120,7 +120,7 @@ static void put_pages(struct drm_gem_object *obj)
* because display controller, GPU, etc. are not coherent:
*/
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
- dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
+ dma_sync_sg_for_cpu(obj->dev->dev, msm_obj->sgt->sgl,
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
if (msm_obj->sgt)
--
2.25.1
next prev parent reply other threads:[~2020-05-18 10:23 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 20:39 [PATCH 4.4 00/16] Backported fixes taken from Sony's Vendor tree Lee Jones
2020-04-23 20:39 ` [PATCH 4.4 01/16] drm/msm: stop abusing dma_map/unmap for cache Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 02/16] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants Lee Jones
2020-05-13 9:34 ` Greg KH
2020-05-18 10:23 ` Lee Jones [this message]
2020-04-23 20:40 ` [PATCH 4.4 03/16] devres: Align data[] to ARCH_KMALLOC_MINALIGN Lee Jones
2020-05-13 9:35 ` Greg Kroah-Hartman
2020-05-13 9:48 ` Geert Uytterhoeven
2020-05-13 10:10 ` David Laight
2020-05-13 11:05 ` Geert Uytterhoeven
2020-05-13 11:06 ` Geert Uytterhoeven
2020-05-13 12:37 ` David Laight
2020-05-13 13:26 ` Geert Uytterhoeven
2020-05-13 13:35 ` David Laight
2020-05-13 13:36 ` Peter Zijlstra
2020-05-13 13:50 ` David Laight
2020-04-23 20:40 ` [PATCH 4.4 04/16] crypto: talitos - Delete an error message for a failed memory allocation in talitos_edesc_alloc() Lee Jones
2020-05-13 9:36 ` Greg KH
2020-05-18 10:17 ` Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 05/16] drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem Lee Jones
2020-05-13 9:36 ` Greg KH
2020-04-23 20:40 ` [PATCH 4.4 06/16] clk: Fix debugfs_create_*() usage Lee Jones
2020-05-13 9:37 ` Greg KH
2020-05-18 10:08 ` Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 07/16] arm64: traps: Don't print stack or raw PC/LR values in backtraces Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 08/16] serial/sunsu: add missing of_node_put() Lee Jones
2020-05-06 8:23 ` Greg Kroah-Hartman
2020-05-06 9:02 ` Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 09/16] wil6210: increase firmware ready timeout Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 10/16] wil6210: fix temperature debugfs Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 11/16] scsi: ufs: ufs-qcom: remove broken hci version quirk Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 12/16] wil6210: rate limit wil_rx_refill error Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 13/16] rtc: pm8xxx: Fix issue in RTC write path Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 14/16] soc: qcom: smem: Use le32_to_cpu for comparison Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 15/16] of: fix missing kobject init for !SYSFS && OF_DYNAMIC config Lee Jones
2020-04-23 20:40 ` [PATCH 4.4 16/16] mm/vmalloc.c: move 'area->pages' after if statement Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200518102353.GR271301@dell \
--to=lee.jones@linaro.org \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).