Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1862943pxj; Sat, 5 Jun 2021 05:31:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgBaUL+d3KDRmJoV/41/7BVqu19B089exgG35L650yH+kuSWHKf5o2xD5kAvEtjv8p7VvP X-Received: by 2002:a17:906:4089:: with SMTP id u9mr8991462ejj.478.1622896264728; Sat, 05 Jun 2021 05:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622896264; cv=none; d=google.com; s=arc-20160816; b=YR4A52qjizDVHPuwJa2Uq+CPYPUy/psz+kMLC04EQfcOucWg0AKFsevm70bjdOkAo0 Po7mbFum+fjmRM2Lz1DTELYrlVB54S57PbRbuyKBqpQM8CBb5Nz6993oJbnpjj+XZywA uiNBJYErPPwoJ3InJPfv3IgY4PUzviRX6UKpfzTr+/+K0sTbICZ1dl7se38MPOtKTNu7 NQZWPmxEvheyTNeqw9VEJ2DxY+Uv7Cb/JhSfmmr69dVvs1h8YkWS/xibH3TdcFfdmkbP zDnu45AbNoZsdHm5F3xaZt9BK80beY+f6QK+17Iqcov+SR0DrKPw8iHrCL5HZQYR89/i OIwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :dkim-signature:dkim-signature; bh=1RbQgq677nj7G3MUumWQjelLqbrdkBM2pt/CFGcdDww=; b=Z5fL+Jh+o6y4VZNtUCCtrU2s+3kHhSoN3IjXsJqMVTHGj1fRhYRYZBrAHQm+0+yTRq OIjZKBZEYJPm7P9q3V2/a+A4GuTxTlL0ADx+dW8QYFMGH3fIGYjEtFl4ZRZcXZsIBhBb Jt5+R7VlamhYpDf5V9Wtq/h7yRnhrPQdbQwA1vAVagjDiwtb1qPfigc48e/Indw6hXqj sNVYnyRgnXOHQpZIsNMEbLShRtDhhOwgv3IY6BypUp0Ym4zViCsHBKXZZ7vpG3HfKRhY HBl1mvkfJZeqEk2I37/aNwPVaYPUOS+mROsGPIWhRzOZOkTTSgM0vqf3DYmN5VYCsL6r r39w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm1 header.b=IWPbj+jS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ADM+zxMe; 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=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn13si4272885edb.501.2021.06.05.05.30.40; Sat, 05 Jun 2021 05:31:04 -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=@svenpeter.dev header.s=fm1 header.b=IWPbj+jS; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ADM+zxMe; 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=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbhFEMa6 (ORCPT + 99 others); Sat, 5 Jun 2021 08:30:58 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:53923 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbhFEMa6 (ORCPT ); Sat, 5 Jun 2021 08:30:58 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 3E26D5804A2; Sat, 5 Jun 2021 08:29:10 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute3.internal (MEProxy); Sat, 05 Jun 2021 08:29:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type:content-transfer-encoding; s=fm1; bh=1R bQgq677nj7G3MUumWQjelLqbrdkBM2pt/CFGcdDww=; b=IWPbj+jS3yyI1hVyW5 5sN1YgyHOAAM6fqrk2zzGemytyt9Y3iPjsLueBl2TBunTetDC5YbPeGP9y681UJZ 0k39tUpGZjoiwtDxSXs3VNq+qyspKPfIwoVGz8Sy/zVqp+elJ8Q7TpWLcagAfzTG Fl2uhYittvM3zHEWKL6nrG+tY+pyy/9t6iNUwpaPkiYMHZN0LrN9YR8MxzTBo9ks kh9JYRUCbjEUPOv9tcBfmvICu690LGywZIq8K0jM+D91SCSt1EYv65huFmOYg+30 cFj11jFs5i3ieoJWrjeSERdBJ1s88ukANXH/1BYjic7uA3b/KO6/JbhtI+hgbNgw Y5ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=1RbQgq677nj7G3MUumWQjelLqbrdkBM2pt/CFGcdD ww=; b=ADM+zxMegh80UeqCKmGjOf/Ocfu3mACp0SHiArW5qzrB2UqrIe+7He8GL CMuL7ZIHXeyUjBISAuo3oZ6RxK/k4QIzexC9QyF0ty+ERyD0lAFZKeTvZYCIHHut zHY0MMM5x6LtZoUHPVCBHZxljMhWK3s1TgZt6aXDewrd7w24MwAWntciDl92O3Bf ctxryzULFb8rbi3zEoklA2O0VbBHGPip7rnooYhB1EktosG+U+aaKI5mNa5GWErV VWKKPulJc8i/JLr0cUe+wnIk/NOsjDPOS2B/G8mMRyonIf9itbQouiIfZWaRwLfD 5I4G0bX8ilWu4IbaMmcFgfyMJFTWw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtfedgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfufhv vghnucfrvghtvghrfdcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrf grthhtvghrnhepteeuudelteefueelvdelheehieevvdfhkeehjeejudfhieelffffudfh keeileegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E519451C0060; Sat, 5 Jun 2021 08:29:06 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 Mime-Version: 1.0 Message-Id: <89b391d1-c076-491a-97c0-d08593c006e7@www.fastmail.com> In-Reply-To: References: <20210603085003.50465-1-sven@svenpeter.dev> <20210603085003.50465-4-sven@svenpeter.dev> Date: Sat, 05 Jun 2021 14:28:27 +0200 From: "Sven Peter" To: "Rouven Czerwinski" , "Will Deacon" , "Robin Murphy" , "Joerg Roedel" , "Rob Herring" Cc: "Arnd Bergmann" , devicetree@vger.kernel.org, "Hector Martin" , linux-kernel@vger.kernel.org, "Marc Zyngier" , "Mohamed Mediouni" , "Stan Skowronek" , linux-arm-kernel@lists.infradead.org, "Mark Kettenis" , "Petr Mladek via iommu" , "Alexander Graf" Subject: Re: [PATCH v3 3/3] iommu: dart: Add DART iommu driver Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rouven, On Sat, Jun 5, 2021, at 13:50, Rouven Czerwinski wrote: > Hi Sven, >=20 > just a small comment, see inline. >=20 > On Thu, 2021-06-03 at 10:50 +0200, Sven Peter wrote: > > + > > +/* must be called with held dart_domain->lock */ >=20 > You can remove this comment, include lockdep.h and=E2=80=A6 >=20 > > +static int apple_dart_finalize_domain(struct iommu_domain *domain) > > +{ > > + struct apple_dart_domain *dart_domain =3D to_dart_domain(domain); > > + struct apple_dart *dart =3D dart_domain->dart; > > + struct io_pgtable_cfg pgtbl_cfg; > > + >=20 > lockdep_assert_held(&dart_domain->lock); >=20 > A lockdep enabled kernel will warn if this function is called without > the lock held, otherwise this gets optimized out. Same for the similar= > comments below. >=20 That looks very useful, thanks! Will use it for v4. I only found assert_spin_locked originally but didn't want to have that performance overhead for code that (I hope :-)) correctly uses these fun= ctions with a held lock right now. Thanks, Sven