Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1877795yba; Sun, 14 Apr 2019 23:36:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG8ZvsKYTmHteEagGHI3b1TGfiQjzzIzMrwSNLgqT0Z/JHjdOyUNskpXVRZ4OZFKXrZdMD X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr73747682plb.131.1555310195174; Sun, 14 Apr 2019 23:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555310195; cv=none; d=google.com; s=arc-20160816; b=0y+M6EO4DwsTEFy41HCUvk3qnLfRUqipWD5Cue72bhKM60tpDmXIPCsNFELfy7VwtB AMu5JXG8097HKWarlotkXXavWO3twDVhqiTN+0QEG6Zcjl8yXVCmpgiOj1qqoXKS9QCd g5Z5HegeBZgf4Rda2ciu6We+dR9A2V+fYupfVNTbEr4cQUjQkLfHxWNmDukZ9p5zrsZx roFKueSY0OINRi4qhBnPEmAmnsuzTidHu9g3SjzjCHx112d3gsCas2vZQ8OjjP3yS9b2 iZ6AQoherevdzAxDzMuzj+xuN6jbKAqhqrYFoDKPmhXxlMspbOZHQms2hwxwSARESrxf QVxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pNf9pfvgLdccEDVgSHx2Yxh5Htmh35hVEg69OaFdf8k=; b=My09pswY97HAr1X7JNlYOm60FM3VPJU4V5DN6ka2d6wRreyLJo/PsM1/WGtObSdqx9 j7fzhKUnb97XYUEr2EpOtRjRHBtjk0awOqvJRKjVRDq+/49hl+Ryjd39e+cHwPPC7YJz kQXYBEMDexkozKk/qDaruulaQgy/YA2PhUYc9JWcHR+mRjYbbWERyloFyyTxMGxnDYpE 6A8SW91Z7fgUV+YCjKCfbYPvM5m2+RhiBoAIDifpNOc+AeLe0brrr2FYymMBjd57G//5 lVU3TGVYVfLsdSaI0YUGH/9dEeGVdvebMMJtUmlJa5Lg5aQE/X/PcdhYSsIAJRs/mksq MXBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SmjV52WJ; 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 1si20549019ply.311.2019.04.14.23.36.19; Sun, 14 Apr 2019 23:36:35 -0700 (PDT) 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=SmjV52WJ; 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 S1726266AbfDOGdz (ORCPT + 99 others); Mon, 15 Apr 2019 02:33:55 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41064 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfDOGdz (ORCPT ); Mon, 15 Apr 2019 02:33:55 -0400 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=pNf9pfvgLdccEDVgSHx2Yxh5Htmh35hVEg69OaFdf8k=; b=SmjV52WJpL/Qv7ymPr/M5ytTu Y28R9e7uC2IxTOfzDQv6azgmlL16zED6ZddBalcYpYFWirlqtRZyECYYLLuUfNliGqxpowruzoJzv y7JQmqP6k08iCHrZhMSe5/jqXmtZ7DIh44lKS1W33wicmljUEPyfxguv5cYbTwYnW3UF3xMn+6mlT bbj46TEuL22Q5eIg8QpC0zccRCdNwqxLlD0PUSLYooj6ejcNv2UwXU1Bb68Y4JrwCweGRqfC2YTLG JqiwBNBd8LT+6nMdRmAxe6t6LyZyB9bTPopWyRhuqxCte/nKyLQT5Ghji5j7g3hG81IkpBX9UVOny EJg6AbwSg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFvBf-0002x4-LD; Mon, 15 Apr 2019 06:33:51 +0000 Date: Sun, 14 Apr 2019 23:33:51 -0700 From: Christoph Hellwig To: Tom Murphy Cc: iommu@lists.linux-foundation.org, Heiko Stuebner , Will Deacon , David Brown , linux-samsung-soc@vger.kernel.org, dima@arista.com, Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Andy Gross , Marc Zyngier , linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, murphyt7@tcd.ie, Robin Murphy Subject: Re: [PATCH 5/9] iommu/amd: Implement .flush_np_cache Message-ID: <20190415063351.GD1377@infradead.org> References: <20190411184741.27540-1-tmurphy@arista.com> <20190411184741.27540-6-tmurphy@arista.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190411184741.27540-6-tmurphy@arista.com> User-Agent: Mutt/1.9.2 (2017-12-15) 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 amd_iommu_flush_np_cache(struct iommu_domain *domain, > + unsigned long iova, size_t size) > +{ > + struct protection_domain *dom = to_pdomain(domain); > + > + if (unlikely(amd_iommu_np_cache)) { Is this case really so unlikely that it needs a static branch prediction hint?