From: Nathan Chancellor <nathan@kernel.org>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
patches@lists.linux.dev
Subject: Re: [PATCH v3] x86/resctrl: Annotate get_mem_config() functions as __init
Date: Fri, 20 Sep 2024 02:37:22 -0700 [thread overview]
Message-ID: <20240920093722.GA411564@thelio-3990X> (raw)
In-Reply-To: <2deb3b0c-121c-4dfb-9179-e919582f5bb4@intel.com>
On Thu, Sep 19, 2024 at 02:15:34PM -0700, Reinette Chatre wrote:
>
>
> On 9/17/24 9:02 AM, Nathan Chancellor wrote:
> > After a recent LLVM change [1] that deduces __cold on functions that
> > only call cold code (such as __init functions), there is a section
> > mismatch warning from __get_mem_config_intel(), which got moved to
> > .text.unlikely. as a result of that optimization:
> >
> > WARNING: modpost: vmlinux: section mismatch in reference: __get_mem_config_intel+0x77 (section: .text.unlikely.) -> thread_throttle_mode_init (section: .init.text)
> >
> > Mark __get_mem_config_intel() as __init as well since it is only called
> > from __init code, which clears up the warning.
> >
> > While __rdt_get_mem_config_amd() does not exhibit a warning because it
> > does not call any __init code, it is a similar function that is only
> > called from __init code like __get_mem_config_intel(), so mark it __init
> > as well to keep the code symmetrical.
> >
> > Link: https://github.com/llvm/llvm-project/commit/6b11573b8c5e3d36beee099dbe7347c2a007bf53 [1]
> > Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
>
> If there is a re-spin I think appropriate Fixes tags can be added:
> Fixes: 05b93417ce5b ("x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)")
> Fixes: 4d05bf71f157 ("x86/resctrl: Introduce AMD QOS feature")
>
> I am not familiar with stable rules related to compiler impact but
> this may fall into the "it bothers people" category of fixes so
> a Cc: stable@vger.kernel.org sounds appropriate also.
Yes, I think it would be reasonable to have Fixes and a Cc: stable since
this can turn fatal with CONFIG_SECTION_MISMATCH_WARN_ONLY=n (even if
there should be no real issue at run time because these functions are
only called from __init code).
I'll send a v4 upon request from whoever will apply this. Otherwise,
here is a copy and pasteable block:
Cc: stable@vger.kernel.org
Fixes: 05b93417ce5b ("x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)")
Fixes: 4d05bf71f157 ("x86/resctrl: Introduce AMD QOS feature")
Cheers,
Nathan
prev parent reply other threads:[~2024-09-20 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 16:02 [PATCH v3] x86/resctrl: Annotate get_mem_config() functions as __init Nathan Chancellor
2024-09-19 21:15 ` Reinette Chatre
2024-09-20 9:37 ` Nathan Chancellor [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=20240920093722.GA411564@thelio-3990X \
--to=nathan@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=patches@lists.linux.dev \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--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