* [PATCH] x86/mm: Drop unneeded __always_inline for p4d page table helpers
@ 2018-06-25 22:35 Kirill A. Shutemov
2018-06-26 7:14 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Kirill A. Shutemov @ 2018-06-25 22:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, x86
Cc: linux-kernel, Kirill A. Shutemov, Arnd Bergmann
This reverts commits 1ea66554d3b09ce09c42e6a871899c84a276bb39 and
046c0dbec0238c25b7526c26c9a9687664229ce2.
p4d_offset(), native_set_p4d() and native_p4d_clear() were marked
__always_inline in attempt to move __pgtable_l5_enabled into __initdata
section.
It was required as KASAN initialization code is a user of
USE_EARLY_PGTABLE_L5, so all pgtable_l5_enabled() translated to
__pgtable_l5_enabled there. This includes pgtable_l5_enabled() called
from inline p4d helpers.
If compiler would decided to not inline these p4d helpers, but leave
them standalone, we end up with section mismatch.
We don't need __always_inline here anymore. __pgtable_l5_enabled moved
back to be __ro_after_init. See commit
51be13351517 ("Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"")
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/include/asm/pgtable.h | 2 +-
arch/x86/include/asm/pgtable_64.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 99ecde23c3ec..5715647fc4fe 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -898,7 +898,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)
#define pgd_page(pgd) pfn_to_page(pgd_pfn(pgd))
/* to find an entry in a page-table-directory. */
-static __always_inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
+static inline p4d_t *p4d_offset(pgd_t *pgd, unsigned long address)
{
if (!pgtable_l5_enabled())
return (p4d_t *)pgd;
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h
index 0fdcd21dadbd..3c5385f9a88f 100644
--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -216,7 +216,7 @@ static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd)
}
#endif
-static __always_inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
+static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
{
pgd_t pgd;
@@ -230,7 +230,7 @@ static __always_inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d)
*p4dp = native_make_p4d(native_pgd_val(pgd));
}
-static __always_inline void native_p4d_clear(p4d_t *p4d)
+static inline void native_p4d_clear(p4d_t *p4d)
{
native_set_p4d(p4d, native_make_p4d(0));
}
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/mm: Drop unneeded __always_inline for p4d page table helpers
2018-06-25 22:35 [PATCH] x86/mm: Drop unneeded __always_inline for p4d page table helpers Kirill A. Shutemov
@ 2018-06-26 7:14 ` Ingo Molnar
2018-06-26 10:01 ` Kirill A. Shutemov
0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2018-06-26 7:14 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, x86, linux-kernel,
Arnd Bergmann
* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
> This reverts commits 1ea66554d3b09ce09c42e6a871899c84a276bb39 and
> 046c0dbec0238c25b7526c26c9a9687664229ce2.
Could you please write out these commits explicitly and both with title, with one
commit per line, like you did here:
> 51be13351517 ("Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"")
?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/mm: Drop unneeded __always_inline for p4d page table helpers
2018-06-26 7:14 ` Ingo Molnar
@ 2018-06-26 10:01 ` Kirill A. Shutemov
0 siblings, 0 replies; 3+ messages in thread
From: Kirill A. Shutemov @ 2018-06-26 10:01 UTC (permalink / raw)
To: Ingo Molnar
Cc: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, x86, linux-kernel,
Arnd Bergmann
On Tue, Jun 26, 2018 at 07:14:54AM +0000, Ingo Molnar wrote:
>
> * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
>
> > This reverts commits 1ea66554d3b09ce09c42e6a871899c84a276bb39 and
> > 046c0dbec0238c25b7526c26c9a9687664229ce2.
>
> Could you please write out these commits explicitly and both with title, with one
> commit per line, like you did here:
>
> > 51be13351517 ("Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"")
>
> ?
Okay.
I've tried to mimic commit message produced by `git revert'.
--
Kirill A. Shutemov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-26 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 22:35 [PATCH] x86/mm: Drop unneeded __always_inline for p4d page table helpers Kirill A. Shutemov
2018-06-26 7:14 ` Ingo Molnar
2018-06-26 10:01 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).