From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9637DC48BE8 for ; Mon, 14 Jun 2021 08:38:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 509BE61370 for ; Mon, 14 Jun 2021 08:38:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 509BE61370 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TL5O5VQTIHfRdD+m8E1X6Rxn3p39yZjaj0hvnfV+xjk=; b=uNjRQ9PzwHwcII C/1zHHFLwiwquW6JqrrhTXFq3XKoIxqlHxo0sJl+VI7xXx1ddS8ZaTOrCh4+dLwjOiKT/EoDQuwGL O2vjUxljMQcbu6IeKEYXu7HwJLi7vvkFrKzMIpYmeopj0VD/KWPM6GS6sDXdX1mbRpnq8BzKuxber 57w9MAD/H8aaa8RXuZ5bNCtUcSh7LpvU1yB/i+Xuo96ea4Jkge7PhHwLSk4YzD8n39Q8DWjA6OB0V SkpOm3Ql+JuQWpnWm3eX6VI0NPAA4ECLq94s+EWPXji0zRlFr+6qqffAXQn+DLlE3NW78RH7NYNhM zyvZFeftqdN6eobBI7SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsi4x-00D7FQ-Lz; Mon, 14 Jun 2021 08:36:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lsi4u-00D7Eo-1D for linux-arm-kernel@lists.infradead.org; Mon, 14 Jun 2021 08:36:17 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id A8F7461370; Mon, 14 Jun 2021 08:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623659775; bh=gAds2DSRUgeIv4sXDXp+KcQsXS8BItWPveSU8A0iVNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GdF8d7Nc73ERCj4tKtd+EKrDaEZ8yJ+F4aspVmBPc26cxK39nB+ihm0IMhEfiv/TU 1gVxIUDZ/DHzr4FI1RPcTRHYoY/RdE97a/vpCp2MAIcs554WO1B2fK1X0ubBbDt6Ug bqh/0hJVYLgGtx8gxV9sFUCXus7xfic8wZey1N0mya/hfKuuydHhT7oZTdqQXSwhK3 3s4Y9E3px/QQPetqjhsFsJ/RVtYbfjLAqvQIoOYAA+wiNOQwAiDkiIyP848beGgwhB TTwaL3jiAdcG+02kBU6O5ItNZ7b77cipnHWwE25PPy7w304pYBubjq75QeXYFaT6cw jjy9xl4KgeLug== Date: Mon, 14 Jun 2021 09:36:10 +0100 From: Will Deacon To: Dong Aisheng Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, dongas86@gmail.com, linux-arm-kernel@lists.infradead.org, Christoph Hellwig , Marek Szyprowski , Robin Murphy , catalin.marinas@arm.com Subject: Re: [PATCH 1/1] dma: coherent: check no-map property for arm64 Message-ID: <20210614083609.GA18701@willie-the-truck> References: <20210611131056.3731084-1-aisheng.dong@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210611131056.3731084-1-aisheng.dong@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210614_013616_122880_11EA9B81 X-CRM114-Status: GOOD ( 17.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [+Catalin] On Fri, Jun 11, 2021 at 09:10:56PM +0800, Dong Aisheng wrote: > Coherent dma on ARM64 also can't work with mapped system ram, > that means 'no-map' property must be specified in dts. > Add the missing check for ARM64 platforms as well. > Besides 'no-map' checking, 'linux,dma-default' feature is also > enabled for ARM64 along with this patch. Please can you explain _why_ it can't work? We don't need to tear down aliases from the linear map for the streaming DMA API, so why is this case different? Also, coherent devices wouldn't need this either way, would they? What problem are you solving here? Thanks, Will > > Cc: Christoph Hellwig > Cc: Marek Szyprowski > Cc: Robin Murphy > Signed-off-by: Dong Aisheng > --- > kernel/dma/coherent.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c > index 5b5b6c7ec7f2..d1831da7afba 100644 > --- a/kernel/dma/coherent.c > +++ b/kernel/dma/coherent.c > @@ -356,7 +356,7 @@ static int __init rmem_dma_setup(struct reserved_mem *rmem) > if (of_get_flat_dt_prop(node, "reusable", NULL)) > return -EINVAL; > > -#ifdef CONFIG_ARM > +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) > if (!of_get_flat_dt_prop(node, "no-map", NULL)) { > pr_err("Reserved memory: regions without no-map are not yet supported\n"); > return -EINVAL; > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel