Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Georgi Djakov <quic_c_gdjako@quicinc.com>
Cc: robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux.dev,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	andersson@kernel.org, konrad.dybcio@linaro.org,
	robdclark@gmail.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	quic_cgoldswo@quicinc.com, quic_sukadev@quicinc.com,
	quic_pdaly@quicinc.com, quic_sudaraja@quicinc.com,
	djakov@kernel.org
Subject: Re: [PATCH v7 2/7] iommu/arm-smmu-qcom-tbu: Add Qualcomm TBU driver
Date: Tue, 9 Apr 2024 11:20:33 +0100	[thread overview]
Message-ID: <20240409102033.GA22381@willie-the-truck> (raw)
In-Reply-To: <20240329210638.3647523-3-quic_c_gdjako@quicinc.com>

On Fri, Mar 29, 2024 at 02:06:33PM -0700, Georgi Djakov wrote:
> Operating the TBUs (Translation Buffer Units) from Linux on Qualcomm
> platforms can help with debugging context faults. To help with that,
> the TBUs can run ATOS (Address Translation Operations) to manually
> trigger address translation of IOVA to physical address in hardware
> and provide more details when a context fault happens.
> 
> The driver will control the resources needed by the TBU to allow
> running the debug operations such as ATOS, check for outstanding
> transactions, do snapshot capture etc.
> 
> Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
> ---
>  drivers/iommu/Kconfig                         |   9 +
>  drivers/iommu/arm/arm-smmu/Makefile           |   1 +
>  .../iommu/arm/arm-smmu/arm-smmu-qcom-tbu.c    | 372 ++++++++++++++++++
>  drivers/iommu/arm/arm-smmu/arm-smmu-qcom.h    |   2 +
>  drivers/iommu/arm/arm-smmu/arm-smmu.h         |   2 +
>  5 files changed, 386 insertions(+)
>  create mode 100644 drivers/iommu/arm/arm-smmu/arm-smmu-qcom-tbu.c
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 0af39bbbe3a3..b699e88f42c5 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -374,6 +374,15 @@ config ARM_SMMU_QCOM
>  	  When running on a Qualcomm platform that has the custom variant
>  	  of the ARM SMMU, this needs to be built into the SMMU driver.
>  
> +config ARM_SMMU_QCOM_TBU
> +	bool "Qualcomm TBU driver"
> +	depends on ARM_SMMU_QCOM
> +	help
> +	  The SMMUs on Qualcomm platforms may include Translation Buffer
> +	  Units (TBUs) for each master. Enabling support for these units
> +	  allows to operate the TBUs and obtain additional information
> +	  when debugging memory management issues like context faults.
> +
>  config ARM_SMMU_QCOM_DEBUG

Can we just use ARM_SMMU_QCOM_DEBUG for all of this? Having both
ARM_SMMU_QCOM_DEBUG and ARM_SMMU_QCOM_TBU for the same hardware is
pretty confusing, I think.

Will

  reply	other threads:[~2024-04-09 10:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 21:06 [PATCH v7 0/7] Add support for Translation Buffer Units Georgi Djakov
2024-03-29 21:06 ` [PATCH v7 1/7] dt-bindings: iommu: Add Qualcomm TBU Georgi Djakov
2024-03-29 21:06 ` [PATCH v7 2/7] iommu/arm-smmu-qcom-tbu: Add Qualcomm TBU driver Georgi Djakov
2024-04-09 10:20   ` Will Deacon [this message]
2024-04-10 12:02   ` Konrad Dybcio
2024-03-29 21:06 ` [PATCH v7 3/7] iommu/arm-smmu: Allow using a threaded handler for context interrupts Georgi Djakov
2024-03-29 21:06 ` [PATCH v7 4/7] iommu/arm-smmu-qcom: Use a custom context fault handler for sdm845 Georgi Djakov
2024-03-29 21:06 ` [PATCH v7 5/7] arm64: dts: qcom: sdm845: Add DT nodes for the TBUs Georgi Djakov
2024-04-10 12:08   ` Konrad Dybcio
2024-03-29 21:06 ` [PATCH v7 6/7] iommu/arm-smmu-qcom: Use the custom fault handler on more platforms Georgi Djakov
2024-03-29 21:06 ` [PATCH v7 7/7] arm64: dts: qcom: sc7280: Add DT nodes for the TBUs Georgi Djakov
2024-04-10 12:13   ` Konrad Dybcio

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=20240409102033.GA22381@willie-the-truck \
    --to=will@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djakov@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_c_gdjako@quicinc.com \
    --cc=quic_cgoldswo@quicinc.com \
    --cc=quic_pdaly@quicinc.com \
    --cc=quic_sudaraja@quicinc.com \
    --cc=quic_sukadev@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    /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