[PATCH] iommu/arm-smmu-qcom: record reason for deferring probe

Zhenhua Huang posted 1 patch 1 year, 5 months ago
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] iommu/arm-smmu-qcom: record reason for deferring probe
Posted by Zhenhua Huang 1 year, 5 months ago
To avoid deferring probe smmu driver silently, record reason for it.
It can be checked through ../debugfs/devices_deferred as well:
/sys/kernel/debug# cat devices_deferred
15000000.iommu  arm-smmu: qcom_scm not ready

Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index 25f034677f56..971c6a2e592b 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -469,7 +469,8 @@ static struct arm_smmu_device *qcom_smmu_create(struct arm_smmu_device *smmu,
 
 	/* Check to make sure qcom_scm has finished probing */
 	if (!qcom_scm_is_available())
-		return ERR_PTR(-EPROBE_DEFER);
+		return ERR_PTR(dev_err_probe(smmu->dev, -EPROBE_DEFER,
+			"qcom_scm not ready\n"));
 
 	qsmmu = devm_krealloc(smmu->dev, smmu, sizeof(*qsmmu), GFP_KERNEL);
 	if (!qsmmu)
-- 
2.7.4
Re: [PATCH] iommu/arm-smmu-qcom: record reason for deferring probe
Posted by Will Deacon 1 year, 5 months ago
On Tue, 02 Jul 2024 17:01:10 +0800, Zhenhua Huang wrote:
> To avoid deferring probe smmu driver silently, record reason for it.
> It can be checked through ../debugfs/devices_deferred as well:
> /sys/kernel/debug# cat devices_deferred
> 15000000.iommu  arm-smmu: qcom_scm not ready
> 
> 

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-qcom: record reason for deferring probe
      https://git.kernel.org/will/c/9796cf9b3eb9

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Re: [PATCH] iommu/arm-smmu-qcom: record reason for deferring probe
Posted by Dmitry Baryshkov 1 year, 5 months ago
On Tue, Jul 02, 2024 at 05:01:10PM GMT, Zhenhua Huang wrote:
> To avoid deferring probe smmu driver silently, record reason for it.
> It can be checked through ../debugfs/devices_deferred as well:
> /sys/kernel/debug# cat devices_deferred
> 15000000.iommu  arm-smmu: qcom_scm not ready
> 
> Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
> ---
>  drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 


Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry