From patchwork Thu Aug 15 05:44:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 171385 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1760899ily; Wed, 14 Aug 2019 22:45:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkCJqzro/g1iNX0ctEBKknQgPs8bSvDSrUa0DQ0x+6T+uGR5UTTJmsRMGiaYLUgJZh5ROE X-Received: by 2002:aa7:8619:: with SMTP id p25mr3718189pfn.220.1565847916662; Wed, 14 Aug 2019 22:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565847916; cv=none; d=google.com; s=arc-20160816; b=aRwsINbEwNHhcEr+0q1EaHmZ7fcPUn+LWK3K7Ztz4QSy3uCE3H50xf8z9SpHNiMGEM Zs+px6wf5XahDFQ29SXS6lnoVYJfpC/B8qQ0Ctllz4nBQXlFUeX7+24bd/8sDTIyzAiR LXQswOfUVNpeohagPK4femh7DjYQEX9sXtm+V0AtDVItAdesRjU9s/8lsi/vFKqiDnLs jUK3kTXzrMCrcdMKHZ+hRHj4y6BaNbFePOmPdMphAxkY3xeiK83OwirKHWgQ6xSYT5DN 2jFgh6Mop+nBFp3cI1QL+hwFlHXiLJHoC2BPfVslKgpZ8R809IRnCvKThvNCrHyo2auU 0W3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=A6pYuT4l1bnfrqQfspgQo+WHkOoA1W5fDsNVVderSO0=; b=EoBA0txnzK5VsyX/YwaWfW9QNO8K+QlN6baaCJSPUzyff1UfNNbY1rVx2EUdvisIi3 S+eZMrT/L4sTd5KjKiQTedeN9o+MXYy8SGwJZMkIbpfDa8MlooWNhMlX7N5Ku8hw9SV6 Jt4ouMO3zx09KXmqB9/CLeX8OXo1SxeGn3dkbmR0jgLHAjM0zcaklipVp9xivIxxLrLC wne4s4g58iormynaHyMNaRIXHGw1uu4AFqFucNU7P81GmLK+0b+GrscrCiyWJJ4LdDan KD4P1cOpDpqmIKgGgyY0WphDZIeJnRUaQrA1Qcb/XkImYSt3HBp4h/f67QK3m/r3EMwN 7H2A== ARC-Authentication-Results: i=1; mx.google.com; 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 h11si1227515pgr.555.2019.08.14.22.45.16; Wed, 14 Aug 2019 22:45:16 -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; 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 S1730385AbfHOFpP (ORCPT + 28 others); Thu, 15 Aug 2019 01:45:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39410 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726105AbfHOFpO (ORCPT ); Thu, 15 Aug 2019 01:45:14 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DCF73649FA0FCEA333F3; Thu, 15 Aug 2019 13:45:10 +0800 (CST) Received: from HGHY4L002753561.china.huawei.com (10.133.215.186) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Thu, 15 Aug 2019 13:45:03 +0800 From: Zhen Lei To: Jean-Philippe Brucker , "Jean-Philippe Brucker" , John Garry , "Robin Murphy" , Will Deacon , Joerg Roedel , iommu , linux-arm-kernel , linux-kernel CC: Zhen Lei Subject: [PATCH v2 0/2] add nr_ats_masters for quickly check Date: Thu, 15 Aug 2019 13:44:37 +0800 Message-ID: <20190815054439.30652-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.133.215.186] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1 --> v2: 1. change the type of nr_ats_masters from atomic_t to int, and move its ind/dec operation from arm_smmu_enable_ats()/arm_smmu_disable_ats() to arm_smmu_attach_dev()/arm_smmu_detach_dev(), and protected by "spin_lock_irqsave(&smmu_domain->devices_lock, flags);" Zhen Lei (2): iommu/arm-smmu-v3: don't add a master into smmu_domain before it's ready iommu/arm-smmu-v3: add nr_ats_masters for quickly check drivers/iommu/arm-smmu-v3.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) -- 1.8.3