Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3954862pxj; Tue, 15 Jun 2021 12:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGddkcOfKdIYvyBiTAaHtuVQ2tKClqun2ntbJWhYbjiOyxU+iVmm78WHk7GjUAC/zzedMT X-Received: by 2002:a17:906:9715:: with SMTP id k21mr1157263ejx.553.1623784243997; Tue, 15 Jun 2021 12:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623784243; cv=none; d=google.com; s=arc-20160816; b=CUQkm38AWQO8/5/Nt2c7B+4+PxwNBkSMITzcHkLNINPmaxOa/vs6EoAKeovGoLdjka 7ojzSlOycnLwjQjWzW74rz0Nwv5138sM/WMz8El17KEvXvIe8Cj453rfwS1p4Y4BJLFc khq4Qa1UzqIlX0BnV/OGucvV1fuX5VZom+M/tNzOvoqlkCm9K8huKBPN0iwLElwWmRZo ovqAsBMqFHc8DVrnczKDk6JExDhDU/2Q0F9t0UD2Hhkbp+Wq6kkYOza3+GUK++wqJWHC noM+ESIo/2ywzh0Ere4Qmi+aoRDuYCBvTiyPIyQGeWw36tn3dl9AudMFH/N+W5iIY5jc hOrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=ae2/0o2p9fobjBqxoALkWF9ywdZR2o4+z7dG1T9hhvE=; b=qdkmS20mwkV9GXrMNBTL1zN1iHqlSurYVlBiKEIJKuUOe03xEjTQtIDPP7OR901HBB zX16PQ8M8MPYZy4J2LsREm7bCCRlxtmiLUg61ufA8p4fOeDHU4W7e9eKktmlEYF55Kox w4wrbZec8oDyDR7LS8b/1A0SIFKrMJFqeiHIsLB9yyvb6nMeHunjOgaap69s4o5oOhOG g0nfTJpf5SUPJk1aK2Bs0iD8tVa20htvIRmVdnFJfaUNq3c7sn7OW89A5DNCteZzAuYC xfY0o+d0Mn9LBXr/tfvVkJi8S5qNPopovesnRMWkTkluPnfZdYegsazgd3K1GzSXPEJZ PNRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=moY+w+3z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 19si16229747edw.341.2021.06.15.12.10.20; Tue, 15 Jun 2021 12:10:43 -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=@gmail.com header.s=20161025 header.b=moY+w+3z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231320AbhFOTKK (ORCPT + 99 others); Tue, 15 Jun 2021 15:10:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbhFOTKI (ORCPT ); Tue, 15 Jun 2021 15:10:08 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EE94C061574 for ; Tue, 15 Jun 2021 12:08:03 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id k6so156237pfk.12 for ; Tue, 15 Jun 2021 12:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ae2/0o2p9fobjBqxoALkWF9ywdZR2o4+z7dG1T9hhvE=; b=moY+w+3zlJRsSka3cuNrk2elDxNyX22Y35XGmV3sRiUREDA6f+mUH5aAMNsLGxeBXK cyWH9PFKzteJ+Jaa4tfHvtwKk9LwZR2mCKQflJtVinv54C55HPdUYiaRE0/an29biLPY pSqOoLvNqmzsbrdrl4WBEmVM4jgTzvr2GPLhWb3D1vPm244t267/9iqSVzIdGthF9vw7 ljBcEkhs9E/L1/rHlZGe30WNqszF91HgJg9hZVFyeJXZVs00FS95FhJRkXwxPb3GSNej mdVVeuAfiA4DqpLsx1YOn/+OuxbgvIvGnXeTaegW6oaC/uJhOiA4korg2mf/ZLB0yvVS E0TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ae2/0o2p9fobjBqxoALkWF9ywdZR2o4+z7dG1T9hhvE=; b=iGer+RScYKFTPmBPN6yQeZRDTWq1eu0vE7gCmi5QLGG9dCIhRZQFCleYRDRspnTxP3 tpwPoeacsLQJsDr3hC7I11764eTYUsWmLAlytvtwGARHdOYGUa0sCS7tpuNiaUJVH94H BcuE6HBPDIoaLz4lLUrQR2rCPninj07413F4R0AbX0WxuehSKOlKyOE86WKl8o2m3cDN RYYyIagfMz+/sOvyUeArrsPSGCPTA3qlg9wdjfX8/io2js070VMvlmMqtkh6R6tXJ/6F UTW5y2i03h42AA6NVglEmT+zfX6Tzbed7wI2TqNYC8wf/grNjUlSvhac6LbApNO817r2 Djcg== X-Gm-Message-State: AOAM533KsEBPBGEG1JDUWbql0VJWAY3nHxJKLEftuBUj51BwH9wzEhv1 apcWHRGd7i1eb1ezPZRfEFc= X-Received: by 2002:a63:4c09:: with SMTP id z9mr957538pga.283.1623784082619; Tue, 15 Jun 2021 12:08:02 -0700 (PDT) Received: from smtpclient.apple (c-24-6-216-183.hsd1.ca.comcast.net. [24.6.216.183]) by smtp.gmail.com with ESMTPSA id a11sm15589026pjq.45.2021.06.15.12.08.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jun 2021 12:08:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [PATCH v3 3/6] iommu: Improve iommu_iotlb_gather helpers From: Nadav Amit In-Reply-To: <25B4DBA5-72A3-4122-8678-AF3500F5023E@gmail.com> Date: Tue, 15 Jun 2021 12:07:58 -0700 Cc: Joerg Roedel , Will Deacon , Jiajun Cao , Lu Baolu , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <7A15BB6B-B115-4167-A6AF-E96D71FE9E9E@gmail.com> References: <20210607182541.119756-1-namit@vmware.com> <20210607182541.119756-4-namit@vmware.com> <07969028-d807-cad1-2a01-8efc87390157@arm.com> <25B4DBA5-72A3-4122-8678-AF3500F5023E@gmail.com> To: Robin Murphy X-Mailer: Apple Mail (2.3654.100.0.2.22) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jun 15, 2021, at 12:05 PM, Nadav Amit wrote: >=20 >=20 >=20 >> On Jun 15, 2021, at 3:42 AM, Robin Murphy = wrote: >>=20 >> On 2021-06-07 19:25, Nadav Amit wrote: >>> From: Robin Murphy >>> The Mediatek driver is not the only one which might want a basic >>> address-based gathering behaviour, so although it's arguably simple >>> enough to open-code, let's factor it out for the sake of = cleanliness. >>> Let's also take this opportunity to document the intent of these >>> helpers for clarity. >>> Cc: Joerg Roedel >>> Cc: Will Deacon >>> Cc: Jiajun Cao >>> Cc: Robin Murphy >>> Cc: Lu Baolu >>> Cc: iommu@lists.linux-foundation.org >>> Cc: linux-kernel@vger.kernel.org >>> Signed-off-by: Robin Murphy >>=20 >> Nit: missing your signoff. >>=20 >>> --- >>> Changes from Robin's version: >>> * Added iommu_iotlb_gather_add_range() stub !CONFIG_IOMMU_API >>=20 >> Out of curiosity, is there any config in which a stub is actually = needed? Unlike iommu_iotlb_gather_init(), I would have thought that = these helpers should only ever be called by driver code which already = depends on IOMMU_API. >=20 > Indeed, this was only done as a defensive step. >=20 > I will remove it. I see no reason for it. Sorry for ruining your = patch. And remove the stub for iommu_iotlb_gather_is_disjoint() as well.=