<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/platform/x86/amd/hfi, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>platform/x86/amd: hfi: Support for ranking table versions</title>
<updated>2026-05-19T10:42:04+00:00</updated>
<author>
<name>Krishnamoorthi M</name>
<email>krishnamoorthi.m@amd.com</email>
</author>
<published>2026-05-07T19:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4339fa4fae057c99cbcfd8127769219feb14964b'/>
<id>4339fa4fae057c99cbcfd8127769219feb14964b</id>
<content type='text'>
Add changes to support new ranking table version. Version 2 of the
heterogeneous ranking table provides static CPU rankings. Version 3 adds
dynamic ranking table support on newer AMD platforms. These changes ensure
that platforms still reporting version 2 continue to function with the
existing static ranking path, avoiding regressions on older hardware
that does not supply a dynamic ranking table.

Signed-off-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://patch.msgid.link/20260507190926.1211726-1-krishnamoorthi.m@amd.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add changes to support new ranking table version. Version 2 of the
heterogeneous ranking table provides static CPU rankings. Version 3 adds
dynamic ranking table support on newer AMD platforms. These changes ensure
that platforms still reporting version 2 continue to function with the
existing static ranking path, avoiding regressions on older hardware
that does not supply a dynamic ranking table.

Signed-off-by: Krishnamoorthi M &lt;krishnamoorthi.m@amd.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Reviewed-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt;
Link: https://patch.msgid.link/20260507190926.1211726-1-krishnamoorthi.m@amd.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86/amd: hfi: Remove redundant assignment to .owner</title>
<updated>2025-10-15T08:38:28+00:00</updated>
<author>
<name>Kuan-Wei Chiu</name>
<email>visitorckw@gmail.com</email>
</author>
<published>2025-10-11T06:38:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0254329897495c42646144376230add710078937'/>
<id>0254329897495c42646144376230add710078937</id>
<content type='text'>
The coccicheck tool reports the following warning for this driver:

./hfi.c:509:3-8: No need to set .owner here. The core will do it.

The manual assignment of .owner = THIS_MODULE; in the platform_driver
struct is redundant. The platform_driver_register() function, which is
called to register the driver, is a macro that automatically sets the
driver's owner to THIS_MODULE.

The driver core handles this assignment internally, making the explicit
initialization in the struct definition unnecessary. Remove the
unnecessary line.

Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20251011063837.2318535-3-visitorckw@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The coccicheck tool reports the following warning for this driver:

./hfi.c:509:3-8: No need to set .owner here. The core will do it.

The manual assignment of .owner = THIS_MODULE; in the platform_driver
struct is redundant. The platform_driver_register() function, which is
called to register the driver, is a macro that automatically sets the
driver's owner to THIS_MODULE.

The driver core handles this assignment internally, making the explicit
initialization in the struct definition unnecessary. Remove the
unnecessary line.

Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://patch.msgid.link/20251011063837.2318535-3-visitorckw@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86/amd: hfi: Remove unused cpumask from cpuinfo struct</title>
<updated>2025-10-15T08:38:25+00:00</updated>
<author>
<name>Kuan-Wei Chiu</name>
<email>visitorckw@gmail.com</email>
</author>
<published>2025-10-11T06:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=32647324c77012b7aed7ef48752909510d3c7ec7'/>
<id>32647324c77012b7aed7ef48752909510d3c7ec7</id>
<content type='text'>
The cpus field within the struct amd_hfi_cpuinfo was allocated and set
in the amd_hfi_online() CPU hotplug callback, and subsequently freed in
the amd_hfi_offline() callback.

However, after being initialized, this cpumask was never read or used
for any purpose within the driver. It represents dead code that serves
no functional role.

This change has no impact on the driver's functionality as the removed
code was entirely superfluous.

Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://patch.msgid.link/20251011063837.2318535-2-visitorckw@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cpus field within the struct amd_hfi_cpuinfo was allocated and set
in the amd_hfi_online() CPU hotplug callback, and subsequently freed in
the amd_hfi_offline() callback.

However, after being initialized, this cpumask was never read or used
for any purpose within the driver. It represents dead code that serves
no functional role.

This change has no impact on the driver's functionality as the removed
code was entirely superfluous.

Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://patch.msgid.link/20251011063837.2318535-2-visitorckw@gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86/amd: hfi: Fix pcct_tbl leak in amd_hfi_metadata_parser()</title>
<updated>2025-08-25T11:07:02+00:00</updated>
<author>
<name>Zhen Ni</name>
<email>zhen.ni@easystack.cn</email>
</author>
<published>2025-08-22T08:33:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d3a8ca2ebe6e3f2b1fb0e8e74f909d109a1d77c7'/>
<id>d3a8ca2ebe6e3f2b1fb0e8e74f909d109a1d77c7</id>
<content type='text'>
Fix a permanent ACPI table memory leak when amd_hfi_metadata_parser()
fails due to invalid PCCT table length or memory allocation errors.

Fixes: d4e95ea7a78e ("platform/x86: hfi: Parse CPU core ranking data from shared memory")
Cc: stable@vger.kernel.org
Signed-off-by: Zhen Ni &lt;zhen.ni@easystack.cn&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://lore.kernel.org/r/20250822083329.710857-1-zhen.ni@easystack.cn
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a permanent ACPI table memory leak when amd_hfi_metadata_parser()
fails due to invalid PCCT table length or memory allocation errors.

Fixes: d4e95ea7a78e ("platform/x86: hfi: Parse CPU core ranking data from shared memory")
Cc: stable@vger.kernel.org
Signed-off-by: Zhen Ni &lt;zhen.ni@easystack.cn&gt;
Reviewed-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Link: https://lore.kernel.org/r/20250822083329.710857-1-zhen.ni@easystack.cn
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86/amd: hfi: Add debugfs support</title>
<updated>2025-07-07T20:34:59+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2025-06-09T20:05:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=13bc67a96ea5bc9dba0b91704d1f7212b65686f3'/>
<id>13bc67a96ea5bc9dba0b91704d1f7212b65686f3</id>
<content type='text'>
Add a dump of the class and capabilities table to debugfs to assist
with debugging scheduler issues.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-13-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a dump of the class and capabilities table to debugfs to assist
with debugging scheduler issues.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-13-superm1@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86/amd: hfi: Set ITMT priority from ranking data</title>
<updated>2025-07-07T20:34:17+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2025-06-09T20:05:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=216fe0d7680b2503e09edd1d7dca73305806591c'/>
<id>216fe0d7680b2503e09edd1d7dca73305806591c</id>
<content type='text'>
The static ranking data that is read at module load should be used
to set up the priorities for the cores relative to the performance
values.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-12-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static ranking data that is read at module load should be used
to set up the priorities for the cores relative to the performance
values.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-12-superm1@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86: hfi: Add power management callback</title>
<updated>2025-07-07T20:26:37+00:00</updated>
<author>
<name>Perry Yuan</name>
<email>Perry.Yuan@amd.com</email>
</author>
<published>2025-06-09T20:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=263e66f9c35922d0cfd961df6d7a492820143792'/>
<id>263e66f9c35922d0cfd961df6d7a492820143792</id>
<content type='text'>
Introduce power management callbacks for the `amd_hfi` driver.  Specifically,
add the `suspend` and `resume` callbacks to handle the necessary operations
during system low power states and wake-up.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-9-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce power management callbacks for the `amd_hfi` driver.  Specifically,
add the `suspend` and `resume` callbacks to handle the necessary operations
during system low power states and wake-up.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-9-superm1@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86: hfi: Add online and offline callback support</title>
<updated>2025-07-07T20:24:40+00:00</updated>
<author>
<name>Perry Yuan</name>
<email>Perry.Yuan@amd.com</email>
</author>
<published>2025-06-09T20:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bb20421c05fc0a0fd70a3f8af076319f7dec4cf1'/>
<id>bb20421c05fc0a0fd70a3f8af076319f7dec4cf1</id>
<content type='text'>
There are some firmware parameters that need to be configured
when a CPU core is brought online or offline.

When a CPU is online, it will initialize the workload classification
parameters to CPU firmware which will trigger the workload class ID
updating function.

Once the CPU is going offline, it will need to disable the workload
classification function and clear the history.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-8-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are some firmware parameters that need to be configured
when a CPU core is brought online or offline.

When a CPU is online, it will initialize the workload classification
parameters to CPU firmware which will trigger the workload class ID
updating function.

Once the CPU is going offline, it will need to disable the workload
classification function and clear the history.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-8-superm1@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86: hfi: Init per-cpu scores for each class</title>
<updated>2025-07-07T19:19:17+00:00</updated>
<author>
<name>Perry Yuan</name>
<email>Perry.Yuan@amd.com</email>
</author>
<published>2025-06-09T20:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b6ffe4d9e074561f95a728e1f822ed15e533ec6e'/>
<id>b6ffe4d9e074561f95a728e1f822ed15e533ec6e</id>
<content type='text'>
Initialize per CPU score `amd_hfi_ipcc_scores` which store energy score
and performance score data for each class.

Classic and dense cores are ranked according to those values as energy
efficiency capability or performance capability.  OS scheduler will pick cores
from the ranking list on each class ID for the thread which provide the class
id got from hardware feedback interface.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-7-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Initialize per CPU score `amd_hfi_ipcc_scores` which store energy score
and performance score data for each class.

Classic and dense cores are ranked according to those values as energy
efficiency capability or performance capability.  OS scheduler will pick cores
from the ranking list on each class ID for the thread which provide the class
id got from hardware feedback interface.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-7-superm1@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/x86: hfi: Parse CPU core ranking data from shared memory</title>
<updated>2025-07-07T19:17:16+00:00</updated>
<author>
<name>Perry Yuan</name>
<email>Perry.Yuan@amd.com</email>
</author>
<published>2025-06-09T20:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d4e95ea7a78e46be2f2fe529fe578d3834c453a2'/>
<id>d4e95ea7a78e46be2f2fe529fe578d3834c453a2</id>
<content type='text'>
When `amd_hfi` driver is loaded, it will use PCCT subspace type 4 table
to retrieve the shared memory address which contains the CPU core ranking
table. This table includes a header that specifies the number of ranking
data entries to be parsed and rank each CPU core with the Performance and
Energy Efficiency capability as implemented by the CPU power management
firmware.

Once the table has been parsed, each CPU is assigned a ranking score
within its class. Subsequently, when the scheduler selects cores, it
chooses from the ranking list based on the assigned scores in each class,
thereby ensuring the optimal selection of CPU cores according to their
predefined classifications and priorities.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-6-superm1@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `amd_hfi` driver is loaded, it will use PCCT subspace type 4 table
to retrieve the shared memory address which contains the CPU core ranking
table. This table includes a header that specifies the number of ranking
data entries to be parsed and rank each CPU core with the Performance and
Energy Efficiency capability as implemented by the CPU power management
firmware.

Once the table has been parsed, each CPU is assigned a ranking score
within its class. Subsequently, when the scheduler selects cores, it
chooses from the ranking list based on the assigned scores in each class,
thereby ensuring the optimal selection of CPU cores according to their
predefined classifications and priorities.

Signed-off-by: Perry Yuan &lt;Perry.Yuan@amd.com&gt;
Co-developed-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/20250609200518.3616080-6-superm1@kernel.org
</pre>
</div>
</content>
</entry>
</feed>
