From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Zi Yan <zi.yan@cs.rutgers.edu>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: mark native_set_p4d() as __always_inline
Date: Tue, 5 Jun 2018 17:10:17 +0300 [thread overview]
Message-ID: <20180605141017.bxqtid7ankvxqrdj@black.fi.intel.com> (raw)
In-Reply-To: <20180605113715.1133726-1-arnd@arndb.de>
On Tue, Jun 05, 2018 at 11:35:15AM +0000, Arnd Bergmann wrote:
> When CONFIG_OPTIMIZE_INLINING is enabled, the function native_set_p4d()
> may not be fully inlined into the caller, resulting in a false-positive
> warning about an access to the __pgtable_l5_enabled variable from a
> non-__init function, despite the original caller being an __init function:
>
> WARNING: vmlinux.o(.text.unlikely+0x1429): Section mismatch in reference from the function native_set_p4d() to the variable .init.data:__pgtable_l5_enabled
> WARNING: vmlinux.o(.text.unlikely+0x1429): Section mismatch in reference from the function native_p4d_clear() to the variable .init.data:__pgtable_l5_enabled
> The function native_set_p4d() references
> the variable __initdata __pgtable_l5_enabled.
> This is often because native_set_p4d lacks a __initdata
> annotation or the annotation of __pgtable_l5_enabled is wrong.
>
> Marking the native_set_p4d function and its caller native_p4d_clear()
> avoids this problem.
>
> I did not bisect the original cause, but I assume this is related to
> the recent rework that turned pgtable_l5_enabled() into an inline
> function, which in turn caused the compiler to make different inlining
> decisions.
>
> Fixes: ad3fe525b950 ("x86/mm: Unify pgtable_l5_enabled usage in early boot code")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for fixing this.
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Do you have a clue which native_set_p4d() call causes the issue?
--
Kirill A. Shutemov
next prev parent reply other threads:[~2018-06-05 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 11:35 Arnd Bergmann
2018-06-05 14:10 ` Kirill A. Shutemov [this message]
2018-06-06 10:12 ` [tip:x86/urgent] x86: Mark " tip-bot for Arnd Bergmann
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=20180605141017.bxqtid7ankvxqrdj@black.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zi.yan@cs.rutgers.edu \
/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®