From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 743F230F816 for ; Tue, 23 Jun 2026 16:36:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782232575; cv=none; b=LRJk+L+Ufc+BQDZorYIFM+ytMxX+ZiDEewXoQ34kPXeqx1YlG5HARYy+8iag0ImjmkF80spWVw0t8IT58CcaaIseetHFpxSGLwG6A89b7eWCgtS40d8BkikFF4xDQ63L4XebqkGRdlIaNf7eR1JnRLwSD9pmrBj9nn1gjjE7oMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782232575; c=relaxed/simple; bh=4SwdgIE+bd78iV3bxadhFE/SU6oy8jw4xjm+8xIaN84=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=g2OCqPi1K1c5qmmzMqVvR0mrRmCEnBcez/jsXYdiMpn8XAO3S9OE6/7FMY+oxHZlvbtRfqqFXd8A6LsrQOn3w08r0w172R2vVyXUDBVlAf+Zew+ULGurOs2d6Aq82qZfSMITugb3QZHLUKOcazpuaU+htUR+sFZLNemohtRieIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hBFwZWrJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZVIKDyIR; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hBFwZWrJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZVIKDyIR" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65NBZ9eA030832 for ; Tue, 23 Jun 2026 16:36:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= xA0Pw5Ltim7xa7TG+yFu6in4RZDMahQ0O7HSJsSCKNo=; b=hBFwZWrJs9byP+c6 hYYxGCrOpcZvXsOg28ZB6vszdjmOpDg5xjYrgaWLAB2QRTDOU08+5R/jYG5PW4FS oxjsRSNDoQUVy12asRr0bOypqvLuU6vrk6G47EpAVfFk8HLlyP686H+77ABbEEYA CcxHT/jCVFeID3l5ZwEIzPeOxzdL8PlqaFaPe+NsskCv+8g5VF+O3L0wumSlg+dE KtVB6yhhIIBls4mTfu2atPJbChIapUxE/rqVXgMsopdhWqe6SclBORTCeYvs1uyJ MLDiUDeHXl8Rn/zAi6anLruZIogLZQUt//ltG0ncMJjjmUWxg347N1RjLaDIdZdy xIcNVA== Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eyqe69ucp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 23 Jun 2026 16:36:13 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-8dc4536d42cso350286d6.3 for ; Tue, 23 Jun 2026 09:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782232573; x=1782837373; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xA0Pw5Ltim7xa7TG+yFu6in4RZDMahQ0O7HSJsSCKNo=; b=ZVIKDyIRMGKJ70LQ+DsAoKFdAdNRUIhWgt1BVgOd9nV/+C3tnXjWpRVFBeJN/ISjff 9SivjLGeXyiI3eWHqGJkI1CMG2WS5HalOSs2VTF1RezZkztbrYmFqSZmxneARDNa5z12 8nDSuBRWXaoi7qfKXiM4rsKEOFm2Gs9h2AQBZTEb7nRKgFMT0DdLa2cPS3bEpi2AEL1p 0f+ReiXOUayLEfDRTBsT8FoKCk5OP1Zoq/B3OwCTLZJccw7H3SHrlEUGeKuZCIXbC8wf StYe2LYFgQa1pGA56vuYsAVnvr4TFgx/SJDGkJOpGUXKdUR8KSVgr1ahbBnKNeS2Ll3G tGoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782232573; x=1782837373; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xA0Pw5Ltim7xa7TG+yFu6in4RZDMahQ0O7HSJsSCKNo=; b=Mdj8f1NnGJanPWn9fUl1XHN4IkufaJix/UZAHclx2s5MPTL+SUY4wcMYWS79NJuBR7 wIB/f4ZdiO/UAV4bnrwPNVCzT5XdCfdLbXHtis8z+0lNDimhQfL9TxHsRkwDt8bwOMJg SktHMHEX6SujyLWtq5T+reARZIVZzDdE37Z7DTl19QKXccMiAxY8YsLVTCCaDb6z5S2O velMAm6Je2AheJ1s+GSMzAui9N9nZByDA3f5LMVL3Jai+HudHfnJO5LJ0SBQxJ5BGBsm KHfQ9xUD7VmlAzsIsbm8+pOzx5rIm00Zsmg27BFYItFulwpm05rBCoSq7+zPdFZOf6X7 ZrFA== X-Forwarded-Encrypted: i=1; AFNElJ82i1xukqq4+jTd5tV6MaC7Xl2Y8ljvE6y37x5p7yINIWG5VHQSnHNewAA1GdLq/7Nle+cfYs6n/4+WdvY=@vger.kernel.org X-Gm-Message-State: AOJu0YzIkxz7o/cqFkUDQk9Sw9/ZgaJWunuII21paOluddrMw8QT2ekI u3X6NbwX1itaFhesIMG5JiV64U5AN4T3ge+9BMgrNXHajbZz5Ph1IPzgcMkWLfO+GJlECc4Za08 iWGHs5UjpVN9uKCZghMH4eIcFZfBtfYboxbbx3VZzpoPdFnD2U0YTyyFaBeldrs8FUvw= X-Gm-Gg: AfdE7clo6byP6Y/Jo7Y2mOW3XfnZ8yUsRnLWra2I91AzdJ0ar0HmJN+9FTphSryhbQX z3FdjrMzJ+UKtCNcjDoOhqSbf8zj7/YRIjBQzIFxZkQVBZwh4USZtKTd7yNDgn9sOebTgRzoO4R o/f7wSyxLUqe/1JSy7zNkOxH2lH0+TSec6BtLXh8dee+0S3z3eboBpOEr3s9NuaI7+DuWiOP2dW tpdrs1qPuXxoTC43Gr8qK0/oafKPhzJ9aR07aH9rdSdQA0ikECK38CNKOGyy7tm4eFBpDxmD716 hSGIi/GHK+YmzB93wbLQPBXo9vZ1Auv9uI+SPuL6BGIQ947ByZuJa5NwMv1A9SiLuDf5QxLb9D8 8UIHxveTgc8FFcGwakorr/lRNcX/9qDfHu3Q= X-Received: by 2002:a05:620a:6781:b0:926:e8e6:3c28 with SMTP id af79cd13be357-926e8e65d56mr123258585a.7.1782232572837; Tue, 23 Jun 2026 09:36:12 -0700 (PDT) X-Received: by 2002:a05:620a:6781:b0:926:e8e6:3c28 with SMTP id af79cd13be357-926e8e65d56mr123255785a.7.1782232572407; Tue, 23 Jun 2026 09:36:12 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5ad69555c45sm943642e87.36.2026.06.23.09.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jun 2026 09:36:11 -0700 (PDT) Message-ID: <45794082-0c86-416c-a2b1-76ab4f20d82d@oss.qualcomm.com> Date: Tue, 23 Jun 2026 18:36:09 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/8] iommu/qcom: Enable clocks before hardware access in qcom_iommu_ctx_probe() To: Mukesh Ojha , Rob Clark , Will Deacon , "Joerg Roedel (AMD)" Cc: Robin Murphy , iommu@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260623122034.1166295-1-mukesh.ojha@oss.qualcomm.com> <20260623122034.1166295-8-mukesh.ojha@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260623122034.1166295-8-mukesh.ojha@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: Jcwo7eNPtPYnrYkzVBPnsn-c86CIgT2o X-Proofpoint-ORIG-GUID: Jcwo7eNPtPYnrYkzVBPnsn-c86CIgT2o X-Proofpoint-Spam-Info: AW1haW4tMjYwNjIzMDEzNiBTYWx0ZWRfX0c6xRj3KQrJi py24owuJXhEBwehEHUIrq1cuQ2mHWfBsH4c2TPm1Ivm4kXZQuMhDR5yzhl7qhAidhsevrEPEKrP 9adhHQcgMsULyus57PNTFOGFHTcdYWc= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjIzMDEzNiBTYWx0ZWRfXzd4P05NN9DfQ Pa00cTpP6BeCLN7s8j2hrfDZkH3pgS3NZl3eVmscqbAtespqU/+DSSy5eZp/NqMdtw1PLTQJOSi Swhs+6mQkZwUz/ckABw2OmrIf9nT5Axfa4OgbzQNSyyfkI/32P7+ZGR0KalGl0ZpDzYEAQ+pPrE Fy0v1MSG+z/Kz9DecR420nlBiq9DYhXt9mY9oOcXgZS7B3aPF7DLsLgYVTCrqyfJpQn7mX8S0Q4 Jpf4kMsDL9+BFznNyvZpItFHp1xwt4HCUKwVJYJ1Fs6BS2qjB9qWZg3I4YaqGXws9fswTpa0453 AZp/34MqZ0db2gXGyYxIQGHlMwp4nUdxW0bXb/HxDoNKq9OswDOYjts2fPYVta1iV/6s70eUxjT hXGVyZuECL2K22N5xlrd22HBxYcrJFVL9pi0+QMrMxBfjzWgMcyUL0ZqlviEW99vL1Y9b+1fUUi 7BiuhTX9IL9sBOxSosA== X-Authority-Analysis: v=2.4 cv=OeKoyBTY c=1 sm=1 tr=0 ts=6a3ab5fd cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=Yd-jd7UEqWDYs8h9-TIA:9 a=QEXdDO2ut3YA:10 a=zZCYzV9kfG8A:10 a=1HOtulTD9v-eNWfpl4qZ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-23_03,2026-06-23_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606230136 On 6/23/26 2:20 PM, Mukesh Ojha wrote: > qcom_iommu_ctx_probe() reads and writes the CB_FSR register to clear any > stale IRQ left by the bootloader. This happens during > devm_of_platform_populate() which is called from the parent device's > probe before any pm_runtime_get(). The parent's clocks (iface, bus, tbu) > are therefore not guaranteed to be on, making the register access > unreliable on rebind or after a suspend cycle. > > Use pm_runtime_resume_and_get() on the parent device to ensure clocks > are enabled before the register access, and release the reference > immediately after. > > Signed-off-by: Mukesh Ojha > --- Reviewed-by: Konrad Dybcio Konrad