Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp678690rwb; Wed, 28 Sep 2022 07:49:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6MrUlg0sGN4PwKqSsLe/9E65QVLPxRWtZ649RrebCK7ng68o5JlwIdIJaDbylKoiVVk21j X-Received: by 2002:a17:907:25cd:b0:77b:9672:38e7 with SMTP id ae13-20020a17090725cd00b0077b967238e7mr28722913ejc.10.1664376583421; Wed, 28 Sep 2022 07:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664376583; cv=none; d=google.com; s=arc-20160816; b=krb/r+fVYiuh296A0W/xFfGiUopTXTWVOxuKO2E0g7dQYx44ju1CLS4gklNZ99/Ep2 V3BeIC3eh0aZXNEw0l+3z9Ohvi1zRIUhPX/gXxHrSoAZpK5vB5qdPiCLSWQh2TBw47Xu 1tpz4BxLPOERpiWyYUcl8rHEgnb4MVUo96pkskl/gjUblCSOByOf5fBrfzjAPDjj+Lst R+LbKAc2no0/zvVFHpVJHPbZZiq3GBWQvTO9CyIbMkXgf/6+Q8gVYR1+mjwsV1ksI7r1 mrf2IBFWS35FGGXSOeTJhNvTLScTvAA+3bvVFWSgDkOVRs6WMnlNwJbcOJqBnUeU86i9 6KUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=RRNTzceZaqHDiT7tFNItA9BVbwZc1ms7T50MCemBqpU=; b=s82hT6U506seI7Ko5sXHG3YnGMtdkP0SWVYqTngppYv0G4GeWSHN0hSDrLkrhznr07 +5fHhNmC/Waexxbm+Wi20j+FmpqfiTz5eDswO2aKBlt4kOPX/Bjo462bXRvklyfP4W9x e3YOxfG1s+U+Lc5KoG2wD3sAq1DJS0b/iw2Vwb7axWtqSlhIhl4h+s93VD8pEWuedh/i Laf7xqzQdUSROx8eX4zNsAOqM4c8BcJlJJnBkHErHo4BLCNpo8h/Zx1BebhhhYhkOOQ8 AuD/o7kjenuKSmJVgRZ64ez3YxIR1lbHPPeTqm2YIdcuBEqBUlEuCq6Sq7IcYFF38564 kj0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVkVuZcZ; 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 b18-20020a056402279200b0044e848a603bsi5943691ede.79.2022.09.28.07.48.59; Wed, 28 Sep 2022 07:49:43 -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=rVkVuZcZ; 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 S232866AbiI1NUZ (ORCPT + 99 others); Wed, 28 Sep 2022 09:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbiI1NUX (ORCPT ); Wed, 28 Sep 2022 09:20:23 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 777FE77EA9 for ; Wed, 28 Sep 2022 06:20:21 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id u18so20305351lfo.8 for ; Wed, 28 Sep 2022 06:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=RRNTzceZaqHDiT7tFNItA9BVbwZc1ms7T50MCemBqpU=; b=rVkVuZcZqaqAfme+jh1CDACtX+SwjXoV0UESeIDb/J0HFkb+9oXE7cUVeFcBaHH0Te 6SwOKSUy0wEFq5dcEWyhMTV+e5KEjWnhA+td+2kJhcVq5gRYVtEtcgT04Fn+3TpbN4Zy bV42wGyJ31F/XiPJMuT74R1Q7BSb7FEcUHvPI5zrv1759dlvQ5bzIDb/oGmd0HQv2BZR yGLGAoKB4d1Xhz+zClWSd6vfgrFUzFEu0vMflGAFxtHtWc7g9LXdF081rrKk+WLUFqOQ gXKuymnh4lLO4r4ZJ0O0zKeX8f/M66/6URraNrbJA7e8ark0hpe733WKUK6vCHoysy4r R1Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=RRNTzceZaqHDiT7tFNItA9BVbwZc1ms7T50MCemBqpU=; b=e/RWfWfNqABDW8WB0DcIlpSWx3qGZ9Q3N7b+Yx0RTrx+9ukyz9afhmoM6wISajEfsz H+FgaEPoLOCh8Ie4B5MaipX+gtejw7opZQ2nBah8pEs8eJ1W01GgWEQxQpwhBcKkPzdT l7+y+vf6mdYTg01DCZCIPW/4TbvPBSRhDmEDj4sNr1BMnZTTrcUJiKu3NtyJmMSJKmGY aPFKBt3L7PNC9tppD5QicI8jn6NVbch4gTVomnXcdmBJiaxhPByOozO8LY6JyCEf+tvH PgNbqmld1dngOJ/2aRR3B5jBoQDLrbg1RNZlpc+mJlZtIEV2CAxJl4xbNCyCZuYwBdAD bRsA== X-Gm-Message-State: ACrzQf0lOWYu/S/CVTKrwP9G7zSBV1NS0UeYD+noidGxLEb608LqF8fC LoDs0jatDjpG234jkNyE1RbSyutSkw97nQ== X-Received: by 2002:ac2:54a4:0:b0:498:f55c:7fc0 with SMTP id w4-20020ac254a4000000b00498f55c7fc0mr12420848lfk.420.1664371219806; Wed, 28 Sep 2022 06:20:19 -0700 (PDT) Received: from krzk-bin.. (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id p11-20020ac246cb000000b00497ad9ae486sm478484lfo.62.2022.09.28.06.20.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 06:20:19 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Srinivas Kandagatla , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Chandana Kishori Chiluveru Subject: [PATCH 1/2] slimbus: qcom-ngd-ctrl: check for device runtime PM status during ISR Date: Wed, 28 Sep 2022 15:20:10 +0200 Message-Id: <20220928132011.455347-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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 --- 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) || -- 2.34.1