From minyard@acm.org Fri Jun 1 12:23:30 2007 Received: with ECARTIS (v1.0.0; list kdb); Fri, 01 Jun 2007 12:23:34 -0700 (PDT) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l51JNTWt015643 for ; Fri, 1 Jun 2007 12:23:29 -0700 Received: from wf-rch.minyard.local ([71.97.113.70]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JIZ00JSK1UP1HH5@vms042.mailsrvcs.net> for kdb@oss.sgi.com; Fri, 01 Jun 2007 14:23:13 -0500 (CDT) Received: from i2 (i2.minyard.local [192.168.27.126]) by wf-rch.minyard.local (Postfix) with ESMTP id 9E434471F6; Fri, 01 Jun 2007 14:23:21 -0500 (CDT) Date: Fri, 01 Jun 2007 14:23:12 -0500 From: Corey Minyard Subject: [PATCH] KDB x86_64 should use register_die_notifier To: kdb@oss.sgi.com Cc: cminyard@mvista.com Reply-to: minyard@acm.org Message-id: <20070601192312.GA21882@localdomain> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Content-Transfer-Encoding: 8bit X-archive-position: 1219 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: minyard@acm.org Precedence: bulk X-list: kdb I was working on KDB and ran into a problem on initialization on x86_64. There's some magic that happens with register_die_notifier to make it work correctly. die_chain should not be directly accessed. KDB should go through register_die_notifier. Signed-off-by: Corey Minyard Index: linux-2.6.21/arch/x86_64/kdb/kdbasupport.c =================================================================== --- linux-2.6.21.orig/arch/x86_64/kdb/kdbasupport.c +++ linux-2.6.21/arch/x86_64/kdb/kdbasupport.c @@ -915,7 +915,7 @@ kdba_init(void) { kdb_register("pt_regs", kdba_pt_regs, "address", "Format struct pt_regs", 0); kdb_register("cpu_pda", kdba_cpu_pda, "", "Format struct cpu_pda", 0); - atomic_notifier_chain_register(&die_chain, &kdba_notifier); + register_die_notifier(&kdba_notifier); return; } --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Sat Jun 2 04:28:52 2007 Received: with ECARTIS (v1.0.0; list kdb); Sat, 02 Jun 2007 04:29:01 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l52BSmWt003524 for ; Sat, 2 Jun 2007 04:28:50 -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 VAA23619 for ; Sat, 2 Jun 2007 21:28:45 +1000 Received: from ocs3.ocs.com.au (ocs3w.ocs.com.au [192.168.254.3]) by mail.ocs.com.au (Postfix) with ESMTP id 3A4FBE12CEB; Sat, 2 Jun 2007 21:28:42 +1000 (EST) Received: by ocs3.ocs.com.au (Postfix, from userid 16331) id B13E42F40; Sat, 2 Jun 2007 21:28:41 +1000 (EST) Received: from ocs3.ocs.com.au (localhost [127.0.0.1]) by ocs3.ocs.com.au (Postfix) with ESMTP id 70C2081EC0; Sat, 2 Jun 2007 21:28:41 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 From: Keith Owens To: minyard@acm.org cc: kdb@oss.sgi.com, cminyard@mvista.com Subject: Re: [PATCH] KDB x86_64 should use register_die_notifier In-reply-to: Your message of "Fri, 01 Jun 2007 14:23:12 EST." <20070601192312.GA21882@localdomain> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Sat, 02 Jun 2007 21:28:41 +1000 Message-ID: <14810.1180783721@ocs3.ocs.com.au> Content-Transfer-Encoding: 8bit X-archive-position: 1220 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 Corey Minyard (on Fri, 01 Jun 2007 14:23:12 -0500) wrote: >I was working on KDB and ran into a problem on initialization on x86_64. >There's some magic that happens with register_die_notifier to make it >work correctly. die_chain should not be directly accessed. KDB should >go through register_die_notifier. > >Signed-off-by: Corey Minyard > >Index: linux-2.6.21/arch/x86_64/kdb/kdbasupport.c >=================================================================== >--- linux-2.6.21.orig/arch/x86_64/kdb/kdbasupport.c >+++ linux-2.6.21/arch/x86_64/kdb/kdbasupport.c >@@ -915,7 +915,7 @@ kdba_init(void) > { > kdb_register("pt_regs", kdba_pt_regs, "address", "Format struct pt_regs", 0); > kdb_register("cpu_pda", kdba_cpu_pda, "", "Format struct cpu_pda", 0); >- atomic_notifier_chain_register(&die_chain, &kdba_notifier); >+ register_die_notifier(&kdba_notifier); > return; > } Thanks, but kdb-v4.4-2.6.22-rc1-x86_64-1 (2007-05-22) already has that change. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From minyard@acm.org Thu Jun 14 15:38:22 2007 Received: with ECARTIS (v1.0.0; list kdb); Thu, 14 Jun 2007 15:38:28 -0700 (PDT) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l5EMcKWt009977 for ; Thu, 14 Jun 2007 15:38:21 -0700 Received: from wf-rch.minyard.local ([71.97.113.70]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JJN002C2DJG42G6@vms044.mailsrvcs.net> for kdb@oss.sgi.com; Thu, 14 Jun 2007 17:38:04 -0500 (CDT) Received: from i2 (i2.minyard.local [192.168.27.126]) by wf-rch.minyard.local (Postfix) with ESMTP id 6D17A471F2; Thu, 14 Jun 2007 17:38:04 -0500 (CDT) Date: Thu, 14 Jun 2007 17:38:03 -0500 From: Corey Minyard Subject: kdb compile fix for non-x86 To: kdb@oss.sgi.com Cc: Dave Jiang Reply-to: minyard@acm.org Message-id: <20070614223803.GA13967@localdomain> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Content-Transfer-Encoding: 8bit X-archive-position: 1221 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: minyard@acm.org Precedence: bulk X-list: kdb Forwarding for Dave, against the lastest release... non-x86 archs (i.e. powerpc) has no asm/kdb.h. However 8250 serial stuff includes linux/kdb.h which pulls the asm/kdb.h. Thus this breaks non-x86 kernel builds. Wrapping CONFIG_KDB around that should fix the issue. Signed-off-by: Dave Jiang --- diff -Naurp 2.6.22-rc4/include/linux/kdb.h 2.6.22-rc4_mod/include/linux/kdb.h --- 2.6.22-rc4/include/linux/kdb.h 2007-06-14 14:44:43.000000000 -0700 +++ 2.6.22-rc4_mod/include/linux/kdb.h 2007-06-14 14:46:37.000000000 -0700 @@ -16,6 +16,7 @@ #include #include +#ifdef CONFIG_KDB /* These are really private, but they must be defined before including * asm-$(ARCH)/kdb.h, so make them public and put them here. */ @@ -23,6 +24,7 @@ extern int kdb_getuserarea_size(void *, extern int kdb_putuserarea_size(unsigned long, void *, size_t); #include +#endif #define KDB_MAJOR_VERSION 4 #define KDB_MINOR_VERSION 4 --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe. From kaos@sgi.com Thu Jun 14 18:58:31 2007 Received: with ECARTIS (v1.0.0; list kdb); Thu, 14 Jun 2007 18:58:36 -0700 (PDT) Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l5F1wSWt015898 for ; Thu, 14 Jun 2007 18:58:30 -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 LAA05375 for ; Fri, 15 Jun 2007 11:58:28 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 53D012F40; Fri, 15 Jun 2007 11:58:28 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 2E5D881EC0; Fri, 15 Jun 2007 11:58:28 +1000 (EST) X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.1 From: Keith Owens To: minyard@acm.org cc: kdb@oss.sgi.com, Dave Jiang Subject: Re: kdb compile fix for non-x86 In-reply-to: Your message of "Thu, 14 Jun 2007 17:38:03 EST." <20070614223803.GA13967@localdomain> Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Date: Fri, 15 Jun 2007 11:58:27 +1000 Message-ID: <4953.1181872707@kao2.melbourne.sgi.com> Content-Transfer-Encoding: 8bit X-archive-position: 1222 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 Corey Minyard (on Thu, 14 Jun 2007 17:38:03 -0500) wrote: >Forwarding for Dave, against the lastest release... > >non-x86 archs (i.e. powerpc) has no asm/kdb.h. However 8250 serial stuff >includes linux/kdb.h which pulls the asm/kdb.h. Thus this breaks non-x86 kernel >builds. Wrapping CONFIG_KDB around that should fix the issue. > >Signed-off-by: Dave Jiang Included in kdb-v4.4-2.6.22-rc4-common-2, thanks. --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.