linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: kholk11@gmail.com, will@kernel.org
Cc: joro@8bytes.org, bjorn.andersson@linaro.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	marijns95@gmail.com, konradybcio@gmail.com,
	martin.botka1@gmail.com, linux-arm-msm@vger.kernel.org,
	phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] iommu/arm-smmu: Move stream mapping reset to separate function
Date: Wed, 14 Oct 2020 16:56:15 +0100	[thread overview]
Message-ID: <70da2261-df85-e982-7646-8b3b8988a9fc@arm.com> (raw)
In-Reply-To: <20200926130004.13528-7-kholk11@gmail.com>

On 2020-09-26 14:00, kholk11@gmail.com wrote:
> From: AngeloGioacchino Del Regno <kholk11@gmail.com>
> 
> Move the stream mapping reset logic from arm_smmu_device_reset into
> a separate arm_smmu_stream_mapping_reset function, in preparation
> for implementing an implementation detail.
> 
> This commit brings no functional changes.

Please coordinate with Bjorn's series so you're not wasting time 
developing 'competing' implementations of the exact same thing. You 
don't need these last 3 patches, for reasons I've already explained over 
there.

Robin.

> Signed-off-by: AngeloGioacchino Del Regno <kholk11@gmail.com>
> ---
>   drivers/iommu/arm/arm-smmu/arm-smmu.c | 19 +++++++++++++------
>   1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> index 446a78dde9cd..8c070c493315 100644
> --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
> @@ -1652,14 +1652,9 @@ static struct iommu_ops arm_smmu_ops = {
>   	.pgsize_bitmap		= -1UL, /* Restricted during device attach */
>   };
>   
> -static void arm_smmu_device_reset(struct arm_smmu_device *smmu)
> +static void arm_smmu_stream_mapping_reset(struct arm_smmu_device *smmu)
>   {
>   	int i;
> -	u32 reg;
> -
> -	/* clear global FSR */
> -	reg = arm_smmu_gr0_read(smmu, ARM_SMMU_GR0_sGFSR);
> -	arm_smmu_gr0_write(smmu, ARM_SMMU_GR0_sGFSR, reg);
>   
>   	/*
>   	 * Reset stream mapping groups: Initial values mark all SMRn as
> @@ -1673,6 +1668,18 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu)
>   		arm_smmu_write_context_bank(smmu, i);
>   		arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_FSR, ARM_SMMU_FSR_FAULT);
>   	}
> +}
> +
> +static void arm_smmu_device_reset(struct arm_smmu_device *smmu)
> +{
> +	u32 reg;
> +
> +	/* clear global FSR */
> +	reg = arm_smmu_gr0_read(smmu, ARM_SMMU_GR0_sGFSR);
> +	arm_smmu_gr0_write(smmu, ARM_SMMU_GR0_sGFSR, reg);
> +
> +	/* Reset stream mapping */
> +	arm_smmu_stream_mapping_reset(smmu);
>   
>   	/* Invalidate the TLB, just in case */
>   	arm_smmu_gr0_write(smmu, ARM_SMMU_GR0_TLBIALLH, QCOM_DUMMY_VAL);
> 

  reply	other threads:[~2020-10-14 15:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26 12:59 [PATCH 0/8] Implement firmware quirks for Qualcomm ARM-SMMUv2 kholk11
2020-09-26 12:59 ` [PATCH 1/8] iommu/arm-smmu-qcom: Rename qcom_smmu_impl to qcom_smmu500_impl kholk11
2020-09-26 12:59 ` [PATCH 2/8] iommu/arm-smmu-qcom: Add QC SMMUv2 VA Size quirk for SDM660 kholk11
2020-10-14 15:43   ` Robin Murphy
2020-09-26 12:59 ` [PATCH 3/8] dt-bindings: arm-smmu: add binding for SMMUv2 on Qualcomm SDM660 kholk11
2020-09-29 19:10   ` Rob Herring
2020-09-26 13:00 ` [PATCH 4/8] iommu/arm-smmu: Support test_smr_masks implementation detail deviation kholk11
2020-10-14 15:52   ` Robin Murphy
2020-09-26 13:00 ` [PATCH 5/8] iommu/arm-smmu-qcom: Add test_smr_masks detail to QCOM SMMUv2 kholk11
2020-09-26 13:00 ` [PATCH 6/8] iommu/arm-smmu: Move stream mapping reset to separate function kholk11
2020-10-14 15:56   ` Robin Murphy [this message]
2020-09-26 13:00 ` [PATCH 7/8] iommu/arm-smmu: Support stream_mapping_reset implementation detail kholk11
2020-09-26 13:00 ` [PATCH 8/8] iommu/arm-smmu-qcom: Add stream_mapping_reset detail to QCOM SMMUv2 kholk11
2020-10-14 22:14   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70da2261-df85-e982-7646-8b3b8988a9fc@arm.com \
    --to=robin.murphy@arm.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joro@8bytes.org \
    --cc=kholk11@gmail.com \
    --cc=konradybcio@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).