Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp670972pxb; Tue, 5 Apr 2022 18:08:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo3ehdzBzCUjpQoFHv7iDmKxEkK2Ut0OM4sj7tosXd5/NRWoMegG0huG7YVrxnTAv1bu3h X-Received: by 2002:a17:907:72d6:b0:6df:8b52:bb50 with SMTP id du22-20020a17090772d600b006df8b52bb50mr6011570ejc.254.1649207186375; Tue, 05 Apr 2022 18:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207186; cv=none; d=google.com; s=arc-20160816; b=cqts+4TZS+cSVCSnNmckXnLKbMI6lZT1dUKZ8YQZMCD/dk9xx61c0ZzxhMj9lgqZuG Y+b/0fXQNTHpMMq30lUuZbWKoMkWhFzkihgPfTJWXQLGQdlKcATTagG7SUTDKnPUsL1s t+BGolFF28PO6oqrwOF9zz8CikE/85LLuBsHyoHKKxNdTbk1qPUmFQbimbqyDyZG7r9b SKFYf1Yw733XxqjgTbSJNuFUBFRxf1FlgDGCYt3rhmjW2nQSXcFQa7y7sqYcVo1CpFg7 89U4rXCP1b7ka6DO6zPU1RzQPw+DNwCJIbs5fvXwOqtbFKJoFqkD6OoOziGHAydSOHoU gCdQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J9PM/98XE9d36l7ejunIaRzTK7WmHOLbM0aecdKeQHs=; b=XBwnE1wdKVneeLlcUtxFdNxwmbhVDo2M7EdfGLHQoOZ7RsCSAnhILvTFun0LARkew7 q3wxNWQ2JQxQWT0KUY/55Bh5TN2gx0f8lKXNUCZnp+NAxepRbM+f/x4Uq9o9k1w+IkPx guLnKCqSatwpDZtfJCfiBYIGrwo2tXrPbH60erLN6F6RZnuOutp8EjA8ebaSeSvEAl6x nenID4DXOc9WAECejQgEZpDXfXigGrmATGx+ROcqPPuBWS5ZFlNBkH5M+73Ky/r5YH44 LyT5vOjBvcrbrPGBLzLhbfaK65TV997H9tB8PwvaUf6Kql9VBPBWAN3qlpVldhVGH9dB leKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ohgeqwbv; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n24-20020a17090695d800b006df76385d58si9987442ejy.504.2022.04.05.18.06.01; Tue, 05 Apr 2022 18:06:26 -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=@linuxfoundation.org header.s=korg header.b=Ohgeqwbv; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386588AbiDEMyy (ORCPT + 99 others); Tue, 5 Apr 2022 08:54:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343853AbiDEJOo (ORCPT ); Tue, 5 Apr 2022 05:14:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D09184C436; Tue, 5 Apr 2022 02:01:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8BF9EB81A22; Tue, 5 Apr 2022 09:00:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB067C385A3; Tue, 5 Apr 2022 09:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149258; bh=suba1xzXWvaIbJzsfonGz0DLngK0q0zBAS7BYPJhF/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ohgeqwbv+GwVrCPgEMW44K+gwoPPqkkyG4pccR+x29l4y+ryXi0d8s2ibyI+m7+Cx YfvqSL5qJhDDlgC3PTWVPo0TcAT4SX5QG75ulx2aF+bQ5hAhDzgjJMHyCXjZh+ktK3 9ZfFUA7GvfLeEcjk3GsPzgkzz+TH9YvqbuzW2gqw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Weiss , Viresh Kumar , Sasha Levin Subject: [PATCH 5.16 0651/1017] cpufreq: qcom-cpufreq-nvmem: fix reading of PVS Valid fuse Date: Tue, 5 Apr 2022 09:26:04 +0200 Message-Id: <20220405070413.607090574@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Luca Weiss [ Upstream commit 4a8a77abf0e2b6468ba0281e33384cbec5fb476a ] The fuse consists of 64 bits, with this statement we're supposed to get the upper 32 bits but it actually read out of bounds and got 0 instead of the desired value which lead to the "PVS bin not set." codepath being run resetting our pvs value. Fixes: a8811ec764f9 ("cpufreq: qcom: Add support for krait based socs") Signed-off-by: Luca Weiss Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/cpufreq/qcom-cpufreq-nvmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index d1744b5d9619..6dfa86971a75 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -130,7 +130,7 @@ static void get_krait_bin_format_b(struct device *cpu_dev, } /* Check PVS_BLOW_STATUS */ - pte_efuse = *(((u32 *)buf) + 4); + pte_efuse = *(((u32 *)buf) + 1); pte_efuse &= BIT(21); if (pte_efuse) { dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs); -- 2.34.1