From: Greg KH <gregkh@linuxfoundation.org>
To: nobuhiro1.iwamatsu@toshiba.co.jp
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
sboyd@kernel.org, swboyd@chromium.org, jcrouse@codeaurora.org,
robdclark@chromium.org, seanpaul@chromium.org,
lee.jones@linaro.org
Subject: Re: [PATCH 4.19 50/54] drm/msm: stop abusing dma_map/unmap for cache
Date: Mon, 13 Apr 2020 10:21:37 +0200 [thread overview]
Message-ID: <20200413082137.GB2792388@kroah.com> (raw)
In-Reply-To: <OSAPR01MB366788E02572D95F246D6DEC92DD0@OSAPR01MB3667.jpnprd01.prod.outlook.com>
On Mon, Apr 13, 2020 at 05:03:26AM +0000, nobuhiro1.iwamatsu@toshiba.co.jp wrote:
> Hi,
>
> > -----Original Message-----
> > From: stable-owner@vger.kernel.org [mailto:stable-owner@vger.kernel.org] On Behalf Of Greg Kroah-Hartman
> > Sent: Saturday, April 11, 2020 9:10 PM
> > To: linux-kernel@vger.kernel.org
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; stable@vger.kernel.org; Stephen Boyd <sboyd@kernel.org>; Stephen
> > Boyd <swboyd@chromium.org>; Jordan Crouse <jcrouse@codeaurora.org>; Rob Clark <robdclark@chromium.org>; Sean Paul
> > <seanpaul@chromium.org>; Lee Jones <lee.jones@linaro.org>
> > Subject: [PATCH 4.19 50/54] drm/msm: stop abusing dma_map/unmap for cache
> >
> > From: Rob Clark <robdclark@chromium.org>
> >
> > commit 0036bc73ccbe7e600a3468bf8e8879b122252274 upstream.
> >
> > 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>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> This commit also requires the following commits:
>
> commit 3de433c5b38af49a5fc7602721e2ab5d39f1e69c
> Author: Rob Clark <robdclark@chromium.org>
> Date: Tue Jul 30 14:46:28 2019 -0700
>
> drm/msm: Use the correct dma_sync calls in msm_gem
>
> [subject was: drm/msm: shake fist angrily at dma-mapping]
>
> So, using dma_sync_* for our cache needs works out w/ dma iommu ops, but
> it falls appart with dma direct ops. The problem is that, depending on
> display generation, we can have either set of dma ops (mdp4 and dpu have
> iommu wired to mdss node, which maps to toplevel drm device, but mdp5
> has iommu wired up to the mdp sub-node within mdss).
>
> Fixes this splat on mdp5 devices:
>
> Unable to handle kernel paging request at virtual address ffffffff80000000
> Mem abort info:
> ESR = 0x96000144
> Exception class = DABT (current EL), IL = 32 bits
> SET = 0, FnV = 0
> EA = 0, S1PTW = 0
> Data abort info:
> ISV = 0, ISS = 0x00000144
> CM = 1, WnR = 1
> swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000810e4000
> [ffffffff80000000] pgd=0000000000000000
> Internal error: Oops: 96000144 [#1] SMP
> Modules linked in: btqcomsmd btqca bluetooth cfg80211 ecdh_generic ecc rfkill libarc4 panel_simple msm wcnss_ctrl qrtr_smd drm_kms_helper venus_enc venus_dec videobuf2_dma_sg videobuf2_memops drm venus_core ipv6 qrtr qcom_wcnss_pil v4l2_mem2mem qcom_sysmon videobuf2_v4l2 qmi_helpers videobuf2_common crct10dif_ce mdt_loader qcom_common videodev qcom_glink_smem remoteproc bmc150_accel_i2c bmc150_magn_i2c bmc150_accel_core bmc150_magn snd_soc_lpass_apq8016 snd_soc_msm8916_analog mms114 mc nf_defrag_ipv6 snd_soc_lpass_cpu snd_soc_apq8016_sbc industrialio_triggered_buffer kfifo_buf snd_soc_lpass_platform snd_soc_msm8916_digital drm_panel_orientation_quirks
> CPU: 2 PID: 33 Comm: kworker/2:1 Not tainted 5.3.0-rc2 #1
> Hardware name: Samsung Galaxy A5U (EUR) (DT)
> Workqueue: events deferred_probe_work_func
> pstate: 80000005 (Nzcv daif -PAN -UAO)
> pc : __clean_dcache_area_poc+0x20/0x38
> lr : arch_sync_dma_for_device+0x28/0x30
> sp : ffff0000115736a0
> x29: ffff0000115736a0 x28: 0000000000000001
> x27: ffff800074830800 x26: ffff000011478000
> x25: 0000000000000000 x24: 0000000000000001
> x23: ffff000011478a98 x22: ffff800009fd1c10
> x21: 0000000000000001 x20: ffff800075ad0a00
> x19: 0000000000000000 x18: ffff0000112b2000
> x17: 0000000000000000 x16: 0000000000000000
> x15: 00000000fffffff0 x14: ffff000011455d70
> x13: 0000000000000000 x12: 0000000000000028
> x11: 0000000000000001 x10: ffff00001106c000
> x9 : ffff7e0001d6b380 x8 : 0000000000001000
> x7 : ffff7e0001d6b380 x6 : ffff7e0001d6b382
> x5 : 0000000000000000 x4 : 0000000000001000
> x3 : 000000000000003f x2 : 0000000000000040
> x1 : ffffffff80001000 x0 : ffffffff80000000
> Call trace:
> __clean_dcache_area_poc+0x20/0x38
> dma_direct_sync_sg_for_device+0xb8/0xe8
> get_pages+0x22c/0x250 [msm]
> msm_gem_get_and_pin_iova+0xdc/0x168 [msm]
> ...
>
> Fixes the combination of two patches:
>
> Fixes: 0036bc73ccbe (drm/msm: stop abusing dma_map/unmap for cache)
> Fixes: 449fa54d6815 (dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device)
> Tested-by: Stephan Gerhold <stephan@gerhold.net>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> [seanpaul changed subject to something more desriptive]
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> Link: https://patchwork.freedesktop.org/patch/msgid/20190730214633.17820-1-robdclark@gmail.com
>
>
> And this commit requires not only 4.19 but also 4.9 and 4.14.
> Please apply this.
Now queued up, thanks!
greg k-h
next prev parent reply other threads:[~2020-04-13 8:21 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 12:08 [PATCH 4.19 00/54] 4.19.115-rc1 review Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 01/54] ipv4: fix a RCU-list lock in fib_triestat_seq_show Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 02/54] net, ip_tunnel: fix interface lookup with no key Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 03/54] sctp: fix refcount bug in sctp_wfree Greg Kroah-Hartman
2020-04-11 18:28 ` Pavel Machek
2020-04-11 18:42 ` Marcelo Ricardo Leitner
2020-04-11 12:08 ` [PATCH 4.19 04/54] sctp: fix possibly using a bad saddr with a given dst Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 05/54] nvme-rdma: Avoid double freeing of async event data Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 06/54] drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017 Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 07/54] drm/bochs: downgrade pci_request_region failure from error to warning Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 08/54] initramfs: restore default compression behavior Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 09/54] drm/amdgpu: fix typo for vcn1 idle check Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 10/54] tools/power turbostat: Fix gcc build warnings Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 11/54] tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 12/54] drm/etnaviv: replace MMU flush marker with flush sequence Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 13/54] media: rc: IR signal for Panasonic air conditioner too long Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 14/54] misc: rtsx: set correct pcr_ops for rts522A Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 15/54] misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 16/54] misc: pci_endpoint_test: Avoid using module parameter to determine irqtype Greg Kroah-Hartman
2020-04-11 12:08 ` [PATCH 4.19 17/54] coresight: do not use the BIT() macro in the UAPI header Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 18/54] mei: me: add cedar fork device ids Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 19/54] extcon: axp288: Add wakeup support Greg Kroah-Hartman
2020-04-12 20:31 ` Pavel Machek
2020-04-11 12:09 ` [PATCH 4.19 20/54] power: supply: axp288_charger: Add special handling for HP Pavilion x2 10 Greg Kroah-Hartman
2020-04-12 20:46 ` Pavel Machek
2020-04-11 12:09 ` [PATCH 4.19 21/54] ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 22/54] rxrpc: Fix sendmsg(MSG_WAITALL) handling Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 23/54] net: Fix Tx hash bound checking Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 24/54] padata: always acquire cpu_hotplug_lock before pinst->lock Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 25/54] bitops: protect variables in set_mask_bits() macro Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 26/54] include/linux/notifier.h: SRCU: fix ctags Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 27/54] mm: mempolicy: require at least one nodeid for MPOL_PREFERRED Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 28/54] ipv6: dont auto-add link-local address to lag ports Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 29/54] net: dsa: bcm_sf2: Do not register slave MDIO bus with OF Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 30/54] net: dsa: bcm_sf2: Ensure correct sub-node is parsed Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 31/54] net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 32/54] net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 33/54] slcan: Dont transmit uninitialized stack data in padding Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 34/54] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 35/54] random: always use batched entropy for get_random_u{32,64} Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 36/54] usb: dwc3: gadget: Wrap around when skip TRBs Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 37/54] tools/accounting/getdelays.c: fix netlink attribute length Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 38/54] hwrng: imx-rngc - fix an error path Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 39/54] ASoC: jz4740-i2s: Fix divider written at incorrect offset in register Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 40/54] IB/hfi1: Call kobject_put() when kobject_init_and_add() fails Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 41/54] IB/hfi1: Fix memory leaks in sysfs registration and unregistration Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 42/54] ceph: remove the extra slashes in the server path Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 43/54] ceph: canonicalize server path in place Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 44/54] RDMA/ucma: Put a lock around every call to the rdma_cm layer Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 45/54] RDMA/cma: Teach lockdep about the order of rtnl and lock Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 46/54] Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 47/54] RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 48/54] fbcon: fix null-ptr-deref in fbcon_switch Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 49/54] clk: qcom: rcg: Return failure for RCG update Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 50/54] drm/msm: stop abusing dma_map/unmap for cache Greg Kroah-Hartman
2020-04-13 5:03 ` nobuhiro1.iwamatsu
2020-04-13 8:21 ` Greg KH [this message]
2020-04-22 20:24 ` Naresh Kamboju
2020-04-22 23:32 ` nobuhiro1.iwamatsu
2020-05-26 14:33 ` Naresh Kamboju
2020-05-27 20:33 ` Rob Clark
2020-04-11 12:09 ` [PATCH 4.19 51/54] arm64: Fix size of __early_cpu_boot_status Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 52/54] rpmsg: glink: Remove chunk size word align warning Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 53/54] usb: dwc3: dont set gadget->is_otg flag Greg Kroah-Hartman
2020-04-11 12:09 ` [PATCH 4.19 54/54] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Greg Kroah-Hartman
2020-04-11 20:39 ` [PATCH 4.19 00/54] 4.19.115-rc1 review Guenter Roeck
2020-04-12 8:38 ` Naresh Kamboju
2020-04-13 19:42 ` Chris Paterson
2020-04-14 8:20 ` Greg Kroah-Hartman
2020-04-14 10:36 ` Jon Hunter
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=20200413082137.GB2792388@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jcrouse@codeaurora.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=robdclark@chromium.org \
--cc=sboyd@kernel.org \
--cc=seanpaul@chromium.org \
--cc=stable@vger.kernel.org \
--cc=swboyd@chromium.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
all inboxes | Powered by JetHome®