From sdake@mvista.com Mon Jun 6 14:39:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 06 Jun 2005 14:39:21 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j56LdEXq001365 for ; Mon, 6 Jun 2005 14:39:16 -0700 Received: from persist.az.mvista.com (persist.az.mvista.com [10.50.1.87]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id PAA27840 for ; Mon, 6 Jun 2005 15:11:07 -0700 Subject: kdb doesn't compile with KDB modules with gcc 3.4.1 toolchain From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com Content-type: text/plain Organization: MontaVista Software, Inc. Message-Id: <1118093891.4305.68.camel@persist.az.mvista.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 06 Jun 2005 14:38:11 -0700 Content-Transfer-Encoding: 8bit X-archive-position: 971 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb I couldn't get kdb to compile with KDB modules set to * (but m works). I traced it to the linker script not properly setting up the init call table. The patch is: Index: linux-2.6.10/arch/i386/kernel/vmlinux.lds.S =================================================================== --- linux-2.6.10.orig/arch/i386/kernel/vmlinux.lds.S +++ linux-2.6.10/arch/i386/kernel/vmlinux.lds.S @@ -91,7 +91,9 @@ } __con_initcall_end = .; __kdb_initcall_start = .; - .kdb_initcall.init : { *(.kdb_initcall.init) } + .kdb_initcall.init : AT(ADDR(.kdb_initcall.init) - LOAD_OFFSET) { + *(.kdb_initcall.init) + } __kdb_initcall_end = .; SECURITY_INIT Source: MontaVista Software, Inc. Signed-off-by: Steven Dake Description: The KDB init call section is not properly setup in the linker script. This patch sets up the init call linker start location so that the object tools can build the kernel with KDB modules turned on. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Mon Jun 6 19:28:36 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 06 Jun 2005 19:28:40 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j572SYXq030490 for ; Mon, 6 Jun 2005 19:28:35 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA12817 for ; Tue, 7 Jun 2005 12:27:30 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 32B886897; Tue, 7 Jun 2005 12:27:30 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 2F17D20012B; Tue, 7 Jun 2005 12:27:30 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: sdake@mvista.com Cc: kdb@oss.sgi.com Subject: Re: kdb doesn't compile with KDB modules with gcc 3.4.1 toolchain In-reply-to: Your message of "Mon, 06 Jun 2005 14:38:11 MST." <1118093891.4305.68.camel@persist.az.mvista.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Tue, 07 Jun 2005 12:27:30 +1000 Message-ID: <27934.1118111250@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 972 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Mon, 06 Jun 2005 14:38:11 -0700, Steven Dake wrote: >I couldn't get kdb to compile with KDB modules set to * (but m works). I build kdb for i386 with gcc 3.4.3 all the time (FC3). It has no problems with any value of KDB_MODULES, I just tried y, m and n, all built clean. '*' is not a valid setting for a config tristate variable. What value are you using for KDB_MODULES? What tool chain errors are you seeing? > __con_initcall_end = .; > __kdb_initcall_start = .; >- .kdb_initcall.init : { *(.kdb_initcall.init) } >+ .kdb_initcall.init : AT(ADDR(.kdb_initcall.init) - LOAD_OFFSET) { >+ *(.kdb_initcall.init) >+ } .kdb_initcall.init is functionally identical to the immediately preceding .con_initcall.init, and to all the other init sections in arch/i386/vmlinux.lds.S. If kdb needs changing then they all do. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Tue Jun 7 13:19:28 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 07 Jun 2005 13:19:32 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j57KJRXq022712 for ; Tue, 7 Jun 2005 13:19:27 -0700 Received: from persist.az.mvista.com (persist.az.mvista.com [10.50.1.87]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id NAA28952; Tue, 7 Jun 2005 13:51:19 -0700 Subject: Re: kdb doesn't compile with KDB modules with gcc 3.4.1 toolchain From: Steven Dake Reply-To: sdake@mvista.com To: Keith Owens Cc: kdb@oss.sgi.com In-Reply-To: <27934.1118111250@kao2.melbourne.sgi.com> References: <27934.1118111250@kao2.melbourne.sgi.com> Content-type: text/plain Organization: MontaVista Software, Inc. Message-Id: <1118175500.17766.38.camel@persist.az.mvista.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 07 Jun 2005 13:18:21 -0700 Content-Transfer-Encoding: 8bit X-archive-position: 973 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Keith Thanks for your detailed response. Your post resulted in me looking at kernel.org kernels. I find kernel.org kernels do not need this change. This change is required for the "kexec" patches (which was merged ahead of our kdb patches in our tree). Anyone doing a merge with kexec will want this patch. Sorry for the confusion. regards -steve On Mon, 2005-06-06 at 19:27, Keith Owens wrote: > On Mon, 06 Jun 2005 14:38:11 -0700, > Steven Dake wrote: > >I couldn't get kdb to compile with KDB modules set to * (but m works). > > I build kdb for i386 with gcc 3.4.3 all the time (FC3). It has no > problems with any value of KDB_MODULES, I just tried y, m and n, all > built clean. '*' is not a valid setting for a config tristate > variable. > > What value are you using for KDB_MODULES? What tool chain errors are > you seeing? > > > __con_initcall_end = .; > > __kdb_initcall_start = .; > >- .kdb_initcall.init : { *(.kdb_initcall.init) } > >+ .kdb_initcall.init : AT(ADDR(.kdb_initcall.init) - LOAD_OFFSET) { > >+ *(.kdb_initcall.init) > >+ } > > .kdb_initcall.init is functionally identical to the immediately > preceding .con_initcall.init, and to all the other init sections in > arch/i386/vmlinux.lds.S. If kdb needs changing then they all do. > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From chait@chelsio.com Tue Jun 7 19:19:05 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 07 Jun 2005 19:19:08 -0700 (PDT) Received: from stargate.chelsio.com (stargate.chelsio.com [64.186.171.138] (may be forged)) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j582J3Xq018253 for ; Tue, 7 Jun 2005 19:19:05 -0700 Received: from YOGI.asicdesigners.com (yogi.asicdesigners.com [10.192.160.7]) by stargate.chelsio.com (8.12.5/8.12.5) with SMTP id j582Hu6H009640 for ; Tue, 7 Jun 2005 19:17:57 -0700 Received: from ramana.asicdesigners.com ([10.192.161.104]) by YOGI.asicdesigners.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 7 Jun 2005 19:17:56 -0700 Subject: kdb for x86_64, Linux 2.6.11 From: Chait Tumuluri To: kdb@oss.sgi.com Cc: Chait Tumuluri Content-type: text/plain Organization: Message-Id: <1118197076.8307.18.camel@aish> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 07 Jun 2005 19:17:56 -0700 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 08 Jun 2005 02:17:56.0883 (UTC) FILETIME=[48CF1E30:01C56BD0] X-archive-position: 974 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: chait@chelsio.com Precedence: bulk X-list: kdb Hi folks, Is there a port for x86_64, Linux 2.6.11 out there? I tried using the 2.6.11-common3 with the 2.6.8 arch-specific kdb patch and it fails during bootup (where it frees up unused kernel memory). The same behavior with 2.6.9 arch-specific patch as well. TIA for any insights or patches. Regards, -Chait. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jfv@bluesong.net Tue Jun 7 23:53:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Tue, 07 Jun 2005 23:53:19 -0700 (PDT) Received: from trane.bluesong.net (bdsl.66.13.29.10.gte.net [66.13.29.10]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j586rGXq010362 for ; Tue, 7 Jun 2005 23:53:16 -0700 Received: by trane.bluesong.net (Postfix, from userid 500) id EC665241B51; Tue, 7 Jun 2005 23:52:11 -0700 (PDT) Date: Tue, 7 Jun 2005 23:52:11 -0700 From: Jack F Vogel To: Chait Tumuluri Cc: kdb@oss.sgi.com Subject: Re: kdb for x86_64, Linux 2.6.11 Message-ID: <20050608065211.GA32127@trane.bluesong.net> Reply-To: jfv@bluesong.net References: <1118197076.8307.18.camel@aish> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1118197076.8307.18.camel@aish> User-Agent: Mutt/1.5.6i Content-Transfer-Encoding: 8bit X-archive-position: 975 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jfv@bluesong.net Precedence: bulk X-list: kdb On Tue, Jun 07, 2005 at 07:17:56PM -0700, Chait Tumuluri wrote: > Hi folks, > > Is there a port for x86_64, Linux 2.6.11 out there? > > I tried using the 2.6.11-common3 with the 2.6.8 arch-specific > kdb patch and it fails during bootup (where it frees up unused > kernel memory). The same behavior with 2.6.9 arch-specific patch > as well. > > TIA for any insights or patches. > > Regards, > -Chait. Well I did the 2.6.8 patch, however my job has me very busy the last six months, none of it devoted to kdb :( I will try and take a look at the current kernel. What is the failure mode during boot, a panic, a hang? Regards, Jack --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From chait@chelsio.com Wed Jun 8 10:02:43 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 08 Jun 2005 10:02:50 -0700 (PDT) Received: from stargate.chelsio.com (stargate.chelsio.com [64.186.171.138] (may be forged)) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j58H2hXq005016 for ; Wed, 8 Jun 2005 10:02:43 -0700 Received: from YOGI.asicdesigners.com (yogi.asicdesigners.com [10.192.160.7]) by stargate.chelsio.com (8.12.5/8.12.5) with SMTP id j58H1S6H012626; Wed, 8 Jun 2005 10:01:28 -0700 Received: from ramana.asicdesigners.com ([10.192.161.104]) by YOGI.asicdesigners.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Jun 2005 10:01:28 -0700 Subject: Re: kdb for x86_64, Linux 2.6.11 From: Chait Tumuluri To: jfv@bluesong.net Cc: kdb@oss.sgi.com In-Reply-To: <20050608065211.GA32127@trane.bluesong.net> References: <1118197076.8307.18.camel@aish> <20050608065211.GA32127@trane.bluesong.net> Content-type: text/plain Organization: Message-Id: <1118250088.8307.25.camel@aish> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 08 Jun 2005 10:01:28 -0700 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 08 Jun 2005 17:01:28.0454 (UTC) FILETIME=[B62AEA60:01C56C4B] X-archive-position: 976 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: chait@chelsio.com Precedence: bulk X-list: kdb On Tue, 2005-06-07 at 23:52, Jack F Vogel wrote: > On Tue, Jun 07, 2005 at 07:17:56PM -0700, Chait Tumuluri wrote: > > Hi folks, > > > > Is there a port for x86_64, Linux 2.6.11 out there? > > > > I tried using the 2.6.11-common3 with the 2.6.8 arch-specific > > kdb patch and it fails during bootup (where it frees up unused > > kernel memory). The same behavior with 2.6.9 arch-specific patch > > as well. > > > > TIA for any insights or patches. > > > > Regards, > > -Chait. > > Well I did the 2.6.8 patch, however my job has me > very busy the last six months, none of it devoted > to kdb :( > > I will try and take a look at the current kernel. > > What is the failure mode during boot, a panic, a > hang? > > Regards, > > Jack > Hi Jack, Thanks for the response; understand completely about the job pressures ;^) The failure mode is the equivalent of someone hitting the reset button on the box after the kernel prints the following: -------------------------------------------------------- VFS: Mounted root (reiserfs filesystem) readonly. Freeing unused kernel memory: 272k freed --------------------------------------------------------- Normally, the kernel would go on to starting up INIT, etc.: ---------------------------------------------------------- Freeing unused kernel memory: 272k freed INIT: version 2.85 booting System Boot Control: Running /etc/init.d/boot ---------------------------------------------------------- Regards, -Chait. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jfv@bluesong.net Thu Jun 9 16:46:53 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Jun 2005 16:47:10 -0700 (PDT) Received: from trane.bluesong.net (bdsl.66.13.29.10.gte.net [66.13.29.10]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j59NkmXq032742 for ; Thu, 9 Jun 2005 16:46:53 -0700 Received: by trane.bluesong.net (Postfix, from userid 500) id 587C6241952; Thu, 9 Jun 2005 16:45:38 -0700 (PDT) Date: Thu, 9 Jun 2005 16:45:38 -0700 From: Jack F Vogel To: Chait Tumuluri Cc: kdb@oss.sgi.com, jfv@us.ibm.com Subject: Re: kdb for x86_64, Linux 2.6.11 Message-ID: <20050609234538.GA14856@trane.bluesong.net> Reply-To: jfv@bluesong.net References: <1118197076.8307.18.camel@aish> <20050608065211.GA32127@trane.bluesong.net> <1118250088.8307.25.camel@aish> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1118250088.8307.25.camel@aish> User-Agent: Mutt/1.5.6i Content-Transfer-Encoding: 8bit X-archive-position: 977 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jfv@bluesong.net Precedence: bulk X-list: kdb Here is a new patch, i've incorporated any bug fixes I remembered and I've built and tested it on a system in the LTC Beaverton lab. Keith, can you also put this patch up for public use please. Cheers, Jack --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From jfv@bluesong.net Thu Jun 9 16:51:44 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Jun 2005 16:51:46 -0700 (PDT) Received: from trane.bluesong.net (bdsl.66.13.29.10.gte.net [66.13.29.10]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j59NpVXq000595 for ; Thu, 9 Jun 2005 16:51:31 -0700 Received: by trane.bluesong.net (Postfix, from userid 500) id 1B0B4241952; Thu, 9 Jun 2005 16:50:25 -0700 (PDT) Date: Thu, 9 Jun 2005 16:50:25 -0700 From: Jack F Vogel To: Chait Tumuluri Cc: kdb@oss.sgi.com, jfv@us.ibm.com Subject: Re: kdb for x86_64, Linux 2.6.11 Message-ID: <20050609235025.GB14856@trane.bluesong.net> Reply-To: jfv@bluesong.net References: <1118197076.8307.18.camel@aish> <20050608065211.GA32127@trane.bluesong.net> <1118250088.8307.25.camel@aish> <20050609234538.GA14856@trane.bluesong.net> Mime-Version: 1.0 Content-type: text/plain Content-Disposition: inline In-Reply-To: <20050609234538.GA14856@trane.bluesong.net> User-Agent: Mutt/1.5.6i Content-Transfer-Encoding: 8bit X-archive-position: 978 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: jfv@bluesong.net Precedence: bulk X-list: kdb Opps, it would help if I actually attached the patch wouldnt it :) Long day... On Thu, Jun 09, 2005 at 04:45:38PM -0700, Jack F Vogel wrote: > Here is a new patch, i've incorporated any bug fixes I remembered > and I've built and tested it on a system in the LTC Beaverton lab. > > Keith, can you also put this patch up for public use please. > > Cheers, > > Jack > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. -- Binary/unsupported file stripped by Ecartis -- -- Type: application/x-bzip2 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From pj@sgi.com Thu Jun 9 17:07:38 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Jun 2005 17:07:46 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5A07bXq001736 for ; Thu, 9 Jun 2005 17:07:38 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id j5A1sTjT023548 for ; Thu, 9 Jun 2005 18:54:29 -0700 Received: from vpn2 (mtv-vpn-hw-pj-2.corp.sgi.com [134.15.25.219]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with SMTP id j5A06VdO34955054; Thu, 9 Jun 2005 17:06:31 -0700 (PDT) Date: Thu, 9 Jun 2005 17:06:28 -0700 From: Paul Jackson To: jfv@bluesong.NET Cc: chait@chelsio.com, kdb@oss.sgi.com, jfv@us.ibm.com Subject: Re: kdb for x86_64, Linux 2.6.11 Message-Id: <20050609170628.192e1f14.pj@sgi.com> In-Reply-To: <20050609235025.GB14856@trane.bluesong.net> References: <1118197076.8307.18.camel@aish> <20050608065211.GA32127@trane.bluesong.net> <1118250088.8307.25.camel@aish> <20050609234538.GA14856@trane.bluesong.net> <20050609235025.GB14856@trane.bluesong.net> Organization: SGI X-Mailer: Sylpheed version 1.0.0 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-archive-position: 979 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: pj@sgi.com Precedence: bulk X-list: kdb > it would help if I actually attached the patch wouldnt it :) It would also help if Ecartis didn't strip the patch ... > -- Binary/unsupported file stripped by Ecartis -- > -- Type: application/x-bzip2 -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson 1.650.933.1373, 1.925.600.0401 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Thu Jun 9 17:27:20 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Jun 2005 17:27:24 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5A0RJXq002586 for ; Thu, 9 Jun 2005 17:27:19 -0700 Received: from persist.az.mvista.com (persist.az.mvista.com [10.50.1.87]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id RAA32556 for ; Thu, 9 Jun 2005 17:59:17 -0700 Subject: Re: kdb for x86_64, Linux 2.6.11 From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com In-Reply-To: <20050608065211.GA32127@trane.bluesong.net> References: <1118197076.8307.18.camel@aish> <20050608065211.GA32127@trane.bluesong.net> Content-type: text/plain Organization: MontaVista Software, Inc. Message-Id: <1118363172.27450.57.camel@persist.az.mvista.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 09 Jun 2005 17:26:13 -0700 Content-Transfer-Encoding: 8bit X-archive-position: 980 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Jack, I am doing a port of kdb x86_64 from your 2.6.8 patch to a vendor kernel 2.6.10. The system boots and I can enter KDB properly. I had to make alot of changes to traps.c (and add a kdb_call to entry.S) for the trap handlers to enter KDB properly. Without the trap handler changes, the active processes were not being saved properly which caused all kinds of havok. This may be an SMP only symptom. After these changes to get KDB to appear to work properly I have a couple of problems. First I am using an SMP kernel. calling kdb() works, and when a breakpoint occurs (int3) kdb is entered. But then If I type go, and the same breakpoint occurs again, I get the notification: 92.168.1.150 login: root Instruction(i) breakpoint #0 at 0xffffffff8013d13b (adjusted) 0xffffffff8013d13b sys_getuid: int3 Entering kdb (current=0x000001007e7e27d0, pid 1983) on processor 3 due to Breakpoint @ 0xffffffff8013d13b [3]kdb> goo 1 out of 4 cpus in kdb, waiting for the rest, timeout in 10 second(s) ...3 cpus are not in kdb, their state is unknown Instruction(i) breakpoint #0 at 0xffffffff8013d13b (adjusted) 0xffffffff8013d13b sys_getuid: int3 Entering kdb (current=0x000001007e7e27d0, pid 1983) on processor 3 due to Breakpoint @ 0xffffffff8013d13b [3]kdb> goo Ever see that during testing? (did you try SMP?) Note sys_getuid will be called several times by the login application. I have run into another interesting problem that you may be aware of. CONFIG_FRAME_POINTERS is disallowed with x86_64 architecture (lib/Kconfig.debug). I think this results in funky backtraces, something like (it is possible something else is broken besides the frame pointers): SP RIP Function (args) 0x1007ff01c48 0x0000010002c558e0 +0x10002c558e0 0x1007ff01c50 0x000001007ff01d48 +0x1007ff01d48 0x1007ff01c58 0x0000000000000002 +0x2 0x1007ff01c60 0x000001007eded488 +0x1007eded488 0x1007ff01c68 0x00000100032ef070 +0x100032ef070 0x1007ff01c70 0x000001007fea15c0 +0x1007fea15c0 0x1007ff01c78 0x0000000000000002 +0x2 0x1007ff01c80 0x000001007eded380 +0x1007eded380 0x1007ff01c88 0x000000767eded488 +0x767eded488 0x1007ff01c90 0xffffffff807375c0 _einittext+0xee49 Those addresses are all user addresses. I havn't dug into it much but it looks like the backtrace is tracking some other junk instead of the kernel function stack. I asked around here and someone mentioned the community kernel.org tree disallows frame pointers for x86_64 because they are broken. Suggestion was to use dwarf instead. This seems like an ugly choice to me :) Any ideas? regards -steve On Tue, 2005-06-07 at 23:52, Jack F Vogel wrote: > On Tue, Jun 07, 2005 at 07:17:56PM -0700, Chait Tumuluri wrote: > > Hi folks, > > > > Is there a port for x86_64, Linux 2.6.11 out there? > > > > I tried using the 2.6.11-common3 with the 2.6.8 arch-specific > > kdb patch and it fails during bootup (where it frees up unused > > kernel memory). The same behavior with 2.6.9 arch-specific patch > > as well. > > > > TIA for any insights or patches. > > > > Regards, > > -Chait. > > Well I did the 2.6.8 patch, however my job has me > very busy the last six months, none of it devoted > to kdb :( > > I will try and take a look at the current kernel. > > What is the failure mode during boot, a panic, a > hang? > > Regards, > > Jack > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Jun 9 18:40:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 09 Jun 2005 18:40:20 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5A1eEXq009592 for ; Thu, 9 Jun 2005 18:40:15 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA10292 for ; Fri, 10 Jun 2005 11:39:07 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id A3C69689A; Fri, 10 Jun 2005 11:39:07 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id A04CF20012B; Fri, 10 Jun 2005 11:39:07 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: jfv@bluesong.NET Cc: Chait Tumuluri , kdb@oss.sgi.com, jfv@us.ibm.com Subject: Re: kdb for x86_64, Linux 2.6.11 In-reply-to: Your message of "Thu, 09 Jun 2005 16:45:38 MST." <20050609234538.GA14856@trane.bluesong.net> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 10 Jun 2005 11:39:07 +1000 Message-ID: <31020.1118367547@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 981 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Thu, 9 Jun 2005 16:45:38 -0700, Jack F Vogel wrote: >Here is a new patch, i've incorporated any bug fixes I remembered >and I've built and tested it on a system in the LTC Beaverton lab. > >Keith, can you also put this patch up for public use please. Thanks Jack. It is at ftp://oss.sgi.com/projects/kdb/download/v4.4/kdb-v4.4-2.6.11-x86_64.bz2 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Mon Jun 13 13:12:57 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 13 Jun 2005 13:13:02 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5DKCuXq017675 for ; Mon, 13 Jun 2005 13:12:57 -0700 Received: from persist.az.mvista.com (persist.az.mvista.com [10.50.1.87]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id NAA09071; Mon, 13 Jun 2005 13:40:06 -0700 Subject: patch for jack's x86_64 port From: Steven Dake Reply-To: sdake@mvista.com To: kdb@oss.sgi.com, jfv@bluesong.net, kaos@sgi.com Content-type: text/plain Organization: MontaVista Software, Inc. Message-Id: <1118693212.8852.31.camel@persist.az.mvista.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 13 Jun 2005 13:06:52 -0700 Content-Transfer-Encoding: 8bit X-archive-position: 982 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Jack I made a few changes to your patch to get KDB to work properly (on a vendor kernel). They mostly center around 3 things. 1. NMI handling didn't seem to work in my kernel (whic:h is not kernel.org) 2. software or hardware breakpoints would always print the message 1 out of 4 cpus in kdb, waiting for the rest, timeout in 10 second(s) ...3 cpus are not in kdb, their state is unknown with a 10 second delay. ss and go do the same sort of thing. 3. Finally get_wchan doesn't really work (atleast in my kernel) because either a task is TASK_RUNNING, or schedule is at the top of the task frame. Hence get_wchan always returns 0, which makes the backtrace comamnds not operate properly. also, I believe there is a missing kdb_ipi call in traps.c, but i'm not entirely sure about this one. I'd appreciate comments on this patch as I'm new to x86_64 arch. After this patch, kdb works like a champ in mv's vendor kernel. Good work on the port. regards, -steve -- Binary/unsupported file stripped by Ecartis -- -- Type: text/x-patch -- File: linux-2.6.10-sd.patch --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sphecid@fadmail.com Thu Jun 16 12:20:03 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 16 Jun 2005 12:22:14 -0700 (PDT) Received: from pool-71-101-59-156.tampfl.dsl-w.verizon.net (pool-71-101-59-156.tampfl.dsl-w.verizon.net [71.101.59.156]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5GJJ6H9029938; Thu, 16 Jun 2005 12:19:17 -0700 Date: Thu, 16 Jun 2005 12:19:06 -0700 From: sphecid@fadmail.com Message-Id: <200506161919.j5GJJ6H9029938@oss.sgi.com> Received: from RSWUPzvux.com (EHLO aitat-a.bought.UH.wff.net) amoral by mail.mtk.nao.ac.jp (7.6[2 To: undisclosed-recipients:; X-archive-position: 983 Subject: (no subject) X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sphecid@fadmail.com Precedence: bulk X-list: kdb --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Fri Jun 17 23:21:16 2005 Received: with ECARTIS (v1.0.0; list kdb); Fri, 17 Jun 2005 23:21:20 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5I6LEH9024878 for ; Fri, 17 Jun 2005 23:21:15 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA11655 for ; Sat, 18 Jun 2005 16:19:57 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 11C3618009D; Sat, 18 Jun 2005 16:19:47 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id B6B7D104; Sat, 18 Jun 2005 16:19:40 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id B36DE1000F8; Sat, 18 Jun 2005 16:19:40 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: kdb@oss.sgi.com Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org Subject: Announce: kdb v4.4 is available for kernel 2.6.12 Date: Sat, 18 Jun 2005 16:19:40 +1000 Message-ID: <22161.1119075580@ocs3.ocs.com.au> X-archive-position: 984 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 KDB (Linux Kernel Debugger) has been updated. ftp://oss.sgi.com/projects/kdb/download/v4.4/ ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/ Current versions are :- kdb-v4.4-2.6.12-common-1.bz2 kdb-v4.4-2.6.12-i386-1.bz2 kdb-v4.4-2.6.12-ia64-1.bz2 kdb-v4.4-2.6.11-x86-64-1.bz2 (may or may not work with 2.6.12). Changelog extract since kdb-v4.4-2.6.11-common-1. 2005-06-18 Keith Owens * kdb v4.4-2.6.12-common-1. 2005-06-08 Keith Owens * Correct early exit from bd *. * kdb v4.4-2.6.12-rc6-common-1. 2005-05-25 Keith Owens * Delete Documentation/kdb/dump.txt. lkcd now has reasonable integration with kdb. * kdb v4.4-2.6.12-rc5-common-1. 2005-05-08 Keith Owens * kdb v4.4-2.6.12-rc4-common-1. 2005-04-21 Keith Owens * Add rpte command (find the pte for a physical page). * kdb v4.4-2.6.12-rc3-common-1. 2005-04-06 Keith Owens * Add rq and rqa commands. John Hawkes, SGI. * kdb v4.4-2.6.12-rc2-common-1. 2005-03-29 Keith Owens * Use register_sysctl_table() instead of patching kernel/sysctl.c. * Non-ASCII characters are not printable. * kdb v4.4-2.6.12-rc1-common-1. 2005-03-15 Keith Owens * More coexistence patches for lkcd. Jason Uhlenkott, SGI. * kdb v4.4-2.6.11-common-3. 2005-03-08 Keith Owens * Coexistence patches for lkcd. Jason Uhlenkott, SGI. * kdb v4.4-2.6.11-common-2. Changelog extract since kdb-v4.4-2.6.11-i386-1. 2005-06-18 Keith Owens * kdb v4.4-2.6.12-i386-1. 2005-06-08 Keith Owens * kdb v4.4-2.6.12-rc6-i386-1. 2005-05-25 Keith Owens * kdb v4.4-2.6.12-rc5-i386-1. 2005-05-08 Keith Owens * kdb v4.4-2.6.12-rc4-i386-1. 2005-04-21 Keith Owens * kdb v4.4-2.6.12-rc3-i386-1. 2005-04-06 Keith Owens * kdb v4.4-2.6.12-rc2-i386-1. 2005-03-29 Keith Owens * Replace __copy_to_user with __copy_to_user_inatomic. * kdb v4.4-2.6.12-rc1-i386-1. 2005-03-08 Keith Owens * Coexistence patches for lkcd. * kdb v4.4-2.6.11-i386-2. Changelog extract since kdb v4.4-2.6.11-ia64-1. 2005-06-18 Keith Owens * Standard IA64 code now works around break.b setting cr.iim to 0 instead of the break number. Remove the kdb workaround. * kdb v4.4-2.6.12-ia64-1. 2005-06-08 Keith Owens * kdb v4.4-2.6.12-rc6-ia64-1. 2005-05-25 Keith Owens * kdb v4.4-2.6.12-rc5-ia64-1. 2005-05-24 Keith Owens * break.b sets cr.iim to 0 instead of the break number. Deal with it. * kdb v4.4-2.6.12-rc4-ia64-3. 2005-05-14 Keith Owens * Correct MCA path after calling kdba_mca_bspstore_fixup(). Mark Larson, SGI. * Tell the user that MCA/INIT is recoverable so kdb is not entered. * kdb v4.4-2.6.12-rc4-ia64-2. 2005-05-08 Keith Owens * kdb v4.4-2.6.12-rc4-ia64-1. 2005-04-21 Keith Owens * kdb v4.4-2.6.12-rc3-ia64-1. 2005-04-06 Keith Owens * kdb v4.4-2.6.12-rc2-ia64-1. 2005-04-04 Keith Owens * More tweaks to cope with invalid old bspstore in MCA handler. * kdb v4.4-2.6.12-rc1-ia64-2. 2005-03-29 Keith Owens * Replace __copy_to_user with __copy_to_user_inatomic. * MCA handler, do not use old_bspstore if it is in region 4 or below. * kdb v4.4-2.6.12-rc1-ia64-1. 2005-03-08 Keith Owens * Coexistence patches for lkcd. Jason Uhlenkott, SGI. * kdb v4.4-2.6.11-ia64-2. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Exmh version 2.1.1 10/15/1999 iD8DBQFCs7z8i4UHNye0ZOoRAs5IAKDiQW/sXUhPouVtpbvZjVn9G5P6gACfdWAz Agp0JZbtUvmrS074UEvYygw= =z5/a -----END PGP SIGNATURE----- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From teehan@didamail.com Mon Jun 20 10:09:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 20 Jun 2005 10:12:20 -0700 (PDT) Received: from pool-71-111-60-45.ptldor.dsl-w.verizon.net (pool-71-111-60-45.ptldor.dsl-w.verizon.net [71.111.60.45]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5KH8kH9022292; Mon, 20 Jun 2005 10:08:52 -0700 Date: Mon, 20 Jun 2005 10:08:46 -0700 From: teehan@didamail.com Message-Id: <200506201708.j5KH8kH9022292@oss.sgi.com> Received: from WURGIvxwn.com (EHLO acncv-a.cool.ZV.mub.net) snotty by mail.mtk.nao.ac.jp (8.4[2 To: undisclosed-recipients:; X-archive-position: 985 Subject: (no subject) X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: teehan@didamail.com Precedence: bulk X-list: kdb --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From wrwktdarace@wengerremodeling.com Mon Jun 27 05:23:35 2005 Received: with ECARTIS (v1.0.0; list kdb); Mon, 27 Jun 2005 05:24:50 -0700 (PDT) Received: from pool-71-105-186-187.lsanca.dsl-w.verizon.net (pool-71-105-186-187.lsanca.dsl-w.verizon.net [71.105.186.187]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5RCNNH9012016; Mon, 27 Jun 2005 05:23:26 -0700 Received: from revulsion.spookyhousemovie.com ([69.73.24.30]) by buddy.spookyhousemovie.com (RQRHT 2.5.5.03) with SMTP id M7523646428353696459 for ; Mon, 27 Jun 2005 15:21:13 +0200 Received: from revulsion ([202.123.209.131]) by revulsion.spookyhousemovie.com with Microsoft SMTPSVC(5.0.7214.4632); Mon, 27 Jun 2005 12:16:13 -0100 Message-ID: <831399740409.NZG60428@geometrician.sjoberg.tf> From: "Lucio Trejo" To: Subject: RE: Hidden gems help get a leg up on the market Date: Mon, 27 Jun 2005 11:20:13 -0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.5[4 X-archive-position: 986 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: wrwktdarace@wengerremodeling.com Precedence: bulk X-list: kdb --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From a1k0nsux@gmail.com Wed Jun 29 20:30:28 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 29 Jun 2005 20:30:32 -0700 (PDT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5U3UQH9020091 for ; Wed, 29 Jun 2005 20:30:28 -0700 Received: by wproxy.gmail.com with SMTP id i20so29634wra for ; Wed, 29 Jun 2005 20:28:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gAnOV9+gdqaehIh8p7Ll2HMVPJUrKQA3CSXSLFmkWaPNPtjXA5cDUyvo1ziKBvOZ2FqGz9EHXytDORMcgePNM4bC2aBJSq0xzK/ROqR7LSsfjOolFFlTqMxpUU2F24NBBtnV24ymS+zRNrS0cDDQQsCgFigTBcpQY964Bd7HXA4= Received: by 10.54.73.15 with SMTP id v15mr142525wra; Wed, 29 Jun 2005 20:28:57 -0700 (PDT) Received: by 10.54.84.11 with HTTP; Wed, 29 Jun 2005 20:28:57 -0700 (PDT) Message-ID: <47a96f6e0506292028ff181ff@mail.gmail.com> Date: Wed, 29 Jun 2005 20:28:57 -0700 From: Josh Hunt Reply-To: Josh Hunt To: kdb@oss.sgi.com Subject: KDB_ENTER() question Mime-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j5U3UQH9020091 X-archive-position: 987 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: a1k0nsux@gmail.com Precedence: bulk X-list: kdb I am unable to get KDB_ENTER() to work properly in either 2.6.11 or 2.6.12. I've spent most of the day googling for the answer as to why it's not working, but no dice. I am trying to run KDB_ENTER() at two places. One is just by using the kdb=early param to the kernel and the other by adding a line to a simple device driver I'm trying to debug. Both places I have the same issue - Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 I'm running with the latest kdb code, as of today that was v4.4 6/17/05. I've looked through the code as best I can, but honestly I do not know much about this stuff. Any help would be appreciated. Below are some screencaps of what I am seeing. Thanks Josh When I pass the kdb=early option to the kernel at boot - Linux version 2.6.12.1-KDB (root@) (gcc version 3.4.2 20041017 (Red Hat 3.4.2-65BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000018000000 (usable) BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved) 0MB HIGHMEM available. 384MB LOWMEM available. On node 0 totalpages: 98304 DMA zone: 4096 pages, LIFO batch:1 Normal zone: 94208 pages, LIFO batch:31 HighMem zone: 0 pages, LIFO batch:1 DMI 2.1 present. Allocating PCI resources starting at 18000000 (gap: 18000000:e7fc0000) Built 1 zonelists Kernel command line: ro root=/dev/VolGroup00/LogVol00 rhgb debug kdb=early console=tty0 console=ttyS0,96 Initializing CPU#0 CPU 0 irqstacks, hard=c043d000 soft=c043c000 PID hash table entries: 2048 (order: 11, 32768 bytes) Detected 497.866 MHz processor. Using tsc for high-res timesource Console: colour VGA+ 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 384496k/393216k available (2331k kernel code, 8080k reserved, 793k data, 160k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 983.04 BogoMIPS (lpj=491520) kdb version 4.4 by Keith Owens, Scott Lurndal. Copyright SGI, All Rights Reserved kdb_cmd[0]: defcmd archkdb "" "First line arch debugging" kdb_cmd[6]: defcmd archkdbcpu "" "archkdb with only tasks on cpus" kdb_cmd[12]: defcmd archkdbshort "" "archkdb with less detailed backtrace" kdb_cmd[18]: defcmd archkdbcommon "" "Common arch debugging" Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 and also in from a driver I am loading as a module - [root@ mouse]# insmod ./psmouse.ko Entering kdb (current=0xd781b000, pid 140) kdb: unexpected reason code: 0 In psmouse-base.c I am calling KDB_ENTER() b/c I am trying to learn more about linux device drivers and chose this simple mouse driver to start with. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Wed Jun 29 21:31:33 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 29 Jun 2005 21:31:36 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5U4VVH9023540 for ; Wed, 29 Jun 2005 21:31:32 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA10136 for ; Thu, 30 Jun 2005 14:30:00 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id A31CA104; Thu, 30 Jun 2005 14:30:00 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 9F8771000FA; Thu, 30 Jun 2005 14:30:00 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Josh Hunt cc: kdb@oss.sgi.com Subject: Re: KDB_ENTER() question In-reply-to: Your message of "Wed, 29 Jun 2005 20:28:57 MST." <47a96f6e0506292028ff181ff@mail.gmail.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 30 Jun 2005 14:30:00 +1000 Message-ID: <6187.1120105800@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 988 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Wed, 29 Jun 2005 20:28:57 -0700, Josh Hunt wrote: >I am unable to get KDB_ENTER() to work properly in either 2.6.11 or >2.6.12. >Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 Either a patch was misapplied or there is a mismatch in the parameter passing. Did you apply both kdb-v4.4-2.6.12-common-1 and kdb-v4.4-2.6.12-i386-2, with no patch rejects? Which version of gcc are you using (gcc -v)? To check the parameter passing, I need the output from these commands objdump -Sr kdb/kdbmain.o | grep -A40 ':' objdump -Sr arch/i386/kernel/traps.o | grep -A40 ':' --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From a1k0nsux@gmail.com Wed Jun 29 21:39:43 2005 Received: with ECARTIS (v1.0.0; list kdb); Wed, 29 Jun 2005 21:39:45 -0700 (PDT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5U4dhH9024171 for ; Wed, 29 Jun 2005 21:39:43 -0700 Received: by wproxy.gmail.com with SMTP id i28so41316wra for ; Wed, 29 Jun 2005 21:38:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ACpqAUHelR0yUNgEV8oWH1gKiMHbCNm6RM3R0c4+GtKdt8ohU1ryavDdqtTsUBIcqzC5a5ShdyfUVPJ2kB5eVhVLgaYqAaVs5NObk87Ncmlg4BUhEL4CAaIZXIJAGAVvCvhzGrWbXkChXD1SPOw5OXiHXJPocrQiS9h9IMhKLRc= Received: by 10.54.26.19 with SMTP id 19mr164204wrz; Wed, 29 Jun 2005 21:38:14 -0700 (PDT) Received: by 10.54.84.11 with HTTP; Wed, 29 Jun 2005 21:38:13 -0700 (PDT) Message-ID: <47a96f6e05062921387f49d050@mail.gmail.com> Date: Wed, 29 Jun 2005 21:38:13 -0700 From: Josh Hunt Reply-To: Josh Hunt To: Keith Owens Subject: Re: KDB_ENTER() question Cc: kdb@oss.sgi.com In-Reply-To: <6187.1120105800@kao2.melbourne.sgi.com> Mime-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <47a96f6e0506292028ff181ff@mail.gmail.com> <6187.1120105800@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j5U4dhH9024171 X-archive-position: 989 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: a1k0nsux@gmail.com Precedence: bulk X-list: kdb Yes I applied both of those patches with no rejects. Here's all the info you requested. Thanks for your help. Please let me know if you need anything else. Josh [root@jhuntstudy linux-2.6.12.1]# gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) 000017b0 : 17b0: 55 push %ebp 17b1: 89 cd mov %ecx,%ebp 17b3: 57 push %edi 17b4: 89 d7 mov %edx,%edi 17b6: 56 push %esi 17b7: 89 c6 mov %eax,%esi 17b9: 53 push %ebx 17ba: 83 ec 34 sub $0x34,%esp 17bd: 89 44 24 28 mov %eax,0x28(%esp) 17c1: 31 c0 xor %eax,%eax 17c3: 89 44 24 24 mov %eax,0x24(%esp) 17c7: b8 04 00 00 00 mov $0x4,%eax 17cc: 89 44 24 1c mov %eax,0x1c(%esp) * Atomically increments @v by 1. */ static __inline__ void atomic_inc(atomic_t *v) { __asm__ __volatile__( 17d0: ff 05 00 00 00 00 incl 0x0 17d2: R_386_32 kdb_event 17d6: 83 fe 0a cmp $0xa,%esi 17d9: 77 14 ja 17ef 17db: b8 01 00 00 00 mov $0x1,%eax 17e0: 89 f1 mov %esi,%ecx 17e2: d3 e0 shl %cl,%eax 17e4: a9 20 06 00 00 test $0x620,%eax 17e9: 0f 85 17 06 00 00 jne 1e06 17ef: 83 3d 1c 00 00 00 02 cmpl $0x2,0x1c 17f1: R_386_32 .bss 17f6: 0f 87 24 06 00 00 ja 1e20 17fc: 8b 1d 00 00 00 00 mov 0x0,%ebx 17fe: R_386_32 kdb_on 1802: 85 db test %ebx,%ebx 1804: 75 23 jne 1829 1806: a1 00 00 00 00 mov 0x0,%eax 1807: R_386_32 kdb_flags 180b: a8 02 test $0x2,%al 180d: 74 0d je 181c 180f: 83 3d 1c 00 00 00 02 cmpl $0x2,0x1c 1811: R_386_32 .bss 000014f0 : 14f0: 83 ec 18 sub $0x18,%esp 14f3: 89 c1 mov %eax,%ecx 14f5: 89 74 24 14 mov %esi,0x14(%esp) 14f9: 89 c6 mov %eax,%esi 14fb: b8 03 00 00 00 mov $0x3,%eax 1500: 89 5c 24 10 mov %ebx,0x10(%esp) 1504: 89 d3 mov %edx,%ebx 1506: e8 fc ff ff ff call 1507 1507: R_386_PC32 kdb 150b: 85 c0 test %eax,%eax 150d: 74 11 je 1520 150f: 8b 5c 24 10 mov 0x10(%esp),%ebx 1513: 8b 74 24 14 mov 0x14(%esp),%esi 1517: 83 c4 18 add $0x18,%esp 151a: c3 ret 151b: 90 nop 151c: 8d 74 26 00 lea 0x0(%esi),%esi 1520: 89 5c 24 08 mov %ebx,0x8(%esp) 1524: 31 c0 xor %eax,%eax 1526: b9 ea 01 00 00 mov $0x1ea,%ecx 1527: R_386_32 .rodata.str1.1 152b: 89 44 24 0c mov %eax,0xc(%esp) 152f: ba 05 00 00 00 mov $0x5,%edx 1534: b8 03 00 00 00 mov $0x3,%eax 1539: 89 74 24 04 mov %esi,0x4(%esp) 153d: c7 04 24 01 00 00 00 movl $0x1,(%esp) 1544: e8 67 f2 ff ff call 7b0 1549: 8b 5c 24 10 mov 0x10(%esp),%ebx 154d: 8b 74 24 14 mov 0x14(%esp),%esi 1551: 83 c4 18 add $0x18,%esp 1554: c3 ret 1555: 8d 74 26 00 lea 0x0(%esi),%esi 1559: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi 00001560 : 1560: 56 push %esi 1561: 89 c2 mov %eax,%edx /* how to get the thread information struct from C */ static inline struct thread_info *current_thread_info(void) { On 6/29/05, Keith Owens wrote: > On Wed, 29 Jun 2005 20:28:57 -0700, > Josh Hunt wrote: > >I am unable to get KDB_ENTER() to work properly in either 2.6.11 or > >2.6.12. > >Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 > > Either a patch was misapplied or there is a mismatch in the parameter > passing. Did you apply both kdb-v4.4-2.6.12-common-1 and > kdb-v4.4-2.6.12-i386-2, with no patch rejects? Which version of gcc > are you using (gcc -v)? > > To check the parameter passing, I need the output from these commands > > objdump -Sr kdb/kdbmain.o | grep -A40 ':' > objdump -Sr arch/i386/kernel/traps.o | grep -A40 ':' > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Jun 30 00:12:51 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 00:12:54 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j5U7CnH9015486 for ; Thu, 30 Jun 2005 00:12:50 -0700 Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA14241 for ; Thu, 30 Jun 2005 17:11:19 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 90124104; Thu, 30 Jun 2005 17:11:19 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 8C7C81000F8; Thu, 30 Jun 2005 17:11:19 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Josh Hunt cc: kdb@oss.sgi.com Subject: Re: KDB_ENTER() question In-reply-to: Your message of "Wed, 29 Jun 2005 21:38:13 MST." <47a96f6e05062921387f49d050@mail.gmail.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Thu, 30 Jun 2005 17:11:19 +1000 Message-ID: <22275.1120115479@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 990 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb kdb for i386 has a mismatch between the calling sequence in assembler and C when the kernel is built with CONFIG_REGPARM. Does this fix your problem? Index: linux/include/linux/kdb.h =================================================================== --- linux.orig/include/linux/kdb.h 2005-06-30 16:19:07.000000000 +1000 +++ linux/include/linux/kdb.h 2005-06-30 16:54:27.000000000 +1000 @@ -107,7 +107,7 @@ typedef enum { } kdb_reason_t; #ifdef CONFIG_KDB -extern int kdb(kdb_reason_t, int, struct pt_regs *); +extern int asmlinkage kdb(kdb_reason_t, int, struct pt_regs *); #else #define kdb(reason,error_code,frame) (0) #endif Index: linux/kdb/kdbmain.c =================================================================== --- linux.orig/kdb/kdbmain.c 2005-06-30 16:19:07.000000000 +1000 +++ linux/kdb/kdbmain.c 2005-06-30 16:54:48.000000000 +1000 @@ -1669,7 +1669,7 @@ kdb_main_loop(kdb_reason_t reason, kdb_r * release all the cpus at once. */ -int +int asmlinkage kdb(kdb_reason_t reason, int error, struct pt_regs *regs) { kdb_intstate_t int_state; /* Interrupt state */ --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From ncunningham@cyclades.com Thu Jun 30 04:46:08 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 04:46:10 -0700 (PDT) Received: from cunningham.myip.net.au ([203.171.93.254]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5UBk2H9017558 for ; Thu, 30 Jun 2005 04:46:07 -0700 Received: (qmail 6154 invoked by uid 89); 30 Jun 2005 11:45:53 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by 0 with SMTP; 30 Jun 2005 11:45:53 -0000 Subject: Re: KDB_ENTER() question From: Nigel Cunningham Reply-To: ncunningham@cyclades.com To: Keith Owens Cc: Josh Hunt , kdb@oss.sgi.com In-Reply-To: <6187.1120105800@kao2.melbourne.sgi.com> References: <6187.1120105800@kao2.melbourne.sgi.com> Content-type: text/plain Organization: Cycades Message-Id: <1120131952.6129.0.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6-1mdk Date: Thu, 30 Jun 2005 21:45:52 +1000 Content-Transfer-Encoding: 8bit X-archive-position: 991 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: ncunningham@cyclades.com Precedence: bulk X-list: kdb Hi. I've seen that it's broken too. Sorry for my slackness - I've worked around it instead of letting you know. Regards, Nigel On Thu, 2005-06-30 at 14:30, Keith Owens wrote: > On Wed, 29 Jun 2005 20:28:57 -0700, > Josh Hunt wrote: > >I am unable to get KDB_ENTER() to work properly in either 2.6.11 or > >2.6.12. > >Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 > > Either a patch was misapplied or there is a mismatch in the parameter > passing. Did you apply both kdb-v4.4-2.6.12-common-1 and > kdb-v4.4-2.6.12-i386-2, with no patch rejects? Which version of gcc > are you using (gcc -v)? > > To check the parameter passing, I need the output from these commands > > objdump -Sr kdb/kdbmain.o | grep -A40 ':' > objdump -Sr arch/i386/kernel/traps.o | grep -A40 ':' > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. -- --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From a1k0nsux@gmail.com Thu Jun 30 08:32:06 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 08:32:08 -0700 (PDT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5UFW5H9012729 for ; Thu, 30 Jun 2005 08:32:06 -0700 Received: by wproxy.gmail.com with SMTP id i36so101855wra for ; Thu, 30 Jun 2005 08:30:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uhVOo34G28oAOI6jUXx06aJ1Ld75u0DHShMyLbByGXwW2Sm38a9GJySIb4VDRfAxfa1BxWJ1afXjhyxApojdIyUTiafsJl/ireDIu1E30z+yLTEM0v/AsGaW28yQtn2YtB22n88yMSJLdN0K8lZeZxxMP/nGqGf4LiMf/HQA9V8= Received: by 10.54.16.30 with SMTP id 30mr398143wrp; Thu, 30 Jun 2005 08:30:36 -0700 (PDT) Received: by 10.54.84.11 with HTTP; Thu, 30 Jun 2005 08:30:36 -0700 (PDT) Message-ID: <47a96f6e0506300830278daa98@mail.gmail.com> Date: Thu, 30 Jun 2005 08:30:36 -0700 From: Josh Hunt Reply-To: Josh Hunt To: Keith Owens Subject: Re: KDB_ENTER() question Cc: kdb@oss.sgi.com In-Reply-To: <22275.1120115479@kao2.melbourne.sgi.com> Mime-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <47a96f6e05062921387f49d050@mail.gmail.com> <22275.1120115479@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j5UFW5H9012729 X-archive-position: 992 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: a1k0nsux@gmail.com Precedence: bulk X-list: kdb This drops me into the debugger now, but the keyboard doesn't appear to be working. I seem to remember a similar issue when I was searching for my problem yesterday. Josh On 6/30/05, Keith Owens wrote: > kdb for i386 has a mismatch between the calling sequence in assembler > and C when the kernel is built with CONFIG_REGPARM. Does this fix your > problem? > > Index: linux/include/linux/kdb.h > =================================================================== > --- linux.orig/include/linux/kdb.h 2005-06-30 16:19:07.000000000 +1000 > +++ linux/include/linux/kdb.h 2005-06-30 16:54:27.000000000 +1000 > @@ -107,7 +107,7 @@ typedef enum { > } kdb_reason_t; > > #ifdef CONFIG_KDB > -extern int kdb(kdb_reason_t, int, struct pt_regs *); > +extern int asmlinkage kdb(kdb_reason_t, int, struct pt_regs *); > #else > #define kdb(reason,error_code,frame) (0) > #endif > Index: linux/kdb/kdbmain.c > =================================================================== > --- linux.orig/kdb/kdbmain.c 2005-06-30 16:19:07.000000000 +1000 > +++ linux/kdb/kdbmain.c 2005-06-30 16:54:48.000000000 +1000 > @@ -1669,7 +1669,7 @@ kdb_main_loop(kdb_reason_t reason, kdb_r > * release all the cpus at once. > */ > > -int > +int asmlinkage > kdb(kdb_reason_t reason, int error, struct pt_regs *regs) > { > kdb_intstate_t int_state; /* Interrupt state */ > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From sdake@mvista.com Thu Jun 30 11:32:08 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 11:32:11 -0700 (PDT) Received: from zipcode.az.mvista.com (rav-az.mvista.com [65.200.49.157]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5UIW7H9026162 for ; Thu, 30 Jun 2005 11:32:07 -0700 Received: from [10.50.1.139] ([10.50.1.139]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id MAA04193; Thu, 30 Jun 2005 12:04:29 -0700 Subject: Re: KDB_ENTER() question From: Steven Dake Reply-To: sdake@mvista.com To: Josh Hunt Cc: Keith Owens , kdb@oss.sgi.com In-Reply-To: <47a96f6e05062921387f49d050@mail.gmail.com> References: <47a96f6e0506292028ff181ff@mail.gmail.com> <6187.1120105800@kao2.melbourne.sgi.com> <47a96f6e05062921387f49d050@mail.gmail.com> Content-type: text/plain Organization: MontaVista Software, Inc. Date: Thu, 30 Jun 2005 11:30:30 -0700 Message-Id: <1120156231.3243.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 8bit X-archive-position: 993 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sdake@mvista.com Precedence: bulk X-list: kdb Josh I had this same problem on x86_64. I used a different version of kdb_call on x86_64 to get this to work. What I suggest is determine how parameters are passed by your version of gcc and then make kdb_call match it. This can be determined by executing a KDB_ENTER with known values and disassembling the code with objdump. Then these parameter registers or stack addresses can be used in your kdb_call function in i386/entry.S. Kind of complicated; I hope it helps. regards -steve On Wed, 2005-06-29 at 21:38 -0700, Josh Hunt wrote: > Yes I applied both of those patches with no rejects. Here's all the > info you requested. > Thanks for your help. Please let me know if you need anything else. > > Josh > > > [root@jhuntstudy linux-2.6.12.1]# gcc -v > Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs > Configured with: ../configure --prefix=/usr --mandir=/usr/share/man > --infodir=/usr/share/info --enable-shared --enable-threads=posix > --disable-checking --with-system-zlib --enable-__cxa_atexit > --disable-libunwind-exceptions --enable-java-awt=gtk > --host=i386-redhat-linux > Thread model: posix > gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) > > 000017b0 : > 17b0: 55 push %ebp > 17b1: 89 cd mov %ecx,%ebp > 17b3: 57 push %edi > 17b4: 89 d7 mov %edx,%edi > 17b6: 56 push %esi > 17b7: 89 c6 mov %eax,%esi > 17b9: 53 push %ebx > 17ba: 83 ec 34 sub $0x34,%esp > 17bd: 89 44 24 28 mov %eax,0x28(%esp) > 17c1: 31 c0 xor %eax,%eax > 17c3: 89 44 24 24 mov %eax,0x24(%esp) > 17c7: b8 04 00 00 00 mov $0x4,%eax > 17cc: 89 44 24 1c mov %eax,0x1c(%esp) > * Atomically increments @v by 1. > */ > static __inline__ void atomic_inc(atomic_t *v) > { > __asm__ __volatile__( > 17d0: ff 05 00 00 00 00 incl 0x0 > 17d2: R_386_32 kdb_event > 17d6: 83 fe 0a cmp $0xa,%esi > 17d9: 77 14 ja 17ef > 17db: b8 01 00 00 00 mov $0x1,%eax > 17e0: 89 f1 mov %esi,%ecx > 17e2: d3 e0 shl %cl,%eax > 17e4: a9 20 06 00 00 test $0x620,%eax > 17e9: 0f 85 17 06 00 00 jne 1e06 > 17ef: 83 3d 1c 00 00 00 02 cmpl $0x2,0x1c > 17f1: R_386_32 .bss > 17f6: 0f 87 24 06 00 00 ja 1e20 > 17fc: 8b 1d 00 00 00 00 mov 0x0,%ebx > 17fe: R_386_32 kdb_on > 1802: 85 db test %ebx,%ebx > 1804: 75 23 jne 1829 > 1806: a1 00 00 00 00 mov 0x0,%eax > 1807: R_386_32 kdb_flags > 180b: a8 02 test $0x2,%al > 180d: 74 0d je 181c > 180f: 83 3d 1c 00 00 00 02 cmpl $0x2,0x1c > 1811: R_386_32 .bss > > 000014f0 : > 14f0: 83 ec 18 sub $0x18,%esp > 14f3: 89 c1 mov %eax,%ecx > 14f5: 89 74 24 14 mov %esi,0x14(%esp) > 14f9: 89 c6 mov %eax,%esi > 14fb: b8 03 00 00 00 mov $0x3,%eax > 1500: 89 5c 24 10 mov %ebx,0x10(%esp) > 1504: 89 d3 mov %edx,%ebx > 1506: e8 fc ff ff ff call 1507 > 1507: R_386_PC32 kdb > 150b: 85 c0 test %eax,%eax > 150d: 74 11 je 1520 > 150f: 8b 5c 24 10 mov 0x10(%esp),%ebx > 1513: 8b 74 24 14 mov 0x14(%esp),%esi > 1517: 83 c4 18 add $0x18,%esp > 151a: c3 ret > 151b: 90 nop > 151c: 8d 74 26 00 lea 0x0(%esi),%esi > 1520: 89 5c 24 08 mov %ebx,0x8(%esp) > 1524: 31 c0 xor %eax,%eax > 1526: b9 ea 01 00 00 mov $0x1ea,%ecx > 1527: R_386_32 .rodata.str1.1 > 152b: 89 44 24 0c mov %eax,0xc(%esp) > 152f: ba 05 00 00 00 mov $0x5,%edx > 1534: b8 03 00 00 00 mov $0x3,%eax > 1539: 89 74 24 04 mov %esi,0x4(%esp) > 153d: c7 04 24 01 00 00 00 movl $0x1,(%esp) > 1544: e8 67 f2 ff ff call 7b0 > 1549: 8b 5c 24 10 mov 0x10(%esp),%ebx > 154d: 8b 74 24 14 mov 0x14(%esp),%esi > 1551: 83 c4 18 add $0x18,%esp > 1554: c3 ret > 1555: 8d 74 26 00 lea 0x0(%esi),%esi > 1559: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi > > 00001560 : > 1560: 56 push %esi > 1561: 89 c2 mov %eax,%edx > /* how to get the thread information struct from C */ > static inline struct thread_info *current_thread_info(void) > { > > > On 6/29/05, Keith Owens wrote: > > On Wed, 29 Jun 2005 20:28:57 -0700, > > Josh Hunt wrote: > > >I am unable to get KDB_ENTER() to work properly in either 2.6.11 or > > >2.6.12. > > >Entering kdb (current=0xc0398c80, pid 0) kdb: unexpected reason code: 0 > > > > Either a patch was misapplied or there is a mismatch in the parameter > > passing. Did you apply both kdb-v4.4-2.6.12-common-1 and > > kdb-v4.4-2.6.12-i386-2, with no patch rejects? Which version of gcc > > are you using (gcc -v)? > > > > To check the parameter passing, I need the output from these commands > > > > objdump -Sr kdb/kdbmain.o | grep -A40 ':' > > objdump -Sr arch/i386/kernel/traps.o | grep -A40 ':' > > > > > > --------------------------- > Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From a1k0nsux@gmail.com Thu Jun 30 16:16:17 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 16:16:20 -0700 (PDT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id j5UNGGH9013212 for ; Thu, 30 Jun 2005 16:16:16 -0700 Received: by wproxy.gmail.com with SMTP id i20so188248wra for ; Thu, 30 Jun 2005 16:14:46 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=l4kSUsoK4xkSwFXGyQ6C3QqNkmoke6pR0C1Qn3DjbPPFO/jor21vth7wbfTtN65wpStd1Nbg3/TUf9fMaGIjDDLYpZUKljP3ESM2HAlko67QvMQyOgSQTE8AYyNGT4A8+PG8Ng49aSrc8OQMh4kll6cNDQG5r1kJ9OVvPAjLo08= Received: by 10.54.84.19 with SMTP id h19mr768775wrb; Thu, 30 Jun 2005 16:14:46 -0700 (PDT) Received: by 10.54.84.11 with HTTP; Thu, 30 Jun 2005 16:14:46 -0700 (PDT) Message-ID: <47a96f6e0506301614240c3e2c@mail.gmail.com> Date: Thu, 30 Jun 2005 16:14:46 -0700 From: Josh Hunt Reply-To: Josh Hunt To: Keith Owens Subject: Re: KDB_ENTER() question Cc: kdb@oss.sgi.com In-Reply-To: <47a96f6e0506300830278daa98@mail.gmail.com> Mime-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-Disposition: inline References: <47a96f6e05062921387f49d050@mail.gmail.com> <22275.1120115479@kao2.melbourne.sgi.com> <47a96f6e0506300830278daa98@mail.gmail.com> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id j5UNGGH9013212 X-archive-position: 994 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: a1k0nsux@gmail.com Precedence: bulk X-list: kdb As an update, I had been accessing it from the serial console and that was hung. When I access it locally it is working. I will play around with it some more. Josh On 6/30/05, Josh Hunt wrote: > This drops me into the debugger now, but the keyboard doesn't appear > to be working. I seem to remember a similar issue when I was > searching for my problem yesterday. > > Josh > > On 6/30/05, Keith Owens wrote: > > kdb for i386 has a mismatch between the calling sequence in assembler > > and C when the kernel is built with CONFIG_REGPARM. Does this fix your > > problem? > > > > Index: linux/include/linux/kdb.h > > =================================================================== > > --- linux.orig/include/linux/kdb.h 2005-06-30 16:19:07.000000000 +1000 > > +++ linux/include/linux/kdb.h 2005-06-30 16:54:27.000000000 +1000 > > @@ -107,7 +107,7 @@ typedef enum { > > } kdb_reason_t; > > > > #ifdef CONFIG_KDB > > -extern int kdb(kdb_reason_t, int, struct pt_regs *); > > +extern int asmlinkage kdb(kdb_reason_t, int, struct pt_regs *); > > #else > > #define kdb(reason,error_code,frame) (0) > > #endif > > Index: linux/kdb/kdbmain.c > > =================================================================== > > --- linux.orig/kdb/kdbmain.c 2005-06-30 16:19:07.000000000 +1000 > > +++ linux/kdb/kdbmain.c 2005-06-30 16:54:48.000000000 +1000 > > @@ -1669,7 +1669,7 @@ kdb_main_loop(kdb_reason_t reason, kdb_r > > * release all the cpus at once. > > */ > > > > -int > > +int asmlinkage > > kdb(kdb_reason_t reason, int error, struct pt_regs *regs) > > { > > kdb_intstate_t int_state; /* Interrupt state */ > > > > > --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Jun 30 17:54:48 2005 Received: with ECARTIS (v1.0.0; list kdb); Thu, 30 Jun 2005 17:54:50 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id j610skH9022582 for ; Thu, 30 Jun 2005 17:54:47 -0700 Received: from mail.ocs.com.au (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA07534 for ; Fri, 1 Jul 2005 10:53:14 +1000 Received: from ocs3.ocs.com.au (ocs3.ocs.com.au [192.168.255.3]) by mail.ocs.com.au (Postfix) with ESMTP id 43EE118009F; Fri, 1 Jul 2005 10:53:09 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id BFB4B104; Fri, 1 Jul 2005 10:53:08 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id BC21F1000FA; Fri, 1 Jul 2005 10:53:08 +1000 (EST) X-Mailer: exmh version 2.6.3_20040314 03/14/2004 with nmh-1.0.4 From: Keith Owens To: Josh Hunt Cc: kdb@oss.sgi.com Subject: Re: KDB_ENTER() question In-reply-to: Your message of "Thu, 30 Jun 2005 08:30:36 MST." <47a96f6e0506300830278daa98@mail.gmail.com> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 01 Jul 2005 10:53:08 +1000 Message-ID: <10789.1120179188@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 995 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: kaos@sgi.com Precedence: bulk X-list: kdb On Thu, 30 Jun 2005 08:30:36 -0700, Josh Hunt wrote: >This drops me into the debugger now, but the keyboard doesn't appear >to be working. I seem to remember a similar issue when I was >searching for my problem yesterday. What do you mean by "the keyboard is not working"? PC or serial keyboard? Have you done 'man Documentation/kdb/kdb.mm' and read about the console in there? --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.