Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6069937ybv; Tue, 18 Feb 2020 09:16:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzg90y8/H8ehOe8bjXBFYG8lXpplw9OEZmBhz6WEc/1xi5Zh4t4wtlJf/cczt1gKGAMPHsX X-Received: by 2002:a9d:4541:: with SMTP id p1mr17020898oti.199.1582046203695; Tue, 18 Feb 2020 09:16:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582046203; cv=none; d=google.com; s=arc-20160816; b=eHbPQnDusn8eayi5X4DFwdpKFXbK9M4QPWyIYUfVNniQFvmu54mbXx2tfV/Ai/ACRI RG6ZcQxPX5u4jkxUblgx6g2Aw1CfCpFNwvuD5HENOVaTuKC+IoFMFTM3Fey8QHQ7M2eS rJcmbTmbAW72VkvdmHRJz36s6c4UfZMPPUX+pB6PheWVqNLyi9G/prbNjAaJ2giDKjxC /KNLJM5I7DeAlC3nTkGexHTfCmIpbmYDPImhSMMDl8j/ooMzcNgcuYOyQjiUEJi0EFwc ZcBO7eXhnyVQ/rYAZYz9fuCS9j21LOIjGWQTXCl/hAs5SZ4DooSswB6JoI+0N68s7doi MNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=DtnUK1xASlzt/HMPi6EpJNZIY4HCkmIAFuNb2drX+S0=; b=GYFQXvoesyY88QLwAK5Huak52qSIr/PpgMRz6Le9Lv2m33ksP0oDD14Q6cb8tlyK/2 HMDtKah+ugbh/09qzQh5JVSNA2DaiL2/mqJu9UUWoRFVp5IF8kf/jlmYccu1VMl27r0F YpWxj5HRHobJIQBLQJMNa296abY0/XLp1WcKMuT16ugPR8RYb4ASMc5CRGJHxxbwR5KZ N/7CqwZlkUcMfruW1YKjtlprbs3hyWw60KFMw8t/BJaVYsSInBBLCXCZYpJE82yu+m0e Yia7rWiNZ1DwGDVzxtZ2AvWgQyC07I71pA3RiVwlVNmoi26jva2hj6ZVqMfZJ91J0/Wu HCHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nC+ckAaT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si2057452oth.181.2020.02.18.09.16.31; Tue, 18 Feb 2020 09:16:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nC+ckAaT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726786AbgBRRQY (ORCPT + 99 others); Tue, 18 Feb 2020 12:16:24 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36562 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgBRRQX (ORCPT ); Tue, 18 Feb 2020 12:16:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DtnUK1xASlzt/HMPi6EpJNZIY4HCkmIAFuNb2drX+S0=; b=nC+ckAaT3f0TAwRj0Ixv6COnz/ bA8ppTmtfdRbDRfBmTwGTFcdaCHxAYu9PVgc0w5snowjNkbT+n4eLW1hs54bAMcv0OKxlJTjHavJd H6gMAgypDPoZMtrY7/TZ82zhFO8PUHqCaXqU1KHWKMmFgJ/uZeuC9/w7wTfEN+SwvyLl934e1cw4n VO/cEhnVRwSmNe+zRgzOM+E0iq5RN3m2K4Xf6CQ+Kvud+VDqfpWJDDXeN4h2iwPQ0rrYI4Xs6yWZc hweugJeJIVA6jl7GSvXKH8i0l9nvCgc9svIb+7fOJo7kt/zfvx30a/iQevoRSoy8JZuPYPa3NFrVu 6tnzLF2w==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j46Tp-0005de-Ng; Tue, 18 Feb 2020 17:16:17 +0000 Date: Tue, 18 Feb 2020 09:16:17 -0800 From: Christoph Hellwig To: Joerg Roedel Cc: Lu Baolu , David Woodhouse , jroedel@suse.de, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] iommu/vt-d: Move deferred device attachment into helper function Message-ID: <20200218171617.GB7067@infradead.org> References: <20200217193858.26990-1-joro@8bytes.org> <20200217193858.26990-3-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200217193858.26990-3-joro@8bytes.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static void do_deferred_attach(struct device *dev) > { > + struct iommu_domain *domain; > > + dev->archdata.iommu = NULL; > + domain = iommu_get_domain_for_dev(dev); > + if (domain) > + intel_iommu_attach_device(domain, dev); > +} > + > +static struct dmar_domain *deferred_attach_domain(struct device *dev) > +{ > + if (unlikely(attach_deferred(dev))) > + do_deferred_attach(dev); > > return find_domain(dev); > } Can we start using proper sybmbol prefixes and avoid do_* names where possible?