From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E278835200D for ; Thu, 18 Jun 2026 22:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781822746; cv=none; b=osW48iw6z0dLVY5BQuW+rgn4GGBjKHWkbOl8ihqCB/hXrMLXPUrNqWw/l9gdyeaGa2gIHf5PnD9Nqfy8SLCPDq8gqTRBqKHL6Vqx5M9JQTrpXWk/19s2fkqjXGzokQZfH2MlvsHnTA0xtBw6IHXn9RYXzntBvWxUFp1jMWC5Q14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781822746; c=relaxed/simple; bh=p77TveDbpp7HNftGzvjzpX7z4GilKjxHXs0y5CuWHI8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ACObrR6sE27cwKqJuUK/BrZj99Hl0gaPtGt4EawdsVzyGVzPr7jXjz7ic61aaGEGNG0d3NUe0BiNPYavbCQLBusfvYJPX0BeFUGicfezG7Z4Kh9E6HWIWLPagaqtx1jkSed5aLRLGlzM5yfuN/JDPZSu86EWhFg/ijdKFNMW3dE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jmattson.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=JnCYX2oU; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jmattson.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JnCYX2oU" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-36bba9b849dso1440232a91.1 for ; Thu, 18 Jun 2026 15:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781822744; x=1782427544; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=yzcC92EHb91544uEP740BS0GbTjYgwTgsbLMNqy+GD0=; b=JnCYX2oUh0ter0I8W+s0+pqY8qc0OmYYEWZ7BrMviJtxrA+e8SwMxTbG3VIrx4nzx6 i1+uhTdUcLbBH4VCm1YkZSObE70ea0FqTZwthVPPtcxmKrMRFE9LOx1oQETns0uS8thv pMl9SDU0RKG8Vj6TxC5Vki9rCoawxxssHy7hmTSgwKNneFgyvMmA8AsOluVYuVZTPvC4 oPqb1ruoeh2pXtHVCkrv78kHso5ofXJ5YdMBS0nGdV+FSNuiweFqllD8Ga3soPPeEziH LFJXjuhEGYn7u764vLJ93Du0TtsEDP9dvUN4FykKXicwAbg1Woy1b5UPXLWzj+0MxW20 0+AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781822744; x=1782427544; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yzcC92EHb91544uEP740BS0GbTjYgwTgsbLMNqy+GD0=; b=GfrUiM5CtbU2vcSRYNVCDfkrzZdC012S9C4Nw5m9A85MwUrpao1h2eJqqBp0XIoLpc qabgKLmkfCICvp5xlWsHYtbbjOFKEv+ChGDIl/YiGXil1s5BlQuj3E6CCgcpl2igfWMv XMGlo5nO9FbGcrZZhewNaGmkKfXl+mdNrG7IbmHI8qb5xeRaSG2eyHc68mdJccpMM9Vz dHdFx/mtrOJAzGJ3U7J73/6d2s585dL7FgVQ3EU3c+1EihaczOx7S0nEosmOrrnH9oXs /3baHeQoidFtLmO4MZvrGlkyPD0lag69dPcWlMyUuwnMy+/pLWUA/Fi5uBSxJK/zI5Ka 17hQ== X-Gm-Message-State: AOJu0Yz/cNGB2DUoI8FTud8ujeZhiVunCz6oZOYxtGP+bZ4mUFVdt7lN U3y9HEjf8lB39aajmLAUZGarF4WN+UAzUsTfAIZmzeDPuu6vdXrCC0VuXaW2zTLYNYIgM7YqcuX Stj7BluHez3rsVg== X-Received: from pjbpm10.prod.google.com ([2002:a17:90b:3c4a:b0:36b:d4f1:5505]) (user=jmattson job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:f950:b0:36b:79aa:cda4 with SMTP id 98e67ed59e1d1-37d160481fcmr1576750a91.8.1781822744068; Thu, 18 Jun 2026 15:45:44 -0700 (PDT) Date: Thu, 18 Jun 2026 15:45:27 -0700 In-Reply-To: <20260618224527.1506419-1-jmattson@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260618224527.1506419-1-jmattson@google.com> X-Mailer: git-send-email 2.55.0.rc0.799.gd6f94ed593-goog Message-ID: <20260618224527.1506419-5-jmattson@google.com> Subject: [PATCH v3 4/4] cpufreq: ACPI: Use amd_update_hwcr() for MSR_K7_HWCR updates From: Jim Mattson To: bp@alien8.de, tglx@kernel.org, x86@kernel.org, rafael@kernel.org, viresh.kumar@linaro.org, yosry@kernel.org, andrew.cooper3@citrix.com, ludloff@gmail.com Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Jim Mattson Content-Type: text/plain; charset="UTF-8" For consistency and maintainability, update boost_set_msr() to use the centralized amd_update_hwcr() helper when modifying MSR_K7_HWCR. Suggested-by: Borislav Petkov Assisted-by: Gemini:gemini-3.5-pro Signed-off-by: Jim Mattson --- drivers/cpufreq/acpi-cpufreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 48d678812fd6..b3e058dd6b4b 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -103,9 +103,7 @@ static int boost_set_msr(bool enable) break; case X86_VENDOR_HYGON: case X86_VENDOR_AMD: - msr_addr = MSR_K7_HWCR; - msr_mask = MSR_K7_HWCR_CPB_DIS; - break; + return amd_update_hwcr(MSR_K7_HWCR_CPB_DIS_BIT, !enable); default: return -EINVAL; } -- 2.55.0.rc0.799.gd6f94ed593-goog