Linux ACPI
 help / color / mirror / Atom feed
From: Vishal Badole <Vishal.Badole@amd.com>
To: <tglx@kernel.org>, <mingo@redhat.com>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<rafael@kernel.org>, <lenb@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
	<peterz@infradead.org>, <tony.luck@intel.com>,
	<chang.seok.bae@intel.com>, <wei.w.wang@hotmail.com>,
	Vishal Badole <Vishal.Badole@amd.com>
Subject: [PATCH v2 0/3] x86/topology: Add support for Low Power cpu_type
Date: Tue, 21 Jul 2026 21:15:11 +0530	[thread overview]
Message-ID: <20260721154514.2506972-1-Vishal.Badole@amd.com> (raw)

This series extends the x86 topology cpu_type classification to support
a Low Power core type, in addition to the existing Performance and
Efficiency types.

AMD heterogeneous parts report the core type via CPUID Fn0x80000026
EBX[31:28] (Extended CPU Topology, Core Type). Value 2 identifies a
low-power core. Distinguishing it from a regular efficiency core
matters for:

  - user space exposure via /sys/kernel/debug/x86/topo/cpus/*, which
    today reports cpu_type "unknown" for low-power cores

  - amd_get_boost_ratio_numerator(): on every
    X86_FEATURE_AMD_HTR_CORES-capable AMD/Hygon part, low-power cores
    must scale by amd_get_highest_perf() rather than the fixed
    CPPC_HIGHEST_PERF_PERFORMANCE ceiling, matching the existing
    efficiency-core path

During the v1 review, Sashiko flagged a pre-existing issue in how
x86_match_cpu() handles vendor CPU types. v2 therefore starts with a
preparatory patch from Borislav that switches matching to the kernel's
vendor-agnostic TOPO_CPU_TYPE_* enum; see its commit message for
details. The Low Power support is then added on top.

The series is structured as:

  1/3 Map the vendor (Intel/AMD) hardware core type to the
      vendor-agnostic enum x86_topology_cpu_type at enumeration and
      match against it. See the patch's commit message for details.

  2/3 Replace the bare 0/1 in get_topology_cpu_type() with named
      enum amd_cpu_type constants, mirroring the existing Intel side.
      No functional change.

  3/3 Add TOPO_CPU_TYPE_LOW_POWER, wire it through
      get_topology_cpu_type(), get_topology_cpu_type_name() and the
      switch in amd_get_boost_ratio_numerator() so allmodconfig builds
      cleanly under -Werror=switch.

Changes in v2:
  - New preparatory patch 1/3 from Borislav Petkov switching
    x86_match_cpu() to the vendor-agnostic TOPO_CPU_TYPE_* enum; see
    its commit message for the rationale. (Thomas Gleixner,
    Borislav Petkov)
  - No change to the Low Power translation logic itself; patches 2/3
    and 3/3 are the v1 patches rebased on top of the new 1/3.

v1: https://lore.kernel.org/all/20260629094349.533301-1-Vishal.Badole@amd.com

Borislav Petkov (AMD) (1):
  x86/topo: Map vendor CPU types to generic Linux such types

Vishal Badole (2):
  x86/topology: Name the AMD core-type values
  x86/topology: Add TOPO_CPU_TYPE_LOW_POWER

 arch/x86/include/asm/processor.h      | 19 +++++++++++++----
 arch/x86/include/asm/topology.h       |  9 ++++----
 arch/x86/kernel/acpi/cppc.c           |  7 ++++---
 arch/x86/kernel/cpu/match.c           | 30 +--------------------------
 arch/x86/kernel/cpu/topology.h        |  1 +
 arch/x86/kernel/cpu/topology_amd.c    |  6 ++++--
 arch/x86/kernel/cpu/topology_common.c | 15 ++++++++++----
 7 files changed, 40 insertions(+), 47 deletions(-)

-- 
2.34.1


             reply	other threads:[~2026-07-21 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 15:45 Vishal Badole [this message]
2026-07-21 15:45 ` [PATCH v2 1/3] x86/topo: Map vendor CPU types to generic Linux such types Vishal Badole
2026-07-21 15:45 ` [PATCH v2 2/3] x86/topology: Name the AMD core-type values Vishal Badole
2026-07-21 15:45 ` [PATCH v2 3/3] x86/topology: Add TOPO_CPU_TYPE_LOW_POWER Vishal Badole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260721154514.2506972-1-Vishal.Badole@amd.com \
    --to=vishal.badole@amd.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wei.w.wang@hotmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox