Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp603311pxu; Wed, 14 Oct 2020 09:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVGDWsNs2WKOcPOngT76trIMDMjnc6FN5LTL2n2YhwuPh21QkhKWftDRb0Q25fiStjHPYG X-Received: by 2002:a19:3f52:: with SMTP id m79mr22290lfa.58.1602691491851; Wed, 14 Oct 2020 09:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602691491; cv=none; d=google.com; s=arc-20160816; b=dpjd6F10nxTn3kUg9II0+3x60Me6HhjvfljKwysSCC/u7LUcJaZXfdEvypna+13Os4 oOPLjdoiwvQVTh1ncSwb0eh9LlwNZ9sZ36Q4yQMWfIpBzXf8sIGV/RHOD4iqpuSw3esq hk6QfsphhsSRgLbWAHHBaqXecBYHB7tfAqB/2ENtKzgXRE2+E0eBUSA0H9cRsI25UvzI xTpzfZ8SMx5fbxmY4F0cbC7SuuV1MyD+6b/4v0xRPQHFSgEvOcE/zRxD4/Y6vzxcHtm1 cRv4TLGKfDp4GQdnQF1OL07/0/HIJy+0cMVYIMeNOJ9yEZVuKBQk9tJFoj3XKb3kAKgI p9Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :date:cc:to:from:subject:message-id; bh=MCZad4sptKkUd6xQGq6qaq572zouat94NCeqhJOzUpE=; b=OHCW+omI3rmU6u07zB2MzN8rMkERQPRzhJdoLa0STIauV9R7LNb+Ju6IBztLE/c3BU huADQ2pmyRrMFD1QtOOgrtATRLEqYNHFyGwaePZbmf7gPJ906lu4yHqjENt/xW97l/RN K4rqmqC6NaJdHnjfuhBgqKESVPtn5kGwA1cyiFS4XqwRo1Bhg6jO5i/y4oIhUfGbRMKy 3z9m93Ub5/lD3ZHnmrlq6yiHKzCJSnvJ6Vq1Wka8ii7t/MI+sz8GqHJuHTiJstsfsgVN 6QprgPqWx4KBzJC9z/4NUma4i9AlbM3Nrnf9TkFAfSvzIAPgeARZuPgSDkdl+rM2WaAP 4RUw== 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 l11si47900ejx.564.2020.10.14.09.03.59; Wed, 14 Oct 2020 09:04:51 -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 S1730757AbgJNLev (ORCPT + 99 others); Wed, 14 Oct 2020 07:34:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:50702 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730717AbgJNLev (ORCPT ); Wed, 14 Oct 2020 07:34:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E2D19ADCC; Wed, 14 Oct 2020 11:34:48 +0000 (UTC) Message-ID: <3023eb53ffd2afd8c6c0755af825e426e109cbc2.camel@suse.de> Subject: Re: [PATCH v2 2/5] of/address: Introduce of_dma_lower_bus_limit() From: Nicolas Saenz Julienne To: Ard Biesheuvel Cc: Rob Herring , Catalin Marinas , Christoph Hellwig , Linux Kernel Mailing List , Frank Rowand , Robin Murphy , Linux ARM , linux-rpi-kernel@lists.infradead.org, Jeremy Linton , iommu@lists.linux-foundation.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Date: Wed, 14 Oct 2020 13:34:47 +0200 In-Reply-To: References: <20201010151235.20585-1-nsaenzjulienne@suse.de> <20201010151235.20585-3-nsaenzjulienne@suse.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-3FpJRYmVjKizmPf2oMLX" User-Agent: Evolution 3.36.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-3FpJRYmVjKizmPf2oMLX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 2020-10-11 at 09:47 +0200, Ard Biesheuvel wrote: > Hi Nicolas, >=20 > $SUBJECT is out of sync with the patch below. Also, for legibility, it > helps if the commit log is intelligible by itself, rather than relying > on $SUBJECT being the first line of the first paragraph. Noted, I'll update all commit logs. > On Sat, 10 Oct 2020 at 17:12, Nicolas Saenz Julienne > wrote: > > The function provides the CPU physical address addressable by the most > > constrained bus in the system. It might be useful in order to > > dynamically set up memory zones during boot. > >=20 > > Signed-off-by: Nicolas Saenz Julienne > > --- > > drivers/of/address.c | 34 ++++++++++++++++++++++++++++++++++ > > include/linux/of.h | 7 +++++++ > > 2 files changed, 41 insertions(+) > >=20 > > diff --git a/drivers/of/address.c b/drivers/of/address.c > > index eb9ab4f1e80b..755e97b65096 100644 > > --- a/drivers/of/address.c > > +++ b/drivers/of/address.c > > @@ -1024,6 +1024,40 @@ int of_dma_get_range(struct device_node *np, con= st struct bus_dma_region **map) > > } > > #endif /* CONFIG_HAS_DMA */ > >=20 > > +/** > > + * of_dma_safe_phys_limit - Get system wide DMA safe address space > > + * > > + * Gets the CPU physical address limit for safe DMA addressing system = wide by > > + * searching for the most constraining dma-range. Otherwise it returns= ~0ULL. > > + */ > > +u64 __init of_dma_safe_phys_limit(void) >=20 > I don't think 'safe' strikes the right tone here. You are looking for > the highest CPU address that is addressable by all DMA masters in the > system. >=20 > Something like >=20 > of_dma_get_max_cpu_address(void) >=20 > perhaps? Also, since this is generic code, phys_addr_t is probably a > better type to return. Sonds good to me, I dindn't like the name I used either. Will use with phys_addr_t. Regards, Nicolas --=-3FpJRYmVjKizmPf2oMLX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl+G4lcACgkQlfZmHno8 x/4+2Qf9GAEy2PCZfqL+CKXSci2Q9BU2ykIHZgeZZn6AKWxXV1hrFjie5271Jnmr ivJ/+EIhJoKSrjOPHETRjSc8vVjYIrZsdJPZjHgiGd7VTCnrER1elr6bUeN0r/LK 4Pk4htI6qYa+qm1olPEV1uG3ZzTFx+STdQnXnDl3CizOdzlSkitgos1bjylAmCVU UzyQrqA5JQnlmM0DxoJj7gq9DeDpV85cjfngrW6Iq0KJP1iM1NflNW5hMHcL6k/m a/ykOok8q2IgO4Sv0I2mCn2T/eDieQxGA/ksRjyqwPdbGLTAULFURU01xD2DJsj3 Jj5PawT49NznUrRDddcdpBtXBJ0CKQ== =O9H3 -----END PGP SIGNATURE----- --=-3FpJRYmVjKizmPf2oMLX--