lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git-pull -tip V2] x86: cpu architecture debug code

* Ingo Molnar <mingo@elte.hu> wrote:

> * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>
> > @@ -472,7 +473,7 @@ static void print_dt(void *seq)
> > print_desc_ptr("GDT", seq, dt);
> >
> > /* LDT */
> > - store_ldt(ldt);
> > + asm volatile("sldt %0" : "=m" (ldt));
>
> this is still wrong.

As i pointed it out before, we should not open-code an assembly
primitive - especially since store_ldt() is available in
arch/x86/include/asm/desc.h.

True, that primitive is not available on CONFIG_PARAVIRT, but
that is a bug: the fix is to move the store_ldt() definition
outside the CONFIG_PARAVIRT section in desc.h, not to hack
around the problem by open-coding assembly code.

I.e. dont let an uncleanliness and incomplete primitive spread
to other code. Fix the primitive and remove the uncleanliness
that way.

Ingo


\
 
 \ /
  Last update: 2009-03-11 14:15    [W:0.056 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site