From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755672AbZCKLzV (ORCPT ); Wed, 11 Mar 2009 07:55:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754081AbZCKLzE (ORCPT ); Wed, 11 Mar 2009 07:55:04 -0400 Received: from hera.kernel.org ([140.211.167.34]:34727 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753288AbZCKLzB (ORCPT ); Wed, 11 Mar 2009 07:55:01 -0400 Subject: Re: [git-pull -tip V2] x86: cpu architecture debug code From: Jaswinder Singh Rajput To: Ingo Molnar Cc: "H. Peter Anvin" , x86 maintainers , LKML In-Reply-To: <20090310174535.GA2963@elte.hu> References: <1236684201.3301.11.camel@localhost.localdomain> <20090310122806.GE5794@elte.hu> <1236697752.3387.2.camel@localhost.localdomain> <20090310152029.GN3850@elte.hu> <1236701373.3387.4.camel@localhost.localdomain> <20090310174535.GA2963@elte.hu> Content-Type: text/plain; charset="UTF-8" Date: Wed, 11 Mar 2009 17:24:38 +0530 Message-Id: <1236772478.2836.12.camel@ht.satnam> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2009-03-10 at 18:45 +0100, Ingo Molnar wrote: > * Jaswinder Singh Rajput wrote: > > > On Tue, 2009-03-10 at 16:20 +0100, Ingo Molnar wrote: > > > * Jaswinder Singh Rajput wrote: > > > > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > > > If you look at arch/x86/mm/fault.c, they are sorted by length, > > > and within the same length they are sorted alphabetically. > > > > Ok fixed, new pull request: > > > > The following changes since commit 23eeaab0397190b112591dab13d1fb196f099254: > > Ingo Molnar (1): > > Merge branch 'tracing/ftrace' > > > > 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 architecture debug code > > > > arch/x86/Kconfig | 6 + > > arch/x86/include/asm/cpu_debug.h | 193 ++++++++++ > > arch/x86/kernel/cpu/Makefile | 2 + > > arch/x86/kernel/cpu/cpu_debug.c | 784 ++++++++++++++++++++++++++++++++++++++ > > 4 files changed, 985 insertions(+), 0 deletions(-) > > create mode 100755 arch/x86/include/asm/cpu_debug.h > > create mode 100755 arch/x86/kernel/cpu/cpu_debug.c > > 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’ 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 | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Complete diff: diff --git a/arch/x86/kernel/cpu/cpu_debug.c b/arch/x86/kernel/cpu/cpu_debug.c index 0bdf4da..c844262 100755 --- a/arch/x86/kernel/cpu/cpu_debug.c +++ b/arch/x86/kernel/cpu/cpu_debug.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -427,7 +428,7 @@ static void print_tss(void *arg) seq_printf(seq, " CS\t: %04x\n", seg); asm("movl %%ds,%0" : "=r" (seg)); seq_printf(seq, " DS\t: %04x\n", seg); - seq_printf(seq, " SS\t: %04lx\n", regs->ss); + seq_printf(seq, " SS\t: %04lx\n", regs->ss & 0xFF); asm("movl %%es,%0" : "=r" (seg)); seq_printf(seq, " ES\t: %04x\n", seg); asm("movl %%fs,%0" : "=r" (seg)); @@ -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)); seq_printf(seq, " LDT\t: %016lx\n", ldt); /* TR */