Message ID | 20171006133203.22803-26-jean-philippe.brucker@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6E3416020F for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Oct 2017 13:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C445283AE for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Oct 2017 13:48:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40F3B284B5; Fri, 6 Oct 2017 13:48:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B5F54283AE for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 6 Oct 2017 13:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=t9PJyWLcFzTcGFM3V+lkYzPfsobsqlXWQKLwDB6D3S8=; b=ORF9mInqyFox7Gi6QR+YFNzokr J9xeZbmJfl5v1fwfoMlsWAmq8II9xTXJTtqyLr4MM/96VB5uALE5S0zzhhO4261IbyhkkhwFKp1m+ lFYHtBiYmanotQMp7zX2xSoLyjzapsH1vM1mkOAb37QFSvOWo6N1+R9XHLZpJ+w57ynz3TGfPoEXi ygMuhQla7KL5RHNSZooxqDw6WagyEHL1Kee0nsTTiGxvhRWZccF3ZwCkxgnTNQmJb1iTmib/sWwps WvmSbTLhJ2kyxFAob6YCIhvjvWEI4P0COZJyKy1whxHXw+ELwwtSrspadMdApH5hODyt2CyuSksbj BO6zjc5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e0SzZ-0001Gz-3D; Fri, 06 Oct 2017 13:48:41 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e0SwX-00053q-Q7 for linux-arm-kernel@bombadil.infradead.org; Fri, 06 Oct 2017 13:45:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: 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=L9qG0ooiuert6g0lE+2dKQbLmWDuNbZIwDLbuDLKVNw=; b=BpkqA1uLrV0uWUrCUi3p03c+8 Y4xJM0Ta4rfHkcsufUubsXRQEgb3Eh1ugQ4wvbGQdxiLQDOmoa4gMYieantZepnUi1+KzcsiZgDEE xmtuhgEWzohUKlbnTr2DAnP2k9BT5Lb4QiWSJ3g2s/Am8o7Anta5rcClKpk+aJ3qgD+Dev0R4PQDB sJpxpnsF8D6ufYmmogm4PVcoTptoAg2ywNbCK8GgaXKa56F9iNRsQkYvTmljMvVRgwxX1ANkwIXYQ ufzKK72BHoRCGuHZXwsOt2DFWuGzsROjPtSviPWOZ9WJZouJvzJDpMqxkWIopww3XyfIbz9ACMlkd tiOwdWMhA==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e0Shm-00077X-Ej for linux-arm-kernel@lists.infradead.org; Fri, 06 Oct 2017 13:30:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2B9651435; Fri, 6 Oct 2017 06:30:00 -0700 (PDT) Received: from e106794-lin.cambridge.arm.com (e106794-lin.cambridge.arm.com [10.1.211.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 490A73F578; Fri, 6 Oct 2017 06:29:55 -0700 (PDT) From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> To: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [RFCv2 PATCH 25/36] iommu/arm-smmu-v3: Use shared ASID set Date: Fri, 6 Oct 2017 14:31:52 +0100 Message-Id: <20171006133203.22803-26-jean-philippe.brucker@arm.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171006133203.22803-1-jean-philippe.brucker@arm.com> References: <20171006133203.22803-1-jean-philippe.brucker@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171006_143018_628852_39EF3630 X-CRM114-Status: UNSURE ( 7.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: mark.rutland@arm.com, xieyisheng1@huawei.com, gabriele.paoloni@huawei.com, catalin.marinas@arm.com, will.deacon@arm.com, okaya@codeaurora.org, yi.l.liu@intel.com, lorenzo.pieralisi@arm.com, ashok.raj@intel.com, tn@semihalf.com, joro@8bytes.org, rfranz@cavium.com, lenb@kernel.org, jacob.jun.pan@linux.intel.com, alex.williamson@redhat.com, robh+dt@kernel.org, thunder.leizhen@huawei.com, bhelgaas@google.com, dwmw2@infradead.org, liubo95@huawei.com, rjw@rjwysocki.net, robdclark@gmail.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, robin.murphy@arm.com, nwatters@codeaurora.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index e89e6d1263d9..b7355630526a 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -1240,7 +1240,8 @@ static void arm_smmu_write_ctx_desc(struct arm_smmu_domain *smmu_domain, CTXDESC_CD_0_ENDI | #endif CTXDESC_CD_0_R | CTXDESC_CD_0_A | - CTXDESC_CD_0_ASET_PRIVATE | + (ssid ? CTXDESC_CD_0_ASET_SHARED : + CTXDESC_CD_0_ASET_PRIVATE) | CTXDESC_CD_0_AA64 | (u64)cd->asid << CTXDESC_CD_0_ASID_SHIFT | CTXDESC_CD_0_V;
We now have two exclusive sets of ASIDs: private and shared. SMMUv3 allows for contexts to take part in distributed TLB maintenance via the ASET bit. When this bit is 0 for a given context, TLB entries tagged with its ASID are invalidated by broadcast TLB maintenance. Set ASET=0 for process contexts. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com> --- drivers/iommu/arm-smmu-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)