[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240501143400.GA15503@willie-the-truck>
Date: Wed, 1 May 2024 15:34:01 +0100
From: Will Deacon <will@...nel.org>
To: Georgi Djakov <quic_c_gdjako@...cinc.com>
Cc: robin.murphy@....com, joro@...tes.org, iommu@...ts.linux.dev,
robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org, devicetree@...r.kernel.org,
andersson@...nel.org, konrad.dybcio@...aro.org, robdclark@...il.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, quic_cgoldswo@...cinc.com,
quic_sukadev@...cinc.com, quic_pdaly@...cinc.com,
quic_sudaraja@...cinc.com, djakov@...nel.org
Subject: Re: [PATCH v8 2/7] iommu/arm-smmu-qcom-debug: Add support for TBUs
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).
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
Powered by blists - more mailing lists