x86/mm: Mark p4d_offset() __always_inline
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 18 May 2018 10:35:27 +0000 (13:35 +0300)
committerIngo Molnar <mingo@kernel.org>
Sat, 19 May 2018 09:56:57 +0000 (11:56 +0200)
commit1ea66554d3b09ce09c42e6a871899c84a276bb39
tree4243cce48c6ac0f778e589a3d327704d7672fa72
parent372fddf709041743a93e381556f4c41aad1e28f8
x86/mm: Mark p4d_offset() __always_inline

__pgtable_l5_enabled shouldn't be needed after system has booted, we can
mark it as __initdata, but it requires preparation.

KASAN initialization code is a user of USE_EARLY_PGTABLE_L5, so all
pgtable_l5_enabled() translated to __pgtable_l5_enabled there, including
the one in p4d_offset().

It may lead to section mismatch, if a compiler would not inline
p4d_offset(), but leave it as a standalone function: p4d_offset() is not
marked as __init.

Marking p4d_offset() as __always_inline fixes the issue.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180518103528.59260-7-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/pgtable.h