From patchwork Fri Aug 11 11:55:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 713426 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 D9378C001DB for ; Fri, 11 Aug 2023 11:55:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235539AbjHKLza (ORCPT ); Fri, 11 Aug 2023 07:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234317AbjHKLz0 (ORCPT ); Fri, 11 Aug 2023 07:55:26 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8FB72D61 for ; Fri, 11 Aug 2023 04:55:24 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe28f92d8eso3060888e87.1 for ; Fri, 11 Aug 2023 04:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691754923; x=1692359723; 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=Ch1MMPzXxt2ZLlG7nltXMcHjVLEaj7rMyA9/R+Q9Z3Y=; b=oeoNxyzUCf/7wTNdJY6f32WjV37AuuwyBZga1pT/Vxsyaq7xfywmkt9c59bHuAf6hE nvDCDMSIbVhuTykuD24U0eXWxmHvkSQ/GCgaM9q5vz9gX7MaE6/Y9CgB5cgTyx5USUmM d54N90N1LVZnrVnUPmlWeH52bp8QU+LXy1GPEHV+p07/F/4mkwc7uUp6lUwKSG9Ivps7 9OUk6s30Y55GTUmWqKTmfKi2Sf3UGGOUT7jH9dwgGGlES2Nc5posp4ZQ1poNWeIzp58V Rw/eunQPHMaXzpf9MUXpP5pdFAg/noTjajEOYWhQYKGk7b6Hiw90keq4TVdK3eBwJthC mxEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691754923; x=1692359723; 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=Ch1MMPzXxt2ZLlG7nltXMcHjVLEaj7rMyA9/R+Q9Z3Y=; b=K0sHHS/4nORQxQFhtc4V/Joory2DGjlmghd05kI3qQg8P68N8/Su9bT3UnFLCH0pX2 pzHi2mnxVg860YwlPEQa4oZJh5SkrGV6f8Q0cRTTNyn5Xp/12QLvirtqZWJGzm0rXc8j c3r1XJ8u8NQXUEQ6FQa/kz7rIn92rA9cJ37HROVAL4PqXSS8to32qyNY+8Jgf4bsUpFR WhZMrQr3c6+IKx1WMDg5athLEDnej2UkLLSZO6y5cr85mYMIaBJgLcDHi0yMVinrCiSV hJk2xCt5ypLGlJQnALd/tema9uxScmTESqaNfWuuSURRH6uqbU3stDB8Ezznf/dUQkjr xHIA== X-Gm-Message-State: AOJu0YzU+DdA8Xww76y0u2xWzRTXgo2n9m/FjozXELnpF8QpAzgxfxBC zDHtyOnOqvk//Dz8/OrlVm2RFg== X-Google-Smtp-Source: AGHT+IGWAiMNIiztaw+MSdWe2bowZ2pGCFgH/LkYVAzY8FUXhxigTgDv5wnxvaZ2/jT3M8aUTATP8w== X-Received: by 2002:a05:6512:1154:b0:4f8:5885:61e with SMTP id m20-20020a056512115400b004f85885061emr1303842lfg.40.1691754923165; Fri, 11 Aug 2023 04:55:23 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id b17-20020ac25631000000b004fe4a4c61f0sm691729lff.191.2023.08.11.04.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 04:55:22 -0700 (PDT) From: Konrad Dybcio Date: Fri, 11 Aug 2023 13:55:08 +0200 Subject: [PATCH 2/2] interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting MIME-Version: 1.0 Message-Id: <20230811-topic-icc_fix_1he-v1-2-5c96ccef3399@linaro.org> References: <20230811-topic-icc_fix_1he-v1-0-5c96ccef3399@linaro.org> In-Reply-To: <20230811-topic-icc_fix_1he-v1-0-5c96ccef3399@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=1691754919; l=1365; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=ooKoWDrIZBGoRmYbzBT936ZVDY0VC6/O2RuTPuEpqXc=; b=tWCHfvHPwWdJ+l7tj7scfETlbh3LpPB3jM6S4mCR0aIO+zrEmhfuWOqfuwneYYhij6dzsCNvi Cy/1avBW7rKA2app07sfTr621oIoFoYrJIqh+oReAI5Z/rxilUUBNQM 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 82433f35717f..a28b87eec3da 100644 --- a/drivers/interconnect/qcom/bcm-voter.c +++ b/drivers/interconnect/qcom/bcm-voter.c @@ -78,10 +78,10 @@ static void bcm_aggregate_1he(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; } }