Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2565801pxj; Mon, 14 Jun 2021 01:37:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkRKcKXDHkh/p4VK+KZ/cn3ecRP0ZHjnwijkqQRTisGzCVSmAaCgb5bs/F0Lr1bn9FEmxs X-Received: by 2002:a17:906:b855:: with SMTP id ga21mr14249767ejb.550.1623659853351; Mon, 14 Jun 2021 01:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623659853; cv=none; d=google.com; s=arc-20160816; b=kKRMzFz/xVmXmXV2j1OsZFWkCb9ipw6QTPFhN15uAwg/tKe0tnUU+MsWdFoVKTVsuY bsD90DBTnF0JdzEagTOUsvHARyqHZ4QqSn0BOO6sDZ1guw8D/j7ndjprgK40tWGLUtKP FqvV7CpO0ehu/QGi3W0seabie0FoEFB0VPtvBoQMKG0EWJ/L84KbaJvS84g3gWfLXN+d NI3WX9rFbtKszOAkw2d/rV9amh0/jLJVoDxwXGWHqhW9fkiMTiQpp9LJJUYXvJGh2H3r OXr0Tg33Vlz+zIA3tolj1jcy+nOF7CDxR3tIT3GYl/W41iRwKluefjJUYgbKAcNGSBy0 kkDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=J96kZrCGyrmJFJyRpMaFkFS4KRLuWrkV4JH8iJi0J7A=; b=dduYiNsRgqjiqxFCBLYDSqHevsiZpVVPIXHnNKCn2Rmv42w8RhRC5B+8e738i9TmKX ytigaKC2iH/c6ArktBfGGkICYRfqARnA3MkC+V/bovtM2dCLMYg0Z5jg1GYD+HCP08mG zbdMmhK2EkjlNfhO25rJ+pVQC23XOEYoKv42/PZ8+KuOvJ3ORoyAsfJTvRRO4vV3PEDR E35PFeiYChRa+JfkThUo2kfXU7HtYEehihZEmgtX338NTeKZTWxiqe2QEQKrS4LS/L6b CXcG8moo41N1fy2JD2+a1J2tOBgOiuMLzPfNLKnBbUYrT9w320/GbMGfcmraawNXwmsz U+oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GdF8d7Nc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si11043256eds.353.2021.06.14.01.37.09; Mon, 14 Jun 2021 01:37:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GdF8d7Nc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232591AbhFNIiU (ORCPT + 99 others); Mon, 14 Jun 2021 04:38:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:43664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbhFNIiR (ORCPT ); Mon, 14 Jun 2021 04:38:17 -0400 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210611131056.3731084-1-aisheng.dong@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >