Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2835739pxb; Tue, 21 Sep 2021 08:40:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJych13aKcQRk5dIAkdLWBn6voBEfWCrwRXZVwmeAlzRWJrblfjkHt4MxPywLFffGIDr/Bmd X-Received: by 2002:a17:906:7145:: with SMTP id z5mr26998935ejj.363.1632238819581; Tue, 21 Sep 2021 08:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632238819; cv=none; d=google.com; s=arc-20160816; b=ojRtjbT0npyMXIjQh25m8RMsOlQlSKD/zjqr3y1gn0/tfOMIOjeo4NiFeyoUPymLPW 1ql0spDWCAs5+nhGVOVLtHfcCWwTTB3NEL1QDN9hBucvvlA6zySuZKPU9XfI6LP4Twq9 0XBdwJSqRLdyyLE1cQa9dHYCW3kPX7HbfNUACwat4ByMTSzVanbnk7dVHEcnlTKAjsSp LYDcMS0ptvz8FuPwaSxm5DPPjz4uS+UXNB9KF4R2JV+RWVNfifDZ7lYZWwSv6GRs9s4i oDgkXN6dZn2tMALb8TbMzkY0jVwfOnJhQ2btNENMmUbKiWcYrviKfer2ZiKCEQ+9xpOZ 1obA== 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; bh=CLcGm6slvm+zO0EXodhMoMrLyeKSxEK0TZlDrkPM9+M=; b=yyz0u9xbAEtJZi5x1pM0o5+fDn5Hqh+OJ1nAiojWDJ+O2mfEjac3Sr5x8zRMzs/ZSI wmS1ILet4YpkHms6gMPdDYK6mu0NT1sUv1FmEU+n+y6ILN4uCbZlFCoYCpeGMVRU0Ui5 2BrWSkPgBx2t/HUke/RkkvWtM8poEoWFZw70G3BQUoI0C+hK2Nbi5LFjDmynoN+DwPBI lzX4TkdI6k3yQC0yG0J+9lx5qtcvBors/c7IcIMxF0/Cn3zw3hxk05CYocROLZJSVdpv O0/Asejyx8Akpn0465t1clskJRqjimtGbv8AMOzOPSknDRmknIji52KOjUjwGZZXo+Az VXLw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si5956262edi.516.2021.09.21.08.39.54; Tue, 21 Sep 2021 08:40:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234150AbhIUPjl (ORCPT + 99 others); Tue, 21 Sep 2021 11:39:41 -0400 Received: from verein.lst.de ([213.95.11.211]:56744 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234078AbhIUPji (ORCPT ); Tue, 21 Sep 2021 11:39:38 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 620AF67373; Tue, 21 Sep 2021 17:38:05 +0200 (CEST) Date: Tue, 21 Sep 2021 17:38:05 +0200 From: Christoph Hellwig To: Mike Rapoport Cc: Christoph Hellwig , Catalin Marinas , David Hildenbrand , Robin Murphy , Alex Bee , Will Deacon , Andrew Morton , Anshuman Khandual , Linux Kernel Mailing List , linux-mm@kvack.org, Linux ARM Subject: Re: [BUG 5.14] arm64/mm: dma memory mapping fails (in some cases) Message-ID: <20210921153805.GA29952@lst.de> References: <0908ce39-7e30-91fa-68ef-11620f9596ae@arm.com> <60a11eba-2910-3b5f-ef96-97d4556c1596@redhat.com> <20210825102044.GA3420@arm.com> <20210918051843.GA16104@lst.de> <20210921082007.GA29121@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 12:34:10PM +0300, Mike Rapoport wrote: > > It doesn't create any new mappings. The only real issue is that it > > does the wrong thing for RAM in a way that might not be noticed on > > simple (x86/PC) platforms. > > But if the mapping request was rejected by devm_ioremap_resource() because > of an attempt to map RAM, why we would get to dma_map_resource() at all? dma_map_resource takes a phys_addr_t that could come from anywhere.