]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 22 Jun 2018 22:08:40 +0000 (01:08 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 23 Jun 2018 12:20:37 +0000 (14:20 +0200)
commit94a3ea83674712f00331d9b75c53c8b7c16e29ab
tree95ee5b2e41391ccc89fdf56dd8d9c37e305710bf
parent5e109ee81c07c7ab4ae6a4201bb4596635204736
Revert "x86/mm: Mark __pgtable_l5_enabled __initdata"

This reverts commit 04d97d62c661ff7ca262481bb8eb814d3611e4a5.

We need to use early version of pgtable_l5_enabled() in
early_identify_cpu() as this code runs before cpu_feature_enabled() is
usable.

But it leads to section mismatch:

cpu_init()
  load_mm_ldt()
    ldt_slot_va()
      LDT_BASE_ADDR
        LDT_PGD_ENTRY
  pgtable_l5_enabled()
    __pgtable_l5_enabled

__pgtable_l5_enabled marked as __initdata, but cpu_init() is not __init.

It's fixable: early code can be isolated into a separate translation unit,
but such change collides with other work in the area.  That's too much
hassle to save 4 bytes of memory.

Return __pgtable_l5_enabled back to be __ro_after_init.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lkml.kernel.org/r/20180622220841.54135-2-kirill.shutemov@linux.intel.com
arch/x86/kernel/head64.c