Message ID | 20230803181225.v5.1.I18d69f4908b8a9f801239117d2a6c3f5aa1e2e76@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17320C0015E for <linux-arm-kernel@archiver.kernel.org>; Thu, 3 Aug 2023 10:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=YHTxmNohxPfSaxqUpA2XVICRgTGqUqjAD5kcI+97PW8=; b=AusB8fjCnZ0o08XJxtztrI3ZiY BZRXOg8vw7+VYhaMGyLGUCSH8OO31oV/bMv4ydTq4x1gnP17VCpOcPEBaZUANiJW9m8/iO4iH6ejR +PYG01dl9b6o6KWaPegrQnKqgufyjht+mzkL/v2e33HjRC0GRIRxITLMtywqcVKQgVIN7jJ/oWPzO 5YwexTTRJfqamHszikgDNawE0h2sxPy6leCZXWHg+nYO7QmbXOAIOOGqYAh5ErUaZUoZ9asdvEzuq RluepzzgS6bQP6Bp9uTMDpFoa6L1NkKJDSpMmIInJrEOXji17t4kRWLr2mx5JYthUNKa/RxyPS2hp a41pe0dA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRVLS-007Jda-00; Thu, 03 Aug 2023 10:14:14 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRVLP-007JZx-1g for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 10:14:12 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-583b256faf5so13560557b3.1 for <linux-arm-kernel@lists.infradead.org>; Thu, 03 Aug 2023 03:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691057647; x=1691662447; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Y1wRhIRrggJAZYs6e7aV6RdIU6iSXzW0ONi/CWI4qUk=; b=v8M8EpvgykyvNj5+VFK4+5VS1GCx+4thN93X5qGdv2Q6mDg+Q9BprkKi/ZqVY1cMB5 hgughi4UN1aYu/EXNqY13NPNEQutZvvu2GYwDAvr8QOh2o+EQF3P9BYp4pftEx0ox7R7 H293Y2C2VTDWZWO6xMfqIKxlFoQitde1l6TRNNpWpcVfHJP20iQVEqHd2/LLHggfZnBa ZYsMt0hplLT0HqFF4jX+LVen+NA6yXSnT9/tIhVW1iyXGrZn3ULvFc83mH9XfV5ftRLp iOKnNntwlT0uTtypEVze4RGIkmvLieWvFRULXEHMTA02TJWP0zXal6LCAjTnDjAfnCr4 3weA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691057647; x=1691662447; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Y1wRhIRrggJAZYs6e7aV6RdIU6iSXzW0ONi/CWI4qUk=; b=jcUfMZDRolNztZNHOy7yI2osbJmTDpgO4PG/vd8njZZL2xPXz/WTqR/nTIznG0O546 qEFnAbRNIpUHAdxXsmAOC1jQprvXjWs4Z9mNIcbIEdI6yczW3IyDQMYwuFP6Xe9OrovZ ah6GqNbbLwBTgr8IGdcRAk3/lQeQZj2fZ/QSPY7Yh5LPk0KnXnFiukM8VBWN0V58cK17 xjVOodvhA9o0hX3AzljZO+CjQ2s3tYjc/7/fvUP7e8DgW8tEOXi6v/QIPERFt7wv4zUH 91G1p5D7W2Hp3RO2x7TkvtvkTzh/Qax2jBKdd2X9ZgWIAVMyg+MBKtSckeyzbgek8kr9 WOUg== X-Gm-Message-State: ABy/qLYlmeybNiZJKGVMgJzaG5FvKzv1Ic46H6a1R5J4i1Qa8CS6gGW3 keelLM7ACliAtzuYt9vlXUsV1zU9OVe1 X-Google-Smtp-Source: APBJJlGq7z9/Y1wQFTi6d5yV5b9fzok7EZ8JGI+3DYlCHleYWyG2dZOEveRtsUS2kTL+q5mmdG0WEODi8+D8 X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:39d1:8774:b733:6210]) (user=mshavit job=sendgmr) by 2002:a81:b301:0:b0:573:54d8:e5be with SMTP id r1-20020a81b301000000b0057354d8e5bemr268745ywh.3.1691057647550; Thu, 03 Aug 2023 03:14:07 -0700 (PDT) Date: Thu, 3 Aug 2023 18:12:21 +0800 In-Reply-To: <20230803101351.1561031-1-mshavit@google.com> Mime-Version: 1.0 References: <20230803101351.1561031-1-mshavit@google.com> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <20230803181225.v5.1.I18d69f4908b8a9f801239117d2a6c3f5aa1e2e76@changeid> Subject: [PATCH v5 1/6] iommu/arm-smmu-v3: Simplify arm_smmu_enable_ats From: Michael Shavit <mshavit@google.com> To: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: baolu.lu@linux.intel.com, will@kernel.org, jgg@nvidia.com, jean-philippe@linaro.org, robin.murphy@arm.com, nicolinc@nvidia.com, Michael Shavit <mshavit@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_031411_582232_E3165F9D X-CRM114-Status: GOOD ( 12.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 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> 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Add PASID support to SMMUv3 unmanaged domains
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 61de66d17a5d5..4df335424b266 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2305,7 +2305,7 @@ static void arm_smmu_enable_ats(struct arm_smmu_master *master) pdev = to_pci_dev(master->dev); atomic_inc(&smmu_domain->nr_ats_masters); - arm_smmu_atc_inv_domain(smmu_domain, 0, 0, 0); + arm_smmu_atc_inv_master(master); if (pci_enable_ats(pdev, stu)) dev_err(master->dev, "Failed to enable ATS (STU %zu)\n", stu); }
arm_smmu_enable_ats's call to inv_domain would trigger an invalidation for all masters that a domain is attached to everytime it's attached to another ATS-enabled master. It doesn't seem like those invalidations are necessary, and it's easier to reason about arm_smmu_enable_ats if it only issues invalidation commands for the current master. Signed-off-by: Michael Shavit <mshavit@google.com> --- (no changes since v2) Changes in v2: - Fix commit message wrapping drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)