From: Mario Limonciello <superm1@kernel.org>
To: "Rong Zhang" <i@rong.moe>,
"Shyam Sundar S K" <Shyam-sundar.S-k@amd.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sanket Goswami" <Sanket.Goswami@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: Tue, 1 Sep 2026 10:09:12 -0500 [thread overview]
Message-ID: <fe3427a3-1771-4ae0-9043-8576640f5e45@kernel.org> (raw)
In-Reply-To: <20260901-amd-pmf-fix-outlining-v1-0-b54ff94d3d45@rong.moe>
On 9/1/26 10:02, 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>
> ---
> 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
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
prev parent reply other threads:[~2026-09-01 15:09 UTC|newest]
Thread overview: 7+ 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 ` Mario Limonciello [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=fe3427a3-1771-4ae0-9043-8576640f5e45@kernel.org \
--to=superm1@kernel.org \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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®