Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1127927rwi; Mon, 31 Oct 2022 11:42:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM620lXIezM8i9IWoBu/bIytq4LJjplww83lLlMmrng0ZLmQrciTLFv2yJuTHPPF1zy7jWyt X-Received: by 2002:a05:6a00:1ac6:b0:56d:919b:f4a1 with SMTP id f6-20020a056a001ac600b0056d919bf4a1mr4214379pfv.50.1667241772298; Mon, 31 Oct 2022 11:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667241772; cv=none; d=google.com; s=arc-20160816; b=hFuc364vkKAdNYYJ23M3y7AfxF8jIFkdf8IBmHxEZ37o0hcRQHYkkL+5P22s7iyzzY xJj2wn/rWaLOqjxEzF6E048D6rUSnZaltAZhvZBJkmtXe4LI/2bMyOPu0mGA7bqqZcpH 2R1rgW9i5/jgzUwYzewMw5varTTe2LVKE/7vzgHvKQxMY/TGi81m4bRt2kDq83owWMT6 3XjFtBvnswoZZMhO7U80t86NSkJk4TBEyEh/Xz3rqJvb8EmziUoGfpfxjiFgXLhWz3Nq gm9y3rWIi6intS2AToAdhMjSzGyNwS3GRyUqBevTldRH9gRySAmvhGNitIVZeIUKU31o WLWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=LlUfkjYYiQUn+hV5fhdZbKU09G31Rb+nq+V7VvzQ2Fs=; b=znd82OxYwgrHy1fpmYwWZVPoDBDasQDUFmp2V4f4TC7XnPInV7WTNZHbT2havKGVgw W/qxWnGOAInirTA/GMYCPv88e2Q55OB8meGmaGLHUaiH7OXOvwo68Qx2fE/594QI/Zil ZuuLLddyTQRfS4sl44vUrcnZjpCC/nhsn5BcGjbQ0GRdDd/myQKoTI9jnoih1erUUksM 2e1zUgt5yp3+dNAGsqiwAawVoSlCkSPpHNzO63HaJ87yI6A13XVVVV4z5ysHXWnJpZ16 5Vk4Mxkj51ty5W7B5+dJLbI70oZ0iD9QsxYV+Ynkik/tVc3dg0ePy1vw5FNEwxIIQOhK 8fIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HZ/0UJ8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a170902d54e00b001870dc9ef63si7830529plf.129.2022.10.31.11.42.39; Mon, 31 Oct 2022 11:42:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HZ/0UJ8w"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbiJaS3Q (ORCPT + 98 others); Mon, 31 Oct 2022 14:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiJaS3K (ORCPT ); Mon, 31 Oct 2022 14:29:10 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 436FA13D77 for ; Mon, 31 Oct 2022 11:29:09 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so8569707wmb.0 for ; Mon, 31 Oct 2022 11:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=LlUfkjYYiQUn+hV5fhdZbKU09G31Rb+nq+V7VvzQ2Fs=; b=HZ/0UJ8wkTGZ/sCQeiRZoBv52Db+m0n8A3KfzelK5fr4LXUcAMToPZ7R7FfWtUVw4a za9cQ5L+iQYLdYSD0Y84NljCjxTqe/uSH/8CIHWAakb/Galvyx0733h3HTD8as01M+ZW EZC1Fnp6qRtvbrrADEIZ1v8Mfi+Hr4NegLHLFJ/VwjHKBX13OVzX9qOYyszmARfjZy1d wizxDraCQfrxtSIatUxunX+VHKU2aSuRf1VqAPLA2CSsp72/LkDpRB0MrawrGXfSL590 QdaFL2kmDz8rjbSkvYbka9fMQRco/y+nSO7h2XnneQ3FrNgWj9MSsENgDPcV3U5jqUTe vbyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LlUfkjYYiQUn+hV5fhdZbKU09G31Rb+nq+V7VvzQ2Fs=; b=G4ax7sKrvA6pvFhfneW95hHM4k91G54jA2eU2U57QLhnF4+P9Mue5O/oKFaYL099hB qbBYjhGjLDXxZCYSGaqULAXtTlc4/yi1UqoqfTkO0/9PjVODv5IxwHOGscTVaBgqiqK6 qFbPOOCHq7xgY1sNUbKiFBmXWtMRQZlpgt+86qaz68pjgFWxD5u/SzEQPtWPliRMPLxc Yl6CONjkgSEsc0hrXCiTlxqRmqgksV+B/IW5ysu+6M4rcs5xJgRX3eZbzW35m3Yx9Ofq +HJtCvEyWmfSy3o4Ean2SMknLeUILqRhlxV/3MUPPY1Bxg1jaOlEcHSapnlMLbYdywor 3YpA== X-Gm-Message-State: ACrzQf0248UXN/omdIyCsH36Ole6hoUvuPnnF1I1EHtvxyRw/nG391mQ uYNJiuIb+SYFKp9/QgwemXaC0Q== X-Received: by 2002:a05:600c:695:b0:3c6:b7f1:6f39 with SMTP id a21-20020a05600c069500b003c6b7f16f39mr9385279wmn.5.1667240947769; Mon, 31 Oct 2022 11:29:07 -0700 (PDT) Received: from [192.168.1.195] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id bj29-20020a0560001e1d00b002366b241cf3sm7746285wrb.35.2022.10.31.11.29.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 11:29:07 -0700 (PDT) Message-ID: <8e3bd948-6649-742b-ea4c-4f7236d156a5@linaro.org> Date: Mon, 31 Oct 2022 18:29:06 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 1/2] slimbus: qcom-ngd-ctrl: check for device runtime PM status during ISR Content-Language: en-US To: Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Chandana Kishori Chiluveru References: <20220928132011.455347-1-krzysztof.kozlowski@linaro.org> From: Srinivas Kandagatla In-Reply-To: <20220928132011.455347-1-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/09/2022 14:20, Krzysztof Kozlowski wrote: > Slimbus core interrupt is getting fired after suspend. At this point > ADSP slimbus hardware is off with gated clocks which is leading to an > unclocked access when HLOS slimbus tried to read the interrupt > status register in the ISR. > > Co-developed-by: Chandana Kishori Chiluveru > Signed-off-by: Chandana Kishori Chiluveru > Signed-off-by: Krzysztof Kozlowski > --- Applied both, --srini > drivers/slimbus/qcom-ngd-ctrl.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c > index cec11aa106bf..ba36eb5c0de3 100644 > --- a/drivers/slimbus/qcom-ngd-ctrl.c > +++ b/drivers/slimbus/qcom-ngd-ctrl.c > @@ -763,7 +763,14 @@ static irqreturn_t qcom_slim_ngd_interrupt(int irq, void *d) > { > struct qcom_slim_ngd_ctrl *ctrl = d; > void __iomem *base = ctrl->ngd->base; > - u32 stat = readl(base + NGD_INT_STAT); > + u32 stat; > + > + if (pm_runtime_suspended(ctrl->ctrl.dev)) { > + dev_warn_once(ctrl->dev, "Interrupt received while suspended\n"); > + return IRQ_NONE; > + } > + > + stat = readl(base + NGD_INT_STAT); > > if ((stat & NGD_INT_MSG_BUF_CONTE) || > (stat & NGD_INT_MSG_TX_INVAL) || (stat & NGD_INT_DEV_ERR) ||