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

* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> On Wed, 2009-03-11 at 11:53 +0100, Ingo Molnar wrote:
> > * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
> >
> > > On Tue, 2009-03-10 at 18:45 +0100, Ingo Molnar wrote:
> > > > Thanks - picked it up into tip:x86/debug. (Note that i
> > > > rearranged the Makefile details a bit so that it does not
> > > > conflict with tip:perfcounters)
> > > >
> > > > Not yet in tip:master, because it triggers this build failure:
> > > >
> > > > arch/x86/kernel/cpu/cpu_debug.c: In function ‘print_dt’:
> > > > arch/x86/kernel/cpu/cpu_debug.c:475: error: implicit declaration of function ‘store_ldt’
> > > >
> > >
> > > Here is the fix.
> > >
> > > The following changes since commit 259ef6fcea4046fe24495b1e3631c1b905c531c1:
> > > Jaswinder Singh Rajput (1):
> > > x86: cpu architecture debug code
> > >
> > > are available in the git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tip-cpu.git master
> > >
> > > Jaswinder Singh Rajput (1):
> > > x86: cpu_debug.c remove some dependency
> > >
> > > arch/x86/kernel/cpu/cpu_debug.c | 8 ++++----
> > > 1 files changed, 4 insertions(+), 4 deletions(-)
> > >
> > > Complete diff:
> > > diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c
> > > index 0bdf4da..08c365a 100755
> > > --- a/arch/x86/kernel/cpu/cpu_debug.c
> > > +++ b/arch/x86/kernel/cpu/cpu_debug.c
> > > @@ -464,19 +464,19 @@ static void print_dt(void *seq)
> > > unsigned long ldt;
> > >
> > > /* IDT */
> > > - store_idt((struct desc_ptr *)&dt);
> > > + native_store_idt((struct desc_ptr *)&dt);
> >
> > hm, this wont work on Xen then.
> >
>
> Strange it should work for Xen, Are you getting any error.

s/Xen/virtualization

Look at how the native_*() primitives are used. They are not
there to be open-coded in generic code. They are there for
paravirt-internal reasons: they are the native version but a
guest implementation might decide to override it.

> > > print_desc_ptr("IDT", seq, dt);
> > >
> > > /* GDT */
> > > - store_gdt((struct desc_ptr *)&dt);
> > > + native_store_gdt((struct desc_ptr *)&dt);
> > > print_desc_ptr("GDT", seq, dt);
> > >
> > > /* LDT */
> > > - store_ldt(ldt);
> > > + asm volatile("sldt %0" : "=m" (ldt));
> > > seq_printf(seq, " LDT\t: %016lx\n", ldt);
> > >
> > > /* TR */
> > > - store_tr(ldt);
> > > + asm volatile("str %0" : "=r" (ldt));
> > > seq_printf(seq, " TR\t: %016lx\n", ldt);
> >
> > we do have a store_tr() primitive - why open code the assembly?
> >
>
> It is a single line code to avoid further conflicts, so i
> moved it here.

and that's wrong.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-03-11 12:37    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site