From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: "Rong Zhang" <i@rong.moe>, "Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sanket Goswami" <Sanket.Goswami@amd.com>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
patil.reddy@amd.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] platform/x86/amd/pmf: Clean up undesirable function outlining
Date: Wed, 30 Sep 2026 22:58:16 +0530 [thread overview]
Message-ID: <7c8cb2b9-b44a-4f91-93eb-daa55a498384@amd.com> (raw)
In-Reply-To: <d3ed3f2ac2e8ed960e0bc9b86d4732a75f1464e7.camel@rong.moe>
On 19-09-2026 20:48, Rong Zhang wrote:
> Hi all,
>
> On Tue, 2026-09-01 at 23:02 +0800, Rong Zhang wrote:
>> The amd-pmf driver is notably bloated due to undesirable function
>> outlining and linkage. Simple and dump helper functions as well as
>> wrappers should really be static inline functions instead of global ones
>> from the very beginning, or else they are prone to the overhead of
>> function outlining and linkage, which bloats themselves and their
>> callers.
>>
>> The series converts all these helper functions and wrappers into static
>> inline functions, and shrink the module (!CONFIG_AMD_PMF_DEBUG &&
>> CONFIG_AMD_PMF_UTIL_SUPPORT) size by 1472 Bytes (GCC 16 -O2):
>>
>> text data bss total filename (before)
>> 26810 31672 2768 61250 amd-pmf.ko
>>
>> text data bss total filename (after)
>> 26046 30964 2768 59778 amd-pmf.ko
>>
>> As for CONFIG_AMD_PMF_DEBUG && CONFIG_AMD_PMF_UTIL_SUPPORT builds, the
>> module size is shrunk by 1187 Bytes:
>>
>> text data bss total filename (before)
>> 34593 45500 2784 82877 amd-pmf.ko
>>
>> text data bss total filename (after)
>> 33988 44918 2784 81690 amd-pmf.ko
>>
>> This should also optimize the performance a little bit theoretically,
>> though it's probably not very important on modern hardware anyway.
>>
>> Signed-off-by: Rong Zhang <i@rong.moe>
>
> Gentle ping.
Thank you for your contribution. Series looks good to me and I did a sanity on couple of
platforms as well.
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Thanks,
Shyam
>
> Thanks,
> Rong
>
>> ---
>> Rong Zhang (5):
>> platform/x86/amd/pmf: Inline !AMD_PMF_DEBUG stub
>> platform/x86/amd/pmf: Inline simple helper functions of Core Layer
>> platform/x86/amd/pmf: Inline simple helper function of SPS Layer
>> platform/x86/amd/pmf: Inline simple helper function of Smart PC TA interfaces
>> platform/x86/amd/pmf: Inline wrappers of ap{mf,ts}_if_call_store_buffer()
>>
>> drivers/platform/x86/amd/pmf/acpi.c | 76 +-----------------
>> drivers/platform/x86/amd/pmf/core.c | 22 ------
>> drivers/platform/x86/amd/pmf/pmf.h | 150 +++++++++++++++++++++++++++++++-----
>> drivers/platform/x86/amd/pmf/spc.c | 15 ----
>> drivers/platform/x86/amd/pmf/sps.c | 5 --
>> 5 files changed, 131 insertions(+), 137 deletions(-)
>> ---
>> base-commit: 9ffed84a24d60ec506d8961fe138f0baa92fdbd0
>> change-id: 6f1861db-amd-pmf-fix-outlining-204546e884cf
>>
>> Thanks,
>> Rong
prev parent reply other threads:[~2026-09-30 17:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 15:02 Rong Zhang
2026-09-01 15:02 ` [PATCH 1/5] platform/x86/amd/pmf: Inline !AMD_PMF_DEBUG stub Rong Zhang
2026-09-01 15:02 ` [PATCH 2/5] platform/x86/amd/pmf: Inline simple helper functions of Core Layer Rong Zhang
2026-09-01 15:02 ` [PATCH 3/5] platform/x86/amd/pmf: Inline simple helper function of SPS Layer Rong Zhang
2026-09-01 15:02 ` [PATCH 4/5] platform/x86/amd/pmf: Inline simple helper function of Smart PC TA interfaces Rong Zhang
2026-09-01 15:02 ` [PATCH 5/5] platform/x86/amd/pmf: Inline wrappers of ap{mf,ts}_if_call_store_buffer() Rong Zhang
2026-09-01 15:09 ` [PATCH 0/5] platform/x86/amd/pmf: Clean up undesirable function outlining Mario Limonciello
2026-09-19 15:18 ` Rong Zhang
2026-09-30 17:28 ` Shyam Sundar S K [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=7c8cb2b9-b44a-4f91-93eb-daa55a498384@amd.com \
--to=shyam-sundar.s-k@amd.com \
--cc=Sanket.Goswami@amd.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patil.reddy@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=superm1@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®