From patchwork Tue Jul 2 09:01:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenhua Huang X-Patchwork-Id: 13719139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E85FDC30658 for ; Tue, 2 Jul 2024 09:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=5oUp9HjdbzqCJbBpnTEAe9i/3eQI4P1aO4PcqDLsfHQ=; b=D30FWIkIYh8ilv9stwCW6bqVQQ wJfbE3/2s5aRrWwXvumaoM3NWg05hZQToLHX6ANUTlDzXPLkGFy/xdvQWJAwwAJWjQXwZuxid4SCe dmn1gNxaF6cPS+Bh2cxFXN/bNFufYwMuCGtb+AX6GKvSy/Xo3TKFbMnsCpy8DbsjQEjWCHppbvIhh 6i663tf1CaXzbY28iJPiX2qwh0Bl0tJHJPgRnjIEPxiHSZ9WoZlg2efayykNM3ae0mtbWxnwWSnUw 6aXSF10iIuv70nnYARvSrt2Ctck+zfltW5gHpOdidAln7J+dfMozMFF+etXhmoXIOOgN1F5OPayJW 1vvuaN8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOZOT-0000000644S-26qo; Tue, 02 Jul 2024 09:01:45 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOZOH-0000000642p-45Th for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 09:01:35 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4628IBsv019780; Tue, 2 Jul 2024 09:01:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= qcppdkim1; bh=5oUp9HjdbzqCJbBpnTEAe9i/3eQI4P1aO4PcqDLsfHQ=; b=mg g7Ohk4FykRA9sFn5VMDyAP7+gl3Mi2Kfp3u2MWacueKW5sEPB0KHNXE5ZUNlCdhW im1cl/KIUZnf1XCWv9aa4kQz17N0nrNwK+YSXdlkzPuppY+78rxVeGmYqj4skWN6 48VB2hZWL4YfteJaA1efY3OLHwZnFh0GnGyeG+8wxxTyin/AM0WSIl44H66ZzeUh tbyhVaBsFhRJW6kUNAL/8lLdXLEh7KpmB40aSJfnE2eS01l0rqhJtag3XdMmvBHQ dEKlSoF4lOl8R6/QN8dY520j/J2nBQpQEfqPLy446gNVqAn0ngkjteAq4/A9I9Nv f305vylTFGuhZ94Aoq7g== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40297rq2xm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jul 2024 09:01:22 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46291LcC020780 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 2 Jul 2024 09:01:21 GMT Received: from zhenhuah-gv.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 2 Jul 2024 02:01:18 -0700 From: Zhenhua Huang To: , , , , CC: Zhenhua Huang , , , Subject: [PATCH] iommu/arm-smmu-qcom: record reason for deferring probe Date: Tue, 2 Jul 2024 17:01:10 +0800 Message-ID: <1719910870-25079-1-git-send-email-quic_zhenhuah@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: vSwIDrJRaZdgNOUJQK7AzlQXacZMoxPy X-Proofpoint-GUID: vSwIDrJRaZdgNOUJQK7AzlQXacZMoxPy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-02_05,2024-07-02_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=849 lowpriorityscore=0 clxscore=1011 mlxscore=0 suspectscore=0 spamscore=0 adultscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2407020068 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240702_020134_039324_46F8B773 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Dmitry Baryshkov --- 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)