mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Vishal Badole" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vishal Badole <Vishal.Badole@amd.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cpu] x86/topology: Add TOPO_CPU_TYPE_LOW_POWER
Date: Sat, 25 Jul 2026 01:39:49 -0000	[thread overview]
Message-ID: <178494358921.112641.8632342092707397307.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260721154514.2506972-4-Vishal.Badole@amd.com>

The following commit has been merged into the x86/cpu branch of tip:

Commit-ID:     924be9d673eb75deef2f71ddee0d7d89fe69bb7b
Gitweb:        https://git.kernel.org/tip/924be9d673eb75deef2f71ddee0d7d89fe69bb7b
Author:        Vishal Badole <Vishal.Badole@amd.com>
AuthorDate:    Tue, 21 Jul 2026 21:15:14 +05:30
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 23 Jul 2026 14:23:47 -07:00

x86/topology: Add TOPO_CPU_TYPE_LOW_POWER

AMD heterogeneous parts report a third core type via CPUID Fn0x80000026
EBX[31:28] (Extended CPU Topology, Core Type):

  0 - Performance
  1 - Efficiency
  2 - Low Power

get_topology_cpu_type() only translates the first two, so on parts that ship
low-power cores the third type falls through to TOPO_CPU_TYPE_UNKNOWN.

Add TOPO_CPU_TYPE_LOW_POWER which takes care of this new type.

  [ bp: Massage commit message, zap the "what" explanation. ]

Signed-off-by: Vishal Badole <Vishal.Badole@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260721154514.2506972-4-Vishal.Badole@amd.com
---
 arch/x86/include/asm/processor.h      | 1 +
 arch/x86/kernel/acpi/cppc.c           | 3 ++-
 arch/x86/kernel/cpu/topology_common.c | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index fc0350f..9e81834 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -73,6 +73,7 @@ enum x86_topology_cpu_type {
 	TOPO_CPU_TYPE_ANY = 0,
 	TOPO_CPU_TYPE_PERFORMANCE,
 	TOPO_CPU_TYPE_EFFICIENCY,
+	TOPO_CPU_TYPE_LOW_POWER,
 	TOPO_CPU_TYPE_UNKNOWN,
 };
 
diff --git a/arch/x86/kernel/acpi/cppc.c b/arch/x86/kernel/acpi/cppc.c
index b8f5dd0..bbade0d 100644
--- a/arch/x86/kernel/acpi/cppc.c
+++ b/arch/x86/kernel/acpi/cppc.c
@@ -281,8 +281,9 @@ int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator)
 			/* use the max scale for performance cores */
 			*numerator = CPPC_HIGHEST_PERF_PERFORMANCE;
 			return 0;
+		case TOPO_CPU_TYPE_LOW_POWER:
 		case TOPO_CPU_TYPE_EFFICIENCY:
-			/* use the highest perf value for efficiency cores */
+			/* use the highest perf value for efficiency and low-power cores */
 			ret = amd_get_highest_perf(cpu, &tmp);
 			if (ret)
 				return ret;
diff --git a/arch/x86/kernel/cpu/topology_common.c b/arch/x86/kernel/cpu/topology_common.c
index 71b6c33..581f2fc 100644
--- a/arch/x86/kernel/cpu/topology_common.c
+++ b/arch/x86/kernel/cpu/topology_common.c
@@ -44,6 +44,7 @@ enum x86_topology_cpu_type get_topology_cpu_type(struct cpuinfo_x86 *c)
 		switch (c->topo.amd_type) {
 		case AMD_CPU_TYPE_PERFORMANCE:	return TOPO_CPU_TYPE_PERFORMANCE;
 		case AMD_CPU_TYPE_EFFICIENCY:	return TOPO_CPU_TYPE_EFFICIENCY;
+		case AMD_CPU_TYPE_LOW_POWER:	return TOPO_CPU_TYPE_LOW_POWER;
 		}
 	}
 
@@ -57,6 +58,8 @@ const char *get_topology_cpu_type_name(struct cpuinfo_x86 *c)
 		return "performance";
 	case TOPO_CPU_TYPE_EFFICIENCY:
 		return "efficiency";
+	case TOPO_CPU_TYPE_LOW_POWER:
+		return "low_power";
 	default:
 		return "unknown";
 	}

      reply	other threads:[~2026-07-25  1:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 15:45 [PATCH v2 0/3] x86/topology: Add support for Low Power cpu_type Vishal Badole
2026-07-21 15:45 ` [PATCH v2 1/3] x86/topo: Map vendor CPU types to generic Linux such types Vishal Badole
2026-07-25  1:39   ` [tip: x86/cpu] " tip-bot2 for Borislav Petkov (AMD)
2026-07-21 15:45 ` [PATCH v2 2/3] x86/topology: Name the AMD core-type values Vishal Badole
2026-07-25  1:39   ` [tip: x86/cpu] " tip-bot2 for Vishal Badole
2026-07-21 15:45 ` [PATCH v2 3/3] x86/topology: Add TOPO_CPU_TYPE_LOW_POWER Vishal Badole
2026-07-25  1:39   ` tip-bot2 for Vishal Badole [this message]

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=178494358921.112641.8632342092707397307.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=Vishal.Badole@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®