From: "tip-bot2 for Mario Limonciello" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Mario Limonciello <mario.limonciello@amd.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
ilpo.jarvinen@linux.intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip: x86/platform] x86/itmt: Add debugfs file to show core priorities
Date: Tue, 08 Jul 2025 10:03:52 -0000 [thread overview]
Message-ID: <175196903228.406.9434351357968352011.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250609200518.3616080-14-superm1@kernel.org>
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: f12682148262aa6deed32c0593c67658573d0600
Gitweb: https://git.kernel.org/tip/f12682148262aa6deed32c0593c67658573d0600
Author: Mario Limonciello <mario.limonciello@amd.com>
AuthorDate: Mon, 09 Jun 2025 15:05:18 -05:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 07 Jul 2025 22:35:51 +02:00
x86/itmt: Add debugfs file to show core priorities
Multiple drivers can report priorities to ITMT. To aid in debugging
any issues with the values reported by drivers introduce a debugfs
file to read out the values.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/20250609200518.3616080-14-superm1@kernel.org
---
arch/x86/kernel/itmt.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index 9cea1fc..243a769 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -59,6 +59,18 @@ static ssize_t sched_itmt_enabled_write(struct file *filp,
return result;
}
+static int sched_core_priority_show(struct seq_file *s, void *unused)
+{
+ int cpu;
+
+ seq_puts(s, "CPU #\tPriority\n");
+ for_each_possible_cpu(cpu)
+ seq_printf(s, "%d\t%d\n", cpu, arch_asym_cpu_priority(cpu));
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(sched_core_priority);
+
static const struct file_operations dfs_sched_itmt_fops = {
.read = debugfs_read_file_bool,
.write = sched_itmt_enabled_write,
@@ -67,6 +79,7 @@ static const struct file_operations dfs_sched_itmt_fops = {
};
static struct dentry *dfs_sched_itmt;
+static struct dentry *dfs_sched_core_prio;
/**
* sched_set_itmt_support() - Indicate platform supports ITMT
@@ -102,6 +115,14 @@ int sched_set_itmt_support(void)
return -ENOMEM;
}
+ dfs_sched_core_prio = debugfs_create_file("sched_core_priority", 0644,
+ arch_debugfs_dir, NULL,
+ &sched_core_priority_fops);
+ if (IS_ERR_OR_NULL(dfs_sched_core_prio)) {
+ dfs_sched_core_prio = NULL;
+ return -ENOMEM;
+ }
+
sched_itmt_capable = true;
sysctl_sched_itmt_enabled = 1;
@@ -133,6 +154,8 @@ void sched_clear_itmt_support(void)
debugfs_remove(dfs_sched_itmt);
dfs_sched_itmt = NULL;
+ debugfs_remove(dfs_sched_core_prio);
+ dfs_sched_core_prio = NULL;
if (sysctl_sched_itmt_enabled) {
/* disable sched_itmt if we are no longer ITMT capable */
next prev parent reply other threads:[~2025-07-08 10:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 20:05 [PATCH v11 00/13] Add support for AMD hardware feedback interface Mario Limonciello
2025-06-09 20:05 ` [PATCH v11 01/13] Documentation: x86: Add AMD Hardware Feedback Interface documentation Mario Limonciello
2025-07-08 10:04 ` [tip: x86/platform] Documentation/x86: " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 02/13] MAINTAINERS: Add maintainer entry for AMD Hardware Feedback Driver Mario Limonciello
2025-07-08 10:04 ` [tip: x86/platform] " tip-bot2 for Mario Limonciello
2025-06-09 20:05 ` [PATCH v11 03/13] x86/msr-index: define AMD heterogeneous CPU related MSR Mario Limonciello
2025-07-08 10:04 ` [tip: x86/platform] x86/msr-index: Add AMD workload classification MSRs tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 04/13] platform/x86: hfi: Introduce AMD Hardware Feedback Interface Driver Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 05/13] platform/x86: hfi: parse CPU core ranking data from shared memory Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] platform/x86: hfi: Parse " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 06/13] platform/x86: hfi: init per-cpu scores for each class Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] platform/x86: hfi: Init " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 07/13] platform/x86: hfi: add online and offline callback support Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] platform/x86: hfi: Add " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 08/13] platform/x86: hfi: add power management callback Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] platform/x86: hfi: Add " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 09/13] x86/process: Clear hardware feedback history for AMD processors Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] " tip-bot2 for Perry Yuan
2025-06-09 20:05 ` [PATCH v11 10/13] cpufreq/amd-pstate: Disable preferred cores on designs with workload classification Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] " tip-bot2 for Mario Limonciello
2025-06-09 20:05 ` [PATCH v11 11/13] platform/x86/amd: hfi: Set ITMT priority from ranking data Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] " tip-bot2 for Mario Limonciello
2025-06-09 20:05 ` [PATCH v11 12/13] platform/x86/amd: hfi: Add debugfs support Mario Limonciello
2025-07-08 10:03 ` [tip: x86/platform] " tip-bot2 for Mario Limonciello
2025-06-09 20:05 ` [PATCH v11 13/13] x86/itmt: Add debugfs file to show core priorities Mario Limonciello
2025-07-08 10:03 ` tip-bot2 for Mario Limonciello [this message]
2025-06-23 21:53 ` [PATCH v11 00/13] Add support for AMD hardware feedback interface Mario Limonciello
2025-06-30 10:30 ` Ilpo Järvinen
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=175196903228.406.9434351357968352011.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mario.limonciello@amd.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