Message ID | 20221111145919.221159-4-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp791588wru; Fri, 11 Nov 2022 07:04:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf58XQk1NdVGcGF0QsVkpBQjcZIABBHpGtAjI7plNpNhcGUHd9E5gs+IURBDJWWVWg9mGrKV X-Received: by 2002:a05:6402:22ba:b0:462:2410:9720 with SMTP id cx26-20020a05640222ba00b0046224109720mr1806611edb.84.1668179069329; Fri, 11 Nov 2022 07:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668179069; cv=none; d=google.com; s=arc-20160816; b=ZL85dpSHJQ3iOKlm4ppR5E9/+E7/9UaY9TIN6V6sklrVkL7QSG2/F6wgAhl47wzHvX uKgkDXcTv9DFM60QObT7VOPa2zlFfv3eGi5RT5JgGHnpd+NRCcTV/SLceluGGpMvT/eI EZ4J2HVXsGhcms9mQmc1MjEp/+OKcjlTTSsH6GjR4GbOGoFWaLU4x4wEm4CQRJEqX+fa Z7bIMCCQ2Fvo334L8srBIGqA7XoZsw2Z8kvl+FJCOUXPNWgJDxvMpl5BiOW28WzYMAFB fOMYfDnzlsngKxB/Odl3sgQYBxn3QcwfNb6mvonGIYKJ1o2SnPLkf7r+TnYzeXMZaE2k M+1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0+zPwZdryFZedJX3Xjriv1wC/1H16gYtvyoZDOMwW6U=; b=PjIKR+4bNtxfm6hWOJZdVkQkw4KeSXfFx7iEKXH81YSN0EgqxbnHD5paGsPSh2ulaT z9RT+VajVl06HYNkQXWm5K3yCGdkJTigZE0QPM1GndVrbm1WdronryOoshXvaRL4AEl8 bVrN28Z8+eXjIFqt+rxirr68bnqqyPwQ/oIETrqybrRVTehhwwymhTr2y7aZhbviLaWJ FwwgRV7wb4zUT6rDpkDXp5N3F6OUa4APyQ6yZpFnSYTP7ixzDfgpdXHWWviJgGnf1fw0 NZ1hxFJqAQDp/FJ71SN5oyntzG9tXkJeg2i+nDIzzBYx5kEGtuNWcj4gRURctezH53d7 CZNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YuAw4h1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hu9-20020a170907a08900b007ae0db0c454si2301040ejc.635.2022.11.11.07.04.03; Fri, 11 Nov 2022 07:04:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YuAw4h1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234882AbiKKPAe (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Fri, 11 Nov 2022 10:00:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234696AbiKKO7d (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 11 Nov 2022 09:59:33 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B34B8654C5; Fri, 11 Nov 2022 06:59:31 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 171966602A5B; Fri, 11 Nov 2022 14:59:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1668178770; bh=v/SdConwcLDUdB+vnhsUHtZDsg7PCN+jxysiLSvSwfo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YuAw4h1USZuYNtGIaP6keEe/eLKOeSIf/5tQleLSFTXcIT42TOAqp9qF+GDluirO4 sCWOD1UqLTGVjNYDYV7Q1Qp5Mk0gj2FKqAWqhssUdLm4rLmktjE7r5amdn7qTJAUoe 8/1M807zf/RQTpzuJ1hD/XnJUcdnATFONhHpa5NuP1Vbvrn/lJWcoWEw9pryXo+aCO PsP4MwitdKWT28YOvZW6YFTPrDkfwXCPHuknDNKEmX5CkSOyTtWRT4lG5HFYhYzI5d 53A/IdpRUNXN2e14DtX3IAI5LbusGdPKLIprYyzqRGNRvnCrqXIYLgX46jGtiIjx7J 3ZwBwtb3e2pZA== From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> To: agross@kernel.org Cc: andersson@kernel.org, konrad.dybcio@linaro.org, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robdclark@gmail.com, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, marijn.suijten@somainline.org, kernel@collabora.com, luca@z3ntu.xyz, a39.skl@gmail.com, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Subject: [PATCH v2 3/8] iommu/arm-smmu: Add definition for ARM_SMMU_CB_FSRRESTORE Date: Fri, 11 Nov 2022 15:59:14 +0100 Message-Id: <20221111145919.221159-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111145919.221159-1-angelogioacchino.delregno@collabora.com> References: <20221111145919.221159-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749212535851225349?= X-GMAIL-MSGID: =?utf-8?q?1749212535851225349?= |
Series |
Add support for Qualcomm's legacy IOMMU v2
|
|
Commit Message
AngeloGioacchino Del Regno
Nov. 11, 2022, 2:59 p.m. UTC
In preparation for adding a proper context bank reset sequence in
qcom_iommu, add a definition for the implementation defined Fault
Status Restore register (FSRRESTORE).
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 +
1 file changed, 1 insertion(+)
Comments
On 11/11/2022 2:59 pm, AngeloGioacchino Del Regno wrote: > In preparation for adding a proper context bank reset sequence in > qcom_iommu, add a definition for the implementation defined Fault > Status Restore register (FSRRESTORE). It's not implementation defined, it's architectural. But I don't follow why we should need this. If we're resetting FSR, we don't need to restore any previous value to it; all we want to do is clear it, which we do already via its own mechanism. Thanks, Robin. > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> > --- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h > index 703fd5817ec1..5015138799c5 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.h > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h > @@ -219,6 +219,7 @@ enum arm_smmu_cbar_type { > ARM_SMMU_FSR_TF | \ > ARM_SMMU_FSR_IGN) > > +#define ARM_SMMU_CB_FSRRESTORE 0x5c > #define ARM_SMMU_CB_FAR 0x60 > > #define ARM_SMMU_CB_FSYNR0 0x68
Il 11/11/22 16:18, Robin Murphy ha scritto: > On 11/11/2022 2:59 pm, AngeloGioacchino Del Regno wrote: >> In preparation for adding a proper context bank reset sequence in >> qcom_iommu, add a definition for the implementation defined Fault >> Status Restore register (FSRRESTORE). > > It's not implementation defined, it's architectural. But I don't follow why we > should need this. If we're resetting FSR, we don't need to restore any previous > value to it; all we want to do is clear it, which we do already via its own mechanism. > The spec says "configurations" -> implementation defined whether the system implements stage 1 translation.... and that's how I got confused about it, sorry. Thanks for the review, this clears up my doubts: I can reset FSR without caring about FSRRESTORE. I'll send a v3 ASAP. Regards, Angelo > Thanks, > Robin. > >> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> >> --- >> drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h >> b/drivers/iommu/arm/arm-smmu/arm-smmu.h >> index 703fd5817ec1..5015138799c5 100644 >> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.h >> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h >> @@ -219,6 +219,7 @@ enum arm_smmu_cbar_type { >> ARM_SMMU_FSR_TF | \ >> ARM_SMMU_FSR_IGN) >> +#define ARM_SMMU_CB_FSRRESTORE 0x5c >> #define ARM_SMMU_CB_FAR 0x60 >> #define ARM_SMMU_CB_FSYNR0 0x68
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h index 703fd5817ec1..5015138799c5 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.h +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h @@ -219,6 +219,7 @@ enum arm_smmu_cbar_type { ARM_SMMU_FSR_TF | \ ARM_SMMU_FSR_IGN) +#define ARM_SMMU_CB_FSRRESTORE 0x5c #define ARM_SMMU_CB_FAR 0x60 #define ARM_SMMU_CB_FSYNR0 0x68