lkml.org 
[lkml]   [2018]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH REBASED RESEND] x86/cpu: Move early cpu initialization into a separate translation unit
On Fri, Jun 22, 2018 at 02:05:47PM +0000, Thomas Gleixner wrote:
> On Tue, 12 Jun 2018, Kirill A. Shutemov wrote:
>
> > __pgtable_l5_enabled shouldn't be needed after system has booted, we can
> > mark it as __initdata, but it requires preparation.
> >
> > This patch moves early cpu initialization into a separate translation
> > unit. This limits effect of USE_EARLY_PGTABLE_L5 to less code.
> >
> > Without the change cpu_init() uses __pgtable_l5_enabled. cpu_init() is
> > not __init function and it leads to section mismatch.
> >
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>
> Second thoughts.
>
> The only place where __pgtable_l5_enabled() is used in common.c is in
> early_identify_cpu() which is marked __init. So how is that section
> mismatch triggered?

Yeah, it's not obvious:

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

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2018-06-22 17:15    [W:0.095 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site