MLK-21222 rpmsg: imx: fix kernel dump when initialize the vring memory
authorRichard Zhu <hongxing.zhu@nxp.com>
Fri, 22 Mar 2019 03:22:20 +0000 (11:22 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
The fix had been contained in commit "b7098fc4" MLK-16371-2 rpmsg: imx:
add the rpmsg for imx8qxp on imx_4.14.y branch.
But part of that patch is missed. Merge the solution back to imx_4.19.y
branch.
Use memset_io replace memset, because that the memory type of
rpvq->addr is strong order type. There would be kernel dump when memset
is used on imx8qxp.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
drivers/rpmsg/imx_rpmsg.c

index 56e7d8b..9dfb498 100644 (file)
@@ -248,7 +248,7 @@ static struct virtqueue *rp_find_vq(struct virtio_device *vdev,
                goto free_rpvq;
        }
 
-       memset(rpvq->addr, 0, RPMSG_RING_SIZE);
+       memset_io(rpvq->addr, 0, RPMSG_RING_SIZE);
 
        pr_debug("vring%d: phys 0x%x, virt 0x%p\n", index, virdev->vring[index],
                                        rpvq->addr);