Linux-ARM-MSM Archive mirror
 help / color / mirror / Atom feed
From: Georgi Djakov <djakov@kernel.org>
To: Will Deacon <will@kernel.org>, 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
Subject: Re: [PATCH v8 2/7] iommu/arm-smmu-qcom-debug: Add support for TBUs
Date: Thu, 2 May 2024 19:53:57 +0300	[thread overview]
Message-ID: <963a1006-a68f-448d-807f-40c9e85e1c2a@kernel.org> (raw)
In-Reply-To: <20240501143400.GA15503@willie-the-truck>

Hi Will,

On 1.05.24 17:34, Will Deacon wrote:
> Hi Georgi,
> 
> On Wed, Apr 17, 2024 at 06:37:26AM -0700, Georgi Djakov wrote:
>> diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c
>> index bb89d49adf8d..eff7ca94ec8d 100644
>> --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c
>> +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.c
> 
> ...
> 
>> +static const struct of_device_id qcom_tbu_of_match[] = {
>> +	{ .compatible = "qcom,sc7280-tbu" },
>> +	{ .compatible = "qcom,sdm845-tbu" },
>> +	{ }
>> +};
>> +
>> +static struct platform_driver qcom_tbu_driver = {
>> +	.driver = {
>> +		.name           = "qcom_tbu",
>> +		.of_match_table = qcom_tbu_of_match,
>> +	},
>> +	.probe = qcom_tbu_probe,
>> +};
>> +builtin_platform_driver(qcom_tbu_driver);
> 
> I just noticed that this breaks a modular build of the arm-smmu driver
> because we now have two init functions for the module:
> 
>    ld.lld: error: duplicate symbol: init_module
>    >>> defined at arm-smmu.c
>    >>>            drivers/iommu/arm/arm-smmu/arm-smmu.o:(init_module)
>    >>> defined at arm-smmu-qcom-debug.c
>    >>>            drivers/iommu/arm/arm-smmu/arm-smmu-qcom-debug.o:(.init.text+0x4)
> 
> I think you should initialise the TBU debug feature by calling into it
> manually from qcom_smmu_impl_init().
> 
> Please can you send a patch to fix that? For now, I'll bodge it so that
> the qcom debug stuff doesn't build as a module (see below).

Тhanks for sorting that out and apologies for missing it. We are at rc6 now and
i am afraid that i won't be able to validate my patch until next week (Easter
holidays here). I'll definitely send the rework when I get back.

BR,
Georgi

> 
> Cheers,
> 
> Will
> 
> --->8
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index 032bfd681307..66325210c8c9 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -376,7 +376,7 @@ config ARM_SMMU_QCOM
> 
>   config ARM_SMMU_QCOM_DEBUG
>          bool "ARM SMMU QCOM implementation defined debug support"
> -       depends on ARM_SMMU_QCOM
> +       depends on ARM_SMMU_QCOM=y
>          help
>            Support for implementation specific debug features in ARM SMMU
>            hardware found in QTI platforms. This include support for
> 


  reply	other threads:[~2024-05-02 16:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 13:37 [PATCH v8 0/7] Add support for Translation Buffer Units Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 1/7] dt-bindings: iommu: Add Qualcomm TBU Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 2/7] iommu/arm-smmu-qcom-debug: Add support for TBUs Georgi Djakov
2024-05-01 14:34   ` Will Deacon
2024-05-02 16:53     ` Georgi Djakov [this message]
2024-04-17 13:37 ` [PATCH v8 3/7] iommu/arm-smmu: Allow using a threaded handler for context interrupts Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 4/7] iommu/arm-smmu-qcom: Use a custom context fault handler for sdm845 Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 5/7] arm64: dts: qcom: sdm845: Add DT nodes for the TBUs Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 6/7] iommu/arm-smmu-qcom: Use the custom fault handler on more platforms Georgi Djakov
2024-04-17 13:37 ` [PATCH v8 7/7] arm64: dts: qcom: sc7280: Add DT nodes for the TBUs Georgi Djakov
2024-04-19 15:33 ` [PATCH v8 0/7] Add support for Translation Buffer Units Will Deacon
2024-05-29  2:01 ` (subset) " 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=963a1006-a68f-448d-807f-40c9e85e1c2a@kernel.org \
    --to=djakov@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.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 \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).