Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1346976ybp; Thu, 17 Oct 2019 11:23:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVyeQUg4O74IGwBkeOHRiPWIdhVn0ONqjnQla+YkbMFCEitNU98c5bDzdSxR17p+2GjpSJ X-Received: by 2002:aa7:dc47:: with SMTP id g7mr5252372edu.153.1571336629310; Thu, 17 Oct 2019 11:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571336629; cv=none; d=google.com; s=arc-20160816; b=GQdrp1rx6Ykmwzj+Cwn32BwfRcgNcUpRd3Ot3VcyVMoz7oyeggM9Raos+pbq/ufXoY FTehQcRhG9cJM7ujYpPn7ExKf2ucsGgMmLxPZ0g2yjdFO0a3cIGriHbIddu0fJrn3glu //6sIgYlUlsn2SujzeWeRDqGdA5WPO3bU1v3WLKznp3xiElALhWwcPzLMpY0qqA8nMoK C6uykZXUMJYeplH5NJ/K239YPiJOPgCWKU3pfli6bvd7JwlLxdjp+9T0HC5SwzmeuBpA Y9dRn4PfwuTNijw1zh8vsNmiuE+xhQzXJ1GV10yJJpntarJYlcTNGzS08Jcd8u2m2Els TjVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QrBlDjOTvx9nSdvWL09BsaWhLVYt9kbqaOebphGXvO4=; b=JfpPRfwqxboDL3PgdllBmTn15Hlm8rL1ZA63FdtOOfdEhP0gCjWj3BrjhgG7V8ievp Lo6536bAd+qp0hf7LTcfJhL42j8t+lHk3s2j9AMDxwCernC2OCVv+bvJl50vIm7jd9nH VKN51Kft5HaAvdxreeAVmJEAtxvw+LXFsb3tf2CJ+8quyVom0Rbk3gPgB2f+jODiZPHN wsVAeYQB0D8o37degFMPGXSxqTwUz4h5zfRlJ+I3wDgtBkIWXD7Vhca6rjcD6zk/dMLq 8Vyr/R5d0pOBWawP0K0SqMWzAlLv216fjHMvXqhIFl/YZIL8D5h7zcGS7zyxImG//X1o oIzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qHFNvpQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si1872792eje.336.2019.10.17.11.23.26; Thu, 17 Oct 2019 11:23:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qHFNvpQl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404429AbfJPWCy (ORCPT + 99 others); Wed, 16 Oct 2019 18:02:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:54478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438543AbfJPV7d (ORCPT ); Wed, 16 Oct 2019 17:59:33 -0400 Received: from localhost (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03406218DE; Wed, 16 Oct 2019 21:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263173; bh=PnK/FwqO/xgaKpMwhmCootWXP5GSiD5o327VEuPnSAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qHFNvpQl0Xmm6cmfnhcZoRXg2epyLfudGHEZxOMnOS9s02AkbYCxvbNgLcxsdf7vs vesviiiGKWgzdNtVbzvxgEs95EsoRa667Wz0WC8p73it3acvw63hfnI4kKwJoKvc30 +v11HueMIXWvXCpq3IigePQDZS/KnP4h6Dv4PoBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rob Clark , Fabio Estevam Subject: [PATCH 5.3 100/112] drm/msm: Use the correct dma_sync calls harder Date: Wed, 16 Oct 2019 14:51:32 -0700 Message-Id: <20191016214906.445819351@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Clark commit 9f614197c744002f9968e82c649fdf7fe778e1e7 upstream. Looks like the dma_sync calls don't do what we want on armv7 either. Fixes: Unable to handle kernel paging request at virtual address 50001000 pgd = (ptrval) [50001000] *pgd=00000000 Internal error: Oops: 805 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.3.0-rc6-00271-g9f159ae07f07 #4 Hardware name: Freescale i.MX53 (Device Tree Support) PC is at v7_dma_clean_range+0x20/0x38 LR is at __dma_page_cpu_to_dev+0x28/0x90 pc : [] lr : [] psr: 20000013 sp : d80b5a88 ip : de96c000 fp : d840ce6c r10: 00000000 r9 : 00000001 r8 : d843e010 r7 : 00000000 r6 : 00008000 r5 : ddb6c000 r4 : 00000000 r3 : 0000003f r2 : 00000040 r1 : 50008000 r0 : 50001000 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 70004019 DAC: 00000051 Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) Signed-off-by: Rob Clark Fixes: 3de433c5b38a ("drm/msm: Use the correct dma_sync calls in msm_gem") Tested-by: Fabio Estevam Signed-off-by: Fabio Estevam Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/msm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -50,7 +50,7 @@ static void sync_for_device(struct msm_g { struct device *dev = msm_obj->base.dev->dev; - if (get_dma_ops(dev)) { + if (get_dma_ops(dev) && IS_ENABLED(CONFIG_ARM64)) { dma_sync_sg_for_device(dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); } else { @@ -63,7 +63,7 @@ static void sync_for_cpu(struct msm_gem_ { struct device *dev = msm_obj->base.dev->dev; - if (get_dma_ops(dev)) { + if (get_dma_ops(dev) && IS_ENABLED(CONFIG_ARM64)) { dma_sync_sg_for_cpu(dev, msm_obj->sgt->sgl, msm_obj->sgt->nents, DMA_BIDIRECTIONAL); } else {