From patchwork Fri Aug 11 23:16:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 712729 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01EA4C41513 for ; Fri, 11 Aug 2023 23:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbjHKXQZ (ORCPT ); Fri, 11 Aug 2023 19:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbjHKXQX (ORCPT ); Fri, 11 Aug 2023 19:16:23 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DAAF1704 for ; Fri, 11 Aug 2023 16:16:22 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fe0c566788so3914882e87.0 for ; Fri, 11 Aug 2023 16:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691795781; x=1692400581; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=czw8itWeaD9VouL3BdJnjgMtHFcsN8021NNdf8QkGZ0=; b=bxivqnRMY7Sdkr94n5F/Px3mN3lKykrZetZCwiqpmT8px96/eATphvq+hWbDzMMUl8 9FWKvSrtnqj1iyBjSq0s588zZXDIyp+zq+Vtu3gjHaFQmwsnO2FWli/40X+lk4CL6KEE oSWPwAxzEcavH7rLGjW/6HDD/F17zcfrvs30AnepJpPUUIuJLqhgAP2Wx7UvpoxBWKOW hgBIEJmTvV2/14wWRnobDvt2cJgdSjapGuqR14zWhJTCoRhZA67QtK8OeTtfbKQNZftX P4g0AoG6mKARBLBeR+B9rC1yqtjfEEcz9An6kT7fe1D9yi8WMFKi37mHVFLRac8udreF Ra4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691795781; x=1692400581; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=czw8itWeaD9VouL3BdJnjgMtHFcsN8021NNdf8QkGZ0=; b=UNeQn3JdL8EHNqZlX5NJT5BIFjJvk5jyNVEXmmQHPcvex4LPk3KMuAlGbxR8mDJIvM tOHMO/bi+CgH+2VoWec52A4kB5ytcoPZflLOV4SJchCwAvM2LZ7DSWTV+c1KKVVMbp10 Y0NkL1jQdMT/X2e/heW2zieathNO4KliMAEiC4JU522d62GwsyyWEzMfRsfNG3Y+dPHz 1z6NX/V7seO7AUDQ9Nl9EpuliCMNjPanCxjwUPpZ7tFTKrfIqp+YjN6R3xcWoWmR9Q8Q K+H/2+HJt8DC10ie1qmn7RigNF6rGoqtS8SskTBwCa93GQ1NX9j0sWw1w25XOnbHWAA6 8kBw== X-Gm-Message-State: AOJu0YyPGb7weXM5yElSLLIdMWiro8BZgJWjz+2mTdJisTyT2PVJod3S 1YPfVYiTffpcr0fPhnHNpnILgA== X-Google-Smtp-Source: AGHT+IFC0RfJs+jy5tG9FdZA6p1sWmCHtVavUaRElhKoUqQtGcJ6LzumYfbu7KmdkrhRXjykxEpXGQ== X-Received: by 2002:a05:6512:2315:b0:4fd:fef7:95a5 with SMTP id o21-20020a056512231500b004fdfef795a5mr2782946lfu.11.1691795781383; Fri, 11 Aug 2023 16:16:21 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id m16-20020a195210000000b004fe48332852sm884773lfb.136.2023.08.11.16.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 16:16:21 -0700 (PDT) From: Konrad Dybcio Date: Sat, 12 Aug 2023 01:16:16 +0200 Subject: [PATCH v2 2/2] interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting MIME-Version: 1.0 Message-Id: <20230811-topic-icc_fix_1he-v2-2-0620af8ac133@linaro.org> References: <20230811-topic-icc_fix_1he-v2-0-0620af8ac133@linaro.org> In-Reply-To: <20230811-topic-icc_fix_1he-v2-0-0620af8ac133@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Mike Tipton , Neil Armstrong Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Bjorn Andersson X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691795777; l=1366; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=9+dhJntssIo8yKCa0lMm05/Qxhg0nhjKsOE59k2uJ5g=; b=9Vg8m5lBfUabDMntbvIW95/q5rc6Ri8b0OPHS+v5ebQyY+Oc2oOcbZ+pyrBBtktQslHwm1Caw QZdPS83XTl9BbSNqi2BF+uey/N9R0FlXEHosB4zOljW4OtilqNJycXI X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org BCMs with an enable_mask expect to only have that specific value written to them. The current implementation only works by miracle for BCMs with enable mask == BIT(0), as the minimal vote we've been using so far just so happens to be equal to that. Use the correct value with keepalive voting. Fixes: d8630f050d3f ("interconnect: qcom: Add support for mask-based BCMs") Reported-by: Bjorn Andersson Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/bcm-voter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c index d857eb8838b9..a2d437a05a11 100644 --- a/drivers/interconnect/qcom/bcm-voter.c +++ b/drivers/interconnect/qcom/bcm-voter.c @@ -81,10 +81,10 @@ static void bcm_aggregate_mask(struct qcom_icc_bcm *bcm) } if (bcm->keepalive) { - bcm->vote_x[QCOM_ICC_BUCKET_AMC] = 1; - bcm->vote_x[QCOM_ICC_BUCKET_WAKE] = 1; - bcm->vote_y[QCOM_ICC_BUCKET_AMC] = 1; - bcm->vote_y[QCOM_ICC_BUCKET_WAKE] = 1; + bcm->vote_x[QCOM_ICC_BUCKET_AMC] = bcm->enable_mask; + bcm->vote_x[QCOM_ICC_BUCKET_WAKE] = bcm->enable_mask; + bcm->vote_y[QCOM_ICC_BUCKET_AMC] = bcm->enable_mask; + bcm->vote_y[QCOM_ICC_BUCKET_WAKE] = bcm->enable_mask; } }