From raghu_dk@yahoo.com Thu Jun 5 04:46:45 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 05 Jun 2003 04:46:49 -0700 (PDT) Received: from web40405.mail.yahoo.com (web40405.mail.yahoo.com [66.218.78.102]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h55Bki2x013995 for ; Thu, 5 Jun 2003 04:46:45 -0700 Message-ID: <20030605114639.73936.qmail@web40405.mail.yahoo.com> Received: from [203.196.148.130] by web40405.mail.yahoo.com via HTTP; Thu, 05 Jun 2003 04:46:39 PDT Date: Thu, 5 Jun 2003 04:46:39 -0700 (PDT) From: Raghu Subject: Is there KDB patch for PowerPC To: kdb@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 371 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: raghu_dk@yahoo.com Precedence: bulk X-list: kdb Dear All, Do we have KDB patch for PPC architecture ? Warm Regards Raghu __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From kaos@sgi.com Thu Jun 5 06:02:59 2003 Received: with ECARTIS (v1.0.0; list kdb); Thu, 05 Jun 2003 06:03:02 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h55D2u2x016878 for ; Thu, 5 Jun 2003 06:02:58 -0700 Received: (qmail 3673 invoked from network); 5 Jun 2003 13:02:55 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 5 Jun 2003 13:02:55 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 6078ED8F46; Thu, 5 Jun 2003 23:02:54 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 5DB5891336; Thu, 5 Jun 2003 23:02:54 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: Raghu Cc: kdb@oss.sgi.com Subject: Re: Is there KDB patch for PowerPC In-reply-to: Your message of "Thu, 05 Jun 2003 04:46:39 MST." <20030605114639.73936.qmail@web40405.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 05 Jun 2003 23:02:49 +1000 Message-ID: <3055.1054818169@ocs3.intra.ocs.com.au> X-archive-position: 372 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, 5 Jun 2003 04:46:39 -0700 (PDT), Raghu wrote: >Do we have KDB patch for PPC architecture ? Ask the ppc group. A one point, there were kdb patches for ppc in Marcelo's tree buit he removed them, so somebody is working on it. I do not recall getting any patches on this list. From Richard.Sanders@stratus.com Mon Jun 9 12:59:18 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 09 Jun 2003 12:59:26 -0700 (PDT) Received: from mailhub1.stratus.com (mailhub1.stratus.com [134.111.1.15]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h59JxH2x014731 for ; Mon, 9 Jun 2003 12:59:18 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub1.stratus.com (8.9.3/8.9.3) with SMTP id QAA24436 for ; Mon, 9 Jun 2003 16:04:06 -0400 (EDT) Received: FROM exna0.stratus.com BY vscano.corp.stratus.com ; Mon Jun 09 15:59:12 2003 -0400 Received: by exna0.stratus.com with Internet Mail Service (5.5.2653.19) id ; Mon, 9 Jun 2003 15:59:11 -0400 Message-ID: From: "Sanders, Richard" To: "'kdb@oss.sgi.com'" Subject: KDB: SMP locking problem Date: Mon, 9 Jun 2003 15:58:04 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C32EC1.702FC310" X-archive-position: 373 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C32EC1.702FC310 Content-Type: text/plain; charset="iso-8859-1" Here is a patch for kdb/kdb_io.c which fixes a SMP race on the printf lock. Patch is against 4.2. <> ------_=_NextPart_000_01C32EC1.702FC310 Content-Type: application/octet-stream; name="kdb.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdb.patch" --- linux/kdb/kdb_io.c.orig Mon Jun 9 15:45:54 2003=0A= +++ linux/kdb/kdb_io.c Mon Jun 9 15:47:08 2003=0A= @@ -493,10 +493,11 @@=0A= * But if any cpu goes recursive in kdb, just print the output,=0A= * even if it is interleaved with any other text.=0A= */=0A= - if (!KDB_STATE(PRINTF_LOCK)) {=0A= + spin_lock(&kdb_printf_lock);=0A= + if (!KDB_STATE(PRINTF_LOCK)) =0A= KDB_STATE_SET(PRINTF_LOCK);=0A= - spin_lock(&kdb_printf_lock);=0A= - }=0A= + else=0A= + spin_unlock(&kdb_printf_lock);=0A= =0A= diag =3D kdbgetintenv("LINES", &linecount);=0A= if (diag || linecount <=3D 1)=0A= @@ -592,8 +593,8 @@=0A= console_loglevel =3D saved_loglevel;=0A= }=0A= if (KDB_STATE(PRINTF_LOCK)) {=0A= - spin_unlock(&kdb_printf_lock);=0A= KDB_STATE_CLEAR(PRINTF_LOCK);=0A= + spin_unlock(&kdb_printf_lock);=0A= }=0A= if (do_longjmp)=0A= #ifdef KDB_HAVE_LONGJMP=0A= ------_=_NextPart_000_01C32EC1.702FC310-- From kaos@sgi.com Mon Jun 9 14:41:13 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 09 Jun 2003 14:41:18 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h59LfA2x017496 for ; Mon, 9 Jun 2003 14:41:12 -0700 Received: (qmail 22010 invoked from network); 9 Jun 2003 21:41:08 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 9 Jun 2003 21:41:08 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id E88E9D8F46; Tue, 10 Jun 2003 07:41:05 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id E5DBE91336; Tue, 10 Jun 2003 07:41:05 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: "Sanders, Richard" Cc: "'kdb@oss.sgi.com'" Subject: Re: KDB: SMP locking problem In-reply-to: Your message of "Mon, 09 Jun 2003 15:58:04 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 10 Jun 2003 07:41:00 +1000 Message-ID: <12337.1055194860@ocs3.intra.ocs.com.au> X-archive-position: 374 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, 9 Jun 2003 15:58:04 -0400 , "Sanders, Richard" wrote: >Here is a patch for kdb/kdb_io.c which fixes a SMP race on the printf lock. >Patch is against 4.2. >--- linux/kdb/kdb_io.c.orig Mon Jun 9 15:45:54 2003 >+++ linux/kdb/kdb_io.c Mon Jun 9 15:47:08 2003 >@@ -493,10 +493,11 @@ > * But if any cpu goes recursive in kdb, just print the output, > * even if it is interleaved with any other text. > */ >- if (!KDB_STATE(PRINTF_LOCK)) { >+ spin_lock(&kdb_printf_lock); >+ if (!KDB_STATE(PRINTF_LOCK)) > KDB_STATE_SET(PRINTF_LOCK); >- spin_lock(&kdb_printf_lock); >- } >+ else >+ spin_unlock(&kdb_printf_lock); > > diag = kdbgetintenv("LINES", &linecount); > if (diag || linecount <= 1) >@@ -592,8 +593,8 @@ > console_loglevel = saved_loglevel; > } > if (KDB_STATE(PRINTF_LOCK)) { >- spin_unlock(&kdb_printf_lock); > KDB_STATE_CLEAR(PRINTF_LOCK); >+ spin_unlock(&kdb_printf_lock); > } > if (do_longjmp) > #ifdef KDB_HAVE_LONGJMP Rejected. Read the comments at the start of your patch, you just introduced a recursion deadlock. BTW, your patch was in quoted printable. Like Linus, I tend to ignore encoded patches unless they are so large that they have to be zipped. Please send small patchs in plain text, not as encoded attachments. From Richard.Sanders@stratus.com Tue Jun 10 07:51:46 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 07:51:50 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub2.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AEpj2x008493 for ; Tue, 10 Jun 2003 07:51:45 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id KAA05187 for ; Tue, 10 Jun 2003 10:45:54 -0400 (EDT) Received: FROM EXNA4.stratus.com BY vscano.corp.stratus.com ; Tue Jun 10 10:51:43 2003 -0400 Received: by exna4.stratus.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Jun 2003 10:51:43 -0400 Message-ID: From: "Sanders, Richard" To: "Kdb (E-mail)" Subject: invalid parameters to test_bit Date: Tue, 10 Jun 2003 10:51:40 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 375 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb v4.2 The second parameter to test_bit takes a pointer. --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/arch/i386/kernel/traps.c Tue Jun 10 09:11:22 2003 +++ arch/i386/kernel/traps.c Mon Jun 9 17:17:05 2003 @@ -1006,8 +1007,8 @@ set_trap_gate(12,&stack_segment); set_trap_gate(13,&general_protection); #ifdef CONFIG_KDB - if (test_bit(X86_FEATURE_MCE, boot_cpu_data.x86_capability) && - test_bit(X86_FEATURE_MCA, boot_cpu_data.x86_capability)) { + if (test_bit(X86_FEATURE_MCE, &boot_cpu_data.x86_capability) && + test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) { set_intr_gate(14,&page_fault_mca); } else { From Richard.Sanders@stratus.com Tue Jun 10 07:56:47 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 07:56:51 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AEuk2x008522 for ; Tue, 10 Jun 2003 07:56:47 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id KAA05741 for ; Tue, 10 Jun 2003 10:50:56 -0400 (EDT) Received: FROM EXNA4.stratus.com BY vscano.corp.stratus.com ; Tue Jun 10 10:56:44 2003 -0400 Received: by exna4.stratus.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Jun 2003 10:56:44 -0400 Message-ID: From: "Sanders, Richard" To: "Kdb (E-mail)" Subject: breaking into kdb via usb keyboard Date: Tue, 10 Jun 2003 10:56:36 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 376 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb drivers/char/keyboard.c relies on the fact that kdb_pt_regs gets filled out when a ps2 interrupt occurs to pass this data to kdb(). When a usb keyboard is used to break into kdb via the [Break] key, this variable is not filled out. --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/drivers/usb/usb-ohci.c Fri Apr 4 13:38:50 2003 +++ drivers/usb/usb-ohci.c Tue Jun 10 10:54:58 2003 @@ -2384,6 +2384,11 @@ struct ohci_regs * regs = ohci->regs; int ints; +#ifdef CONFIG_KDB + extern struct pt_regs * kdb_pt_regs; + kbd_pt_regs = r; +#endif + if ((ohci->hcca->done_head != 0) && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { ints = OHCI_INTR_WDH; } else if ((ints = (readl (®s->intrstatus) & readl (®s->intrenable))) == 0) { --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/drivers/usb/usb-uhci.c Tue Jun 10 08:49:43 2003 +++ drivers/usb/usb-uhci.c Tue Jun 10 10:55:15 2003 @@ -2730,6 +2730,11 @@ unsigned short status; struct list_head *p, *p2; int restarts, work_done; + +#ifdef CONFIG_KDB + extern struct pt_regs * kbd_pt_regs; + kbd_pt_regs = regs; +#endif /* * Read the interrupt status, and write it back to clear the From Richard.Sanders@stratus.com Tue Jun 10 07:59:39 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 07:59:42 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub2.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AExc2x008551 for ; Tue, 10 Jun 2003 07:59:39 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id KAA06007 for ; Tue, 10 Jun 2003 10:53:48 -0400 (EDT) Received: FROM exna0.stratus.com BY vscano.corp.stratus.com ; Tue Jun 10 10:59:35 2003 -0400 Received: by exna0.stratus.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Jun 2003 10:59:35 -0400 Message-ID: From: "Sanders, Richard" To: "Kdb (E-mail)" Subject: FW: breaking into kdb via usb keyboard Date: Tue, 10 Jun 2003 10:59:31 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 377 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb My apologies, wrong patch dir...here is the right one. --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/drivers/usb/usb-ohci.c Fri Apr 4 13:38:50 2003 +++ drivers/usb/usb-ohci.c Tue Jun 10 10:54:58 2003 @@ -2384,6 +2384,11 @@ struct ohci_regs * regs = ohci->regs; int ints; +#ifdef CONFIG_KDB + extern struct pt_regs * kbd_pt_regs; + kbd_pt_regs = r; +#endif + if ((ohci->hcca->done_head != 0) && !(le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { ints = OHCI_INTR_WDH; } else if ((ints = (readl (®s->intrstatus) & readl (®s->intrenable))) == 0) { --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/drivers/usb/usb-uhci.c Tue Jun 10 08:49:43 2003 +++ drivers/usb/usb-uhci.c Tue Jun 10 10:55:15 2003 @@ -2730,6 +2730,11 @@ unsigned short status; struct list_head *p, *p2; int restarts, work_done; + +#ifdef CONFIG_KDB + extern struct pt_regs * kbd_pt_regs; + kbd_pt_regs = regs; +#endif /* * Read the interrupt status, and write it back to clear the From Richard.Sanders@stratus.com Tue Jun 10 08:50:32 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 08:50:37 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub2.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AFoV2x009964 for ; Tue, 10 Jun 2003 08:50:32 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id LAA10729 for ; Tue, 10 Jun 2003 11:44:41 -0400 (EDT) Received: FROM EXNA4.stratus.com BY vscano.corp.stratus.com ; Tue Jun 10 11:50:29 2003 -0400 Received: by exna4.stratus.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Jun 2003 11:50:29 -0400 Message-ID: From: "Sanders, Richard" To: "'kdb@oss.sgi.com'" Subject: RE: KDB: SMP locking problem Date: Tue, 10 Jun 2003 11:50:22 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 378 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb Ok, my first patch was pretty badly broken... try two. Between the smp race on this test and set flag: if (!KDB_STATE(PRINTF_LOCK)) { KDB_STATE_SET(PRINTF_LOCK); spin_lock(&kdb_printf_lock); } ... and the fact that in the inner calls of a recursive kdb_printf this test is trues: if (KDB_STATE(PRINTF_LOCK)) { spin_unlock(&kdb_printf_lock); KDB_STATE_CLEAR(PRINTF_LOCK); } ... the possibility exists to get the PRINTF_LOCK state and the spin_lock state out of sync, eventually leading to a deadlock. What I have done is intoduce a recursion count to ensure that only the outer call is interacting with the smp serialization, with data locking to prevent racing. This replaces the functionality of the KDB_STATE_PRINTF_LOCK. --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/include/linux/kdb.h Tue Jun 10 08:49:44 2003 +++ include/linux/kdb.h Tue Jun 10 11:01:10 2003 @@ -138,7 +138,7 @@ #define KDB_STATE_SUPPRESS 0x00000200 /* Suppress error messages */ #define KDB_STATE_LONGJMP 0x00000400 /* longjmp() data is available */ #define KDB_STATE_GO_SWITCH 0x00000800 /* go is switching back to initial cpu */ -#define KDB_STATE_PRINTF_LOCK 0x00001000 /* Holds kdb_printf lock */ +/* 0x00001000 Unused */ #define KDB_STATE_WAIT_IPI 0x00002000 /* Waiting for kdb_ipi() NMI */ #define KDB_STATE_RECURSE 0x00004000 /* Recursive entry to kdb */ #define KDB_STATE_IP_ADJUSTED 0x00008000 /* Restart IP has been adjusted */ --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/kdb/kdb_io.c Tue Jun 10 08:49:44 2003 +++ kdb/kdb_io.c Tue Jun 10 11:04:33 2003 @@ -487,16 +487,20 @@ int logging, saved_loglevel = 0; int do_longjmp = 0; struct console *c = console_drivers; - static spinlock_t kdb_printf_lock = SPIN_LOCK_UNLOCKED; + static spinlock_t data_lock = SPIN_LOCK_UNLOCKED; + static spinlock_t serialize_lock = SPIN_LOCK_UNLOCKED; + static int recursion_count[NR_CPUS] = { 0 }; /* Serialize kdb_printf if multiple cpus try to write at once. * But if any cpu goes recursive in kdb, just print the output, * even if it is interleaved with any other text. */ - if (!KDB_STATE(PRINTF_LOCK)) { - KDB_STATE_SET(PRINTF_LOCK); - spin_lock(&kdb_printf_lock); - } + spin_lock(&data_lock); + /* attempt to grab the lock only on the root call of this recurse */ + if ( !recursion_count[smp_processor_id()] ) + spin_lock(&serialize_lock); + ++recursion_count[smp_processor_id()]; + spin_unlock(&data_lock); diag = kdbgetintenv("LINES", &linecount); if (diag || linecount <= 1) @@ -591,10 +595,17 @@ if (logging) { console_loglevel = saved_loglevel; } - if (KDB_STATE(PRINTF_LOCK)) { - spin_unlock(&kdb_printf_lock); - KDB_STATE_CLEAR(PRINTF_LOCK); - } + + spin_lock(&data_lock); + --recursion_count[smp_processor_id()]; + /* + * only clear the serialization lock if this is the root call + * and not one of the nested calls + */ + if ( !recursion_count[smp_processor_id()] ) + spin_unlock(&serialize_lock); + spin_unlock(&data_lock); + if (do_longjmp) #ifdef KDB_HAVE_LONGJMP kdba_longjmp(&kdbjmpbuf[smp_processor_id()], 1) From Richard.Sanders@stratus.com Tue Jun 10 08:58:51 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 08:58:54 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AFwo2x011076 for ; Tue, 10 Jun 2003 08:58:51 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id LAA11378 for ; Tue, 10 Jun 2003 11:51:41 -0400 (EDT) Received: FROM EXNA4.stratus.com BY vscano.corp.stratus.com ; Tue Jun 10 11:57:29 2003 -0400 Received: by exna4.stratus.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Jun 2003 11:57:29 -0400 Message-ID: From: "Sanders, Richard" To: "Sanders, Richard" , "Kdb (E-mail)" Subject: RE: invalid parameters to test_bit Date: Tue, 10 Jun 2003 11:57:26 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 379 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb Withdrawn. -----Original Message----- From: Sanders, Richard [mailto:Richard.Sanders@stratus.com] Sent: Tuesday, June 10, 2003 10:52 AM To: Kdb (E-mail) Subject: invalid parameters to test_bit v4.2 The second parameter to test_bit takes a pointer. --- /h/rsanders/trees/2.0_kdb4/ftl_future/linux/arch/i386/kernel/traps.c Tue Jun 10 09:11:22 2003 +++ arch/i386/kernel/traps.c Mon Jun 9 17:17:05 2003 @@ -1006,8 +1007,8 @@ set_trap_gate(12,&stack_segment); set_trap_gate(13,&general_protection); #ifdef CONFIG_KDB - if (test_bit(X86_FEATURE_MCE, boot_cpu_data.x86_capability) && - test_bit(X86_FEATURE_MCA, boot_cpu_data.x86_capability)) { + if (test_bit(X86_FEATURE_MCE, &boot_cpu_data.x86_capability) && + test_bit(X86_FEATURE_MCA, &boot_cpu_data.x86_capability)) { set_intr_gate(14,&page_fault_mca); } else { From sdake@mvista.com Tue Jun 10 16:08:32 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 16:08:39 -0700 (PDT) Received: from zipcode.az.mvista.com (fw-az.mvista.com [65.200.49.158]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5AN8V2x010248 for ; Tue, 10 Jun 2003 16:08:32 -0700 Received: from mvista.com (persist.az.mvista.com [10.50.1.246]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id QAA05671 for ; Tue, 10 Jun 2003 16:22:23 -0700 Message-ID: <3EE664DD.30604@mvista.com> Date: Tue, 10 Jun 2003 16:08:13 -0700 From: Steven Dake User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kdb@oss.sgi.com Subject: Backtraces with interrupts or signals seem unreliable, anyone else seen this? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 380 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 Folks, It seems when an interrupt or signal occurs, which results in an exception frame (with frame pointers on), KDB has trouble decoding that frame properly when using the backtrace functionality. If I get past the exception frame, the rest of the backtrace looks fine. Has anyone seen this behavior? I am using KDB 4.1. Thanks -steve From kaos@sgi.com Tue Jun 10 19:36:28 2003 Received: with ECARTIS (v1.0.0; list kdb); Tue, 10 Jun 2003 19:36:32 -0700 (PDT) Received: from tolkor.sgi.com (tolkor.sgi.com [198.149.18.6]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5B2aR2x030666 for ; Tue, 10 Jun 2003 19:36:27 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by tolkor.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with SMTP id h5B2qfmO006954 for ; Tue, 10 Jun 2003 21:52:42 -0500 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 MAA21117; Wed, 11 Jun 2003 12:35:04 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 3B2B0D8F46; Wed, 11 Jun 2003 12:35:04 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 385A691336; Wed, 11 Jun 2003 12:35:04 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: "Sanders, Richard" Cc: "'kdb@oss.sgi.com'" Subject: Re: KDB: SMP locking problem In-reply-to: Your message of "Tue, 10 Jun 2003 11:50:22 -0400." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 11 Jun 2003 12:34:59 +1000 Message-ID: <10503.1055298899@kao2.melbourne.sgi.com> X-archive-position: 381 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 Tue, 10 Jun 2003 11:50:22 -0400, "Sanders, Richard" wrote: >Ok, my first patch was pretty badly broken... try two. > >Between the smp race on this test and set flag: > >if (!KDB_STATE(PRINTF_LOCK)) { > KDB_STATE_SET(PRINTF_LOCK); > spin_lock(&kdb_printf_lock); >} > >... and the fact that in the inner calls of a recursive kdb_printf this test >is trues: > >if (KDB_STATE(PRINTF_LOCK)) { > spin_unlock(&kdb_printf_lock); > KDB_STATE_CLEAR(PRINTF_LOCK); >} > >... the possibility exists to get the PRINTF_LOCK state and the spin_lock >state out of sync, eventually leading to a deadlock. > >What I have done is intoduce a recursion count to ensure that only the outer >call is interacting with the smp serialization, with data locking to prevent >racing. This replaces the functionality of the KDB_STATE_PRINTF_LOCK. This should have the same effect and is much simpler. It will only unlock and clear the state in the same logic flow that got the lock. --- linux/kdb/kdb_io.c Wed Jun 11 12:33:11 2003 +++ linux/kdb/kdb_io.c Wed Jun 11 12:32:53 2003 @@ -486,6 +486,7 @@ int linecount; int logging, saved_loglevel = 0; int do_longjmp = 0; + int got_printf_lock = 0; struct console *c = console_drivers; static spinlock_t kdb_printf_lock = SPIN_LOCK_UNLOCKED; @@ -496,6 +497,7 @@ if (!KDB_STATE(PRINTF_LOCK)) { KDB_STATE_SET(PRINTF_LOCK); spin_lock(&kdb_printf_lock); + got_printf_lock = 1; } diag = kdbgetintenv("LINES", &linecount); @@ -591,9 +593,10 @@ if (logging) { console_loglevel = saved_loglevel; } - if (KDB_STATE(PRINTF_LOCK)) { + if (KDB_STATE(PRINTF_LOCK) && got_printf_lock) { spin_unlock(&kdb_printf_lock); KDB_STATE_CLEAR(PRINTF_LOCK); + got_printf_lock = 0; } if (do_longjmp) #ifdef KDB_HAVE_LONGJMP From Richard.Sanders@stratus.com Wed Jun 11 09:01:04 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 09:01:08 -0700 (PDT) Received: from mailhub2.stratus.com (mailhub.stratus.com [134.111.1.16]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5BG132x012816 for ; Wed, 11 Jun 2003 09:01:03 -0700 Received: from vscano.corp.stratus.com (vscano.corp.stratus.com [134.111.201.200]) by mailhub2.stratus.com (8.9.3/8.9.3) with SMTP id LAA18919 for ; Wed, 11 Jun 2003 11:55:08 -0400 (EDT) Received: FROM exna0.stratus.com BY vscano.corp.stratus.com ; Wed Jun 11 12:00:57 2003 -0400 Received: by exna0.stratus.com with Internet Mail Service (5.5.2653.19) id ; Wed, 11 Jun 2003 12:00:57 -0400 Message-ID: From: "Sanders, Richard" To: "'kdb@oss.sgi.com'" Subject: RE: KDB: SMP locking problem Date: Wed, 11 Jun 2003 12:00:56 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 382 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Richard.Sanders@stratus.com Precedence: bulk X-list: kdb > This should have the same effect and is much simpler. It will only > unlock and clear the state in the same logic flow that got the lock. > Looks great to me. From glowell@sonic.net Wed Jun 11 10:33:39 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 10:33:42 -0700 (PDT) Received: from b.smtp-out.sonic.net (b.smtp-out.sonic.net [208.201.224.39]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5BHXd2x016506 for ; Wed, 11 Jun 2003 10:33:39 -0700 Received: (qmail 8475 invoked from network); 11 Jun 2003 17:33:36 -0000 Received: from tempest.sonic.net (208.201.224.25) by b.smtp-out.sonic.net with SMTP; 11 Jun 2003 17:33:36 -0000 Received: from sonic.net (bolt.sonic.net [208.201.242.18]) by tempest.sonic.net (8.11.6p2/8.8.5) with ESMTP id h5BHXaL16607 for ; Wed, 11 Jun 2003 10:33:36 -0700 X-envelope-info: Received: from bolt.sonic.net (IDENT:glowell@localhost [127.0.0.1]) by sonic.net (8.12.9/8.12.1) with ESMTP id h5BHXaUS021175 for ; Wed, 11 Jun 2003 10:33:36 -0700 Received: (from glowell@localhost) by bolt.sonic.net (8.12.9/8.12.1/Submit) id h5BHXarl021173 for kdb@oss.sgi.com; Wed, 11 Jun 2003 10:33:36 -0700 From: glowell Message-Id: <200306111733.h5BHXarl021173@bolt.sonic.net> Subject: Linux 2.5/2.6 support To: kdb@oss.sgi.com Date: Wed, 11 Jun 2003 10:33:36 -0700 (PDT) X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 383 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: glowell@sonic.net Precedence: bulk X-list: kdb Hello - Is anyone working on kdb for linux 2.5/2.6 ? Thanks, Gary From sdake@mvista.com Wed Jun 11 10:36:29 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 10:36:33 -0700 (PDT) Received: from zipcode.az.mvista.com (fw-az.mvista.com [65.200.49.158]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5BHaQ2x016535 for ; Wed, 11 Jun 2003 10:36:28 -0700 Received: from mvista.com (persist.az.mvista.com [10.50.1.246]) by zipcode.az.mvista.com (8.9.3/8.9.3) with ESMTP id KAA06954; Wed, 11 Jun 2003 10:50:15 -0700 Message-ID: <3EE76886.3060108@mvista.com> Date: Wed, 11 Jun 2003 10:36:06 -0700 From: Steven Dake User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Keith Owens CC: kdb@oss.sgi.com Subject: Re: Backtraces with interrupts or signals seem unreliable, anyone else seen this? References: <10197.1055298337@kao2.melbourne.sgi.com> In-Reply-To: <10197.1055298337@kao2.melbourne.sgi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 384 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 x86, specifically a pentium4. Keith Owens wrote: >On Tue, 10 Jun 2003 16:08:13 -0700, >Steven Dake wrote: > > >>It seems when an interrupt or signal occurs, which results in an >>exception frame (with frame pointers on), KDB has trouble decoding that >>frame properly when using the backtrace functionality. If I get past >>the exception frame, the rest of the backtrace looks fine. >> >>Has anyone seen this behavior? I am using KDB 4.1. >> >> > >Which architecture? Every arch has different ways of decoding the >frames. > > > > > From Thomas.Duffy.99@alumni.brown.edu Wed Jun 11 11:14:41 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 11:14:50 -0700 (PDT) Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5BIEe2x019162 for ; Wed, 11 Jun 2003 11:14:41 -0700 Received: from phys-bos-1 ([129.146.14.23]) by nwkea-mail-1.sun.com (8.12.9/8.12.9) with ESMTP id h5BIEZ4Z012916 for ; Wed, 11 Jun 2003 11:14:35 -0700 (PDT) Received: from biznatch (biznatch.Eng.Sun.COM [129.146.95.110]) by bos-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HGB000GYXCB7L@bos-mail1.sfbay.sun.com> for kdb@oss.sgi.com; Wed, 11 Jun 2003 11:14:35 -0700 (PDT) Date: Wed, 11 Jun 2003 11:14:35 -0700 From: Thomas Duffy Subject: Re: Linux 2.5/2.6 support In-reply-to: <200306111733.h5BHXarl021173@bolt.sonic.net> To: kdb@oss.sgi.com Message-id: <1055355274.7174.28.camel@biznatch> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.0 (1.4.0-2) Content-type: text/plain Content-transfer-encoding: 7bit References: <200306111733.h5BHXarl021173@bolt.sonic.net> X-archive-position: 385 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Thomas.Duffy.99@alumni.brown.edu Precedence: bulk X-list: kdb On Wed, 2003-06-11 at 10:33, glowell wrote: > Hello - > > Is anyone working on kdb for linux 2.5/2.6 ? Jim Houston posted a mail on May 1 about a port he was working on: On Thu, 2003-05-01 at 12:25, Jim Houston wrote: > Hi Keith, Everyone, > > I have been using kdb in linux-2.5 kernels doing the quick > hacks necessary to make kdb work with recent kernels. I just > upgraded to kdb-4.1 and linux-2.5.68. I hope that others may > find this work useful so I'm making a patch available here: > > http://www.ccur.com/realtime/oss/ > > The patch is based on the SGI patches (kdb-v4.1-2.4.20-common-1, > and kdb-v4.1-2.4.20-i386-1). It is a single patch which > can be applied to a standard linux-2.5.68 kernel. > > I'm still working on a few issues. The following features are > not working: > - Input of symbol names for modules. > - Symbol name completion. > - Module and section related commands. > - Kill command. > > > Keith, I hope that you will release an offical kdb for 2.5 kernels. > Let me know if there is anything I can do to help. > > Jim Houston - Concurrent Computer Corp. -- Thomas Duffy From kaos@sgi.com Wed Jun 11 13:37:00 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 13:37:03 -0700 (PDT) Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5BKav2x027758 for ; Wed, 11 Jun 2003 13:36:59 -0700 Received: (qmail 23432 invoked from network); 11 Jun 2003 20:36:55 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 11 Jun 2003 20:36:55 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id 49B56D8F46; Thu, 12 Jun 2003 06:36:51 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 46E6291336; Thu, 12 Jun 2003 06:36:51 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: Steven Dake Cc: kdb@oss.sgi.com Subject: Re: Backtraces with interrupts or signals seem unreliable, anyone else seen this? In-reply-to: Your message of "Wed, 11 Jun 2003 10:36:06 MST." <3EE76886.3060108@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 12 Jun 2003 06:36:46 +1000 Message-ID: <7714.1055363806@ocs3.intra.ocs.com.au> X-archive-position: 386 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, 11 Jun 2003 10:36:06 -0700, Steven Dake wrote: >x86, specifically a pentium4. Uggh, I hate top quoting on mailing lists. Turn on KDB debugging (debug the debugger). When you see the problem, 'set KDBDEBUG 0x19' and reissue bt. From kaos@sgi.com Wed Jun 11 18:59:57 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 19:00:08 -0700 (PDT) Received: from zok.sgi.com (zok.sgi.com [204.94.215.101]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5C1xv2x011587 for ; Wed, 11 Jun 2003 18:59:57 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by zok.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with SMTP id h5B2R0tm027415 for ; Tue, 10 Jun 2003 19:27:01 -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 MAA21014; Wed, 11 Jun 2003 12:25:43 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 340F6D8F46; Wed, 11 Jun 2003 12:25:42 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 337A291336; Wed, 11 Jun 2003 12:25:42 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: Steven Dake Cc: kdb@oss.sgi.com Subject: Re: Backtraces with interrupts or signals seem unreliable, anyone else seen this? In-reply-to: Your message of "Tue, 10 Jun 2003 16:08:13 MST." <3EE664DD.30604@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 11 Jun 2003 12:25:37 +1000 Message-ID: <10197.1055298337@kao2.melbourne.sgi.com> X-archive-position: 387 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 Tue, 10 Jun 2003 16:08:13 -0700, Steven Dake wrote: >It seems when an interrupt or signal occurs, which results in an >exception frame (with frame pointers on), KDB has trouble decoding that >frame properly when using the backtrace functionality. If I get past >the exception frame, the rest of the backtrace looks fine. > >Has anyone seen this behavior? I am using KDB 4.1. Which architecture? Every arch has different ways of decoding the frames. From Thomas.Duffy.99@alumni.brown.edu Wed Jun 11 19:45:46 2003 Received: with ECARTIS (v1.0.0; list kdb); Wed, 11 Jun 2003 19:45:54 -0700 (PDT) Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5C2jj2x013250 for ; Wed, 11 Jun 2003 19:45:46 -0700 Received: from phys-bos-1 ([129.146.14.23]) by nwkea-mail-1.sun.com (8.12.9/8.12.9) with ESMTP id h5C2je4Z026769 for ; Wed, 11 Jun 2003 19:45:40 -0700 (PDT) Received: from biznatch (biznatch.Eng.Sun.COM [129.146.95.110]) by bos-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HGC008NYL04XH@bos-mail1.sfbay.sun.com> for kdb@oss.sgi.com; Wed, 11 Jun 2003 19:45:40 -0700 (PDT) Date: Wed, 11 Jun 2003 19:45:40 -0700 From: Thomas Duffy Subject: Re: Backtraces with interrupts or signals seem unreliable, anyone else seen this? In-reply-to: <7714.1055363806@ocs3.intra.ocs.com.au> To: kdb@oss.sgi.com Message-id: <1055385940.9656.7.camel@biznatch> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.0 (1.4.0-2) Content-type: multipart/signed; boundary="=-rUnnoMhGiPdVd1B6wTPt"; protocol="application/pgp-signature"; micalg=pgp-sha1 References: <7714.1055363806@ocs3.intra.ocs.com.au> X-archive-position: 388 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Thomas.Duffy.99@alumni.brown.edu Precedence: bulk X-list: kdb --=-rUnnoMhGiPdVd1B6wTPt Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2003-06-11 at 13:36, Keith Owens wrote: > Uggh, I hate top quoting on mailing lists. Of course, top quoting is what you like, top *posting* is what you hate :-) BTW, I agree with you Keith..in the immortal words of Nick Moffitt: =20 A: No. Q: Should I include quotations after my reply? This is, unfortunately, a crusade we will never win. LookOut forces this bad behavior. -tduffy --=-rUnnoMhGiPdVd1B6wTPt Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+5+lUdY502zjzwbwRAt+JAJwPyXPkVwYMomuy5wHWx3TeZuQXoQCbBf1k pYPIB5us+FcPHyflF1TtpeA= =x3fr -----END PGP SIGNATURE----- --=-rUnnoMhGiPdVd1B6wTPt-- From kaos@melbourne.sgi.com Fri Jun 20 00:16:09 2003 Received: with ECARTIS (v1.0.0; list kdb); Fri, 20 Jun 2003 00:16:19 -0700 (PDT) Received: from tolkor.sgi.com ([198.149.18.6]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5K7G72x021859 for ; Fri, 20 Jun 2003 00:16:08 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by tolkor.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with SMTP id h5K7WtmO014263 for ; Fri, 20 Jun 2003 02:32:56 -0500 Received: from kao1.melbourne.sgi.com (kao1.melbourne.sgi.com [134.14.55.179]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA00912; Fri, 20 Jun 2003 17:07:58 +1000 Received: by kao1.melbourne.sgi.com (Postfix, from userid 16331) id 9410618157A; Fri, 20 Jun 2003 17:07:52 +1000 (EST) Received: from kao1.melbourne.sgi.com (localhost [127.0.0.1]) by kao1.melbourne.sgi.com (Postfix) with ESMTP id 7A2AE10016A; Fri, 20 Jun 2003 17:07:52 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 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.3 is available for kernels 2.4.20, 2.4.21 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 20 Jun 2003 17:07:47 +1000 Message-ID: <29513.1056092867@kao1.melbourne.sgi.com> X-archive-position: 389 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 ftp://oss.sgi.com/projects/kdb/download/v4.3/ kdb-v4.3-2.4.20-common-1.bz2 kdb-v4.3-2.4.20-i386-1.bz2 kdb-v4.3-2.4.20-ia64-021210-1.bz2 kdb-v4.3-2.4.20-sparc64-1.bz2 kdb-v4.3-2.4.20-xscale-1.bz2 kdb v4.3 patches against 2.4.21 are functionally identical to 2.4.20. kdb-v4.3-2.4.21-common-1.bz2 kdb-v4.3-2.4.21-i386-1.bz2 Other 2.4.21 arch patches will appear later. ia64 is waiting for an official 2.4.21 ia64 kernel patch. Changelog extracts since v4.2. 2.4.20-common-1 2003-06-20 Keith Owens * More details on vm command, add vmp and pte commands. Dean Nelson, Dean Roe, SGI. * YAO1SCF (Yet Another O(1) Scheduler Coexistence Fix). * Changes to common code to build on sparc. Tom Duffy. * Move Tom Duffy's changes to drivers/sbus from the sparc64 patch to the common patch to keep all the serial changes together. * Changes to common code to build on Xscale. Eddie Dong, Intel. * Remove CROSS_COMPILE_INC. * Remove obsolete boot parameter 'kdb', long since replaced by 'kdb=on'. * Remove obsolete kdb_eframe_t casts. * Add CONFIG_KDB_CONTINUE_CATASTROPHIC. * Wait a short interval for cpus to join kdb before proceeding. * Automatically enable sysrq for sr command. * Correct double free of kdb_printf lock, spotted by Richard Sanders. * Add optional cpu parameter to btc command. * kdb v4.3-2.4.20-common-1. 2.4.20-i386-1 2003-06-20 Keith Owens * Add CONFIG_KDB_CONTINUE_CATASTROPHIC. * Correct KDB_ENTER() definition. * kdb v4.3-2.4.20-i386-1. 2.4.20-ia64-020821-1 2003-06-20 Keith Owens * Add CONFIG_KDB_CONTINUE_CATASTROPHIC. * Do not send IPI if the machine state does not require them. * Correct definition of KDB_ENTER(). * Workaround for broken init monarch handler. * Monarch cpu must get to kdb, even if it was interrupted in user space. * Unwind fixes. * Generalize ia64_spinlock_contention name. * Add kdba_fru for SN machines. * Correct test for cpu number. * kdb v4.3-2.4.20-ia64-020821-1. 2.4.20-sparc64-1 2003-06-01 Keith Owens * Move drivers/sbus changes to common patch. * kdb v4.3-2.4.20-sparc64-1 2003-05-05 Tom Duffy * port new kdb v4.2 to sparc64 * kdb v4.2-2.4.20-sparc64-1 2.4.20-xscale-1 2003-06-01 Keith Owens * Fit patch against arm code in 2.4.20 kernel. * kdb v4.3-2.4.20-xscale-1. 2003-05-06 Eddie Dong * * Port to KDB4.2 * Add read/write access to user pages. Vamsi Krishna S., IBM * kdb v4.2-2.4.20-xscale-1. v4.3/README Starting with kdb v2.0 there is a common patch against each kernel which contains all the architecture independent code plus separate architecture dependent patches. Apply the common patch for your kernel plus at least one architecture dependent patch, the architecture patches activate kdb. The naming convention for kdb patches is :- vx.y The version of kdb. x.y is updated as new features are added to kdb. -v.p.s The kernel version that the patch applies to. 's' may include -pre, -rc or whatever numbering system the kernel keepers have thought up this week. -common The common kdb code. Everybody needs this. -i386 Architecture dependent code for i386. -ia64 Architecture dependent code for ia64, etc. -n If there are multiple kdb patches against the same kernel version then the last number is incremented. To build kdb for your kernel, apply the common kdb patch which is less than or equal to the kernel v.p.s, taking the highest value of '-n' if there is more than one. Apply the relevant arch dependent patch with the same value of 'vx.y-v.p.s-', taking the highest value of '-n' if there is more than one. For example, to use kdb for i386 on kernel 2.4.20, apply kdb-v4.3-2.4.20-common- (use highest value of ) kdb-v4.3-2.4.20-i386- (use highest value of ) in that order. To use kdb for ia64-021210 on kernel 2.4.20, apply kdb-v4.3-2.4.20-common- (use highest value of ) kdb-v4.3-2.4.20-ia64-021210- (use highest value of ) in that order. Use patch -p1 for all patches. I do not have any time to work on 2.5, so there are no patches available for 2.5 kernels. If somebody wants to port the latest kdb patches to 2.5 kernels and send patches to kaos@sgi.com then I will put them up in this directory. Jim Houston has some kdb patches against 2.5.69 in http://www.ccur.com/realtime/oss/. The kdb-smphdr* patches in the v4.0 directory are Sonic Zhang's changes to improve hardware breakpoint handling on i386 and ia64. They are not official kdb patches yet, they are available for review. If you have applied the O(1) scheduler patch to your 2.4 kernel then the kdb changes to kernel/sched.c will not fit. For O(1), the code should look like this switch_tasks: #ifdef CONFIG_KDB { extern struct task_struct *kdb_active_task[]; kdb_active_task[smp_processor_id()] = next; } #endif prefetch(next); clear_tsk_need_resched(prev); From Thomas.Duffy.99@alumni.brown.edu Fri Jun 20 17:22:48 2003 Received: with ECARTIS (v1.0.0; list kdb); Fri, 20 Jun 2003 17:22:56 -0700 (PDT) Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5L0Ml2x012542 for ; Fri, 20 Jun 2003 17:22:47 -0700 Received: from phys-bos-1 ([129.146.14.23]) by nwkea-mail-1.sun.com (8.12.9/8.12.9) with ESMTP id h5L0MfmF021146 for ; Fri, 20 Jun 2003 17:22:41 -0700 (PDT) Received: from biznatch (biznatch.Eng.Sun.COM [129.146.95.110]) by bos-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HGT003IG2DTM2@bos-mail1.sfbay.sun.com> for kdb@oss.sgi.com; Fri, 20 Jun 2003 17:22:41 -0700 (PDT) Date: Fri, 20 Jun 2003 17:22:41 -0700 From: Thomas Duffy Subject: Re: Announce: kdb v4.3 is available for kernels 2.4.20, 2.4.21 In-reply-to: <29513.1056092867@kao1.melbourne.sgi.com> To: Keith Owens Cc: kdb@oss.sgi.com, Linux Kernel Mailing List Message-id: <1056154961.21882.42.camel@biznatch> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.0 (1.4.0-2) Content-type: multipart/signed; boundary="=-TeFWx2lMNPRiNf9rMzPs"; protocol="application/pgp-signature"; micalg=pgp-sha1 References: <29513.1056092867@kao1.melbourne.sgi.com> X-archive-position: 390 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Thomas.Duffy.99@alumni.brown.edu Precedence: bulk X-list: kdb --=-TeFWx2lMNPRiNf9rMzPs Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-06-20 at 00:07, Keith Owens wrote: > Other 2.4.21 arch patches will appear later. Here is a pointer to the sparc64 arch patch: http://www.dslextreme.com/users/tomduffy/kdb-v4.3-2.4.21-sparc64-1.bz2 It includes very minor changes to make it work on 2.4.21. -tduffy --=20 Thomas Duffy --=-TeFWx2lMNPRiNf9rMzPs Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+86VRdY502zjzwbwRAsuKAJ9jAHxJyPNE+wryD13XFPWFFLTwkgCeKxGl eD2RF/6fUWB9Ygo+SSyDQWc= =pJHD -----END PGP SIGNATURE----- --=-TeFWx2lMNPRiNf9rMzPs-- From kaos@sgi.com Fri Jun 20 22:54:57 2003 Received: with ECARTIS (v1.0.0; list kdb); Fri, 20 Jun 2003 22:55:05 -0700 (PDT) Received: from firewall.ocs.com.au (firewall.ocs.com.au [203.34.97.9]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5L5sS2x019755 for ; Fri, 20 Jun 2003 22:54:43 -0700 Received: from firewall.ocs.com.au (kaos@localhost) by firewall.ocs.com.au (8.11.2/8.11.2) with ESMTP id h5L5rdT04311; Sat, 21 Jun 2003 15:53:43 +1000 X-Authentication-Warning: firewall.ocs.com.au: kaos owned process doing -bs X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Thomas Duffy cc: kdb@oss.sgi.com, Linux Kernel Mailing List Subject: Re: Announce: kdb v4.3 is available for kernels 2.4.20, 2.4.21 In-reply-to: Your message of "Fri, 20 Jun 2003 17:22:41 MST." <1056154961.21882.42.camel@biznatch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 21 Jun 2003 15:53:39 +1000 Message-ID: <4310.1056174819@firewall.ocs.com.au> X-archive-position: 391 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 Fri, 20 Jun 2003 17:22:41 -0700, Thomas Duffy wrote: >On Fri, 2003-06-20 at 00:07, Keith Owens wrote: > >> Other 2.4.21 arch patches will appear later. > >Here is a pointer to the sparc64 arch patch: > >http://www.dslextreme.com/users/tomduffy/kdb-v4.3-2.4.21-sparc64-1.bz2 > >It includes very minor changes to make it work on 2.4.21. Thanks Tom. Uploaded to ftp://oss.sgi.com/projects/kdb/download/v4.3 From Thomas.Duffy.99@alumni.brown.edu Sat Jun 21 11:22:02 2003 Received: with ECARTIS (v1.0.0; list kdb); Sat, 21 Jun 2003 11:22:12 -0700 (PDT) Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5LIM22x030199 for ; Sat, 21 Jun 2003 11:22:02 -0700 Received: from phys-bos-1 ([129.146.14.23]) by brmea-mail-2.sun.com (8.12.9/8.12.9) with ESMTP id h5LIM17U015843 for ; Sat, 21 Jun 2003 12:22:01 -0600 (MDT) Received: from biznatch (biznatch.Eng.Sun.COM [129.146.95.110]) by bos-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003)) with ESMTP id <0HGU009XTGCOBQ@bos-mail1.sfbay.sun.com> for kdb@oss.sgi.com; Sat, 21 Jun 2003 11:22:00 -0700 (PDT) Date: Sat, 21 Jun 2003 11:22:00 -0700 From: Thomas Duffy Subject: Re: Announce: kdb v4.3 is available for kernels 2.4.20, 2.4.21 In-reply-to: <4310.1056174819@firewall.ocs.com.au> To: Keith Owens Cc: kdb@oss.sgi.com, Linux Kernel Mailing List Message-id: <1056219720.21882.87.camel@biznatch> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.0 (1.4.0-2) Content-type: multipart/signed; boundary="=-HAPowZ13ISHG3EYIaHu6"; protocol="application/pgp-signature"; micalg=pgp-sha1 References: <4310.1056174819@firewall.ocs.com.au> X-archive-position: 392 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: Thomas.Duffy.99@alumni.brown.edu Precedence: bulk X-list: kdb --=-HAPowZ13ISHG3EYIaHu6 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2003-06-20 at 22:53, Keith Owens wrote: > On Fri, 20 Jun 2003 17:22:41 -0700,=20 > Thomas Duffy wrote: > >On Fri, 2003-06-20 at 00:07, Keith Owens wrote: > > > >> Other 2.4.21 arch patches will appear later. > > > >Here is a pointer to the sparc64 arch patch: > > > >http://www.dslextreme.com/users/tomduffy/kdb-v4.3-2.4.21-sparc64-1.bz2 > > > >It includes very minor changes to make it work on 2.4.21. >=20 > Thanks Tom. Uploaded to ftp://oss.sgi.com/projects/kdb/download/v4.3 2003-06-21 Tom Duffy * got rid of kdb_eframe_t per Keith's request * fixed double printing on kdb command line * kdb v4.3-2.4.21-sparc64-2 can be found on: http://www.dslextreme.com/users/tomduffy/kdb-v4.3-2.4.21-sparc64-2.bz2 -tduffy --=20 Thomas Duffy --=-HAPowZ13ISHG3EYIaHu6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA+9KJIdY502zjzwbwRAhkSAJ9asRlPNZ5eoBDoKoZwO4228G4LugCfaTy4 gMVCDpu5jLDQ/r1tM3dO1Tw= =7YEo -----END PGP SIGNATURE----- --=-HAPowZ13ISHG3EYIaHu6-- From kaos@sgi.com Sat Jun 21 19:41:36 2003 Received: with ECARTIS (v1.0.0; list kdb); Sat, 21 Jun 2003 19:41:41 -0700 (PDT) Received: from firewall.ocs.com.au (firewall.ocs.com.au [203.34.97.9]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5M2fX2x003531 for ; Sat, 21 Jun 2003 19:41:35 -0700 Received: from firewall.ocs.com.au (kaos@localhost) by firewall.ocs.com.au (8.11.2/8.11.2) with ESMTP id h5M2fVq31942; Sun, 22 Jun 2003 12:41:31 +1000 X-Authentication-Warning: firewall.ocs.com.au: kaos owned process doing -bs X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: kdb@oss.sgi.com cc: Linux Kernel Mailing List Subject: Re: Announce: kdb v4.3 is available for kernels 2.4.20, 2.4.21 In-reply-to: Your message of "Sat, 21 Jun 2003 11:22:00 MST." <1056219720.21882.87.camel@biznatch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 22 Jun 2003 12:41:31 +1000 Message-ID: <31941.1056249691@firewall.ocs.com.au> X-archive-position: 393 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 Sat, 21 Jun 2003 11:22:00 -0700, Thomas Duffy wrote: >2003-06-21 Tom Duffy > > * got rid of kdb_eframe_t per Keith's request > * fixed double printing on kdb command line > * kdb v4.3-2.4.21-sparc64-2 > >can be found on: > >http://www.dslextreme.com/users/tomduffy/kdb-v4.3-2.4.21-sparc64-2.bz2 With a couple of minor changes, uploaded to ftp://oss.sgi.com/projects/kdb/download/v4.3/kdb-v4.3-2.4.21-sparc64-3.bz2 + * Leave tab character alone. Keith Owens. + * Tweak KDB_ENTER. Keith Owens. + * kdb v4.3-2.4.21-sparc64-3 From kaos@sgi.com Mon Jun 30 21:32:24 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 30 Jun 2003 21:32:32 -0700 (PDT) Received: from rj.sgi.com (rj.SGI.COM [192.82.208.96]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h614WN2x028647 for ; Mon, 30 Jun 2003 21:32:24 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with SMTP id h614VuWr006154 for ; Mon, 30 Jun 2003 21:31:56 -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 OAA06107; Tue, 1 Jul 2003 14:30:56 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id A4A7ED84FE; Tue, 1 Jul 2003 14:30:56 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id A1DB0912D6; Tue, 1 Jul 2003 14:30:56 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: Sachin Sant Cc: kdb@oss.sgi.com Subject: Re: [Patch] - cpu command does not work with systems configured with clustered APIC mode In-reply-to: Your message of "Tue, 01 Jul 2003 09:41:57 +0530." <3F010A0D.B3C5EEF5@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Jul 2003 14:30:51 +1000 Message-ID: <5281.1057033851@kao2.melbourne.sgi.com> X-archive-position: 394 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 Tue, 01 Jul 2003 09:41:57 +0530, Sachin Sant wrote: > smp_kdb_stop( ) ----> send_IPI_allbutself( ) ----> send_IPI_mask( ) >----> send_IPI_mask_sequence( ). This function sends IPI to other >cpus but not in the form of NMI . Hence we see the error message " >Unexpected IRQ vector da " Looks good. lkcd will have the same problem, it has a similar patch to smp.c. A kernel with both kdb and lkcd has the version below of __send_IPI_shortcut() so lkcd will need a similar patch to send_IPI_mask_sequence(). BTW, I prefer diffs with the -p option and the full path name, e.g. linux/arch/i386/kernel/smp.c. static inline void __send_IPI_shortcut(unsigned int shortcut, int vector) { /* * Subtle. In the case of the 'never do double writes' workaround * we have to lock out interrupts to be safe. As we don't care * of the value read we use an atomic rmw access to avoid costly * cli/sti. Otherwise we use an even cheaper single atomic write * to the APIC. */ unsigned int cfg; /* * Wait for idle. */ apic_wait_icr_idle(); /* * No need to touch the target chip field */ cfg = __prepare_ICR(shortcut, vector); #ifdef CONFIG_KDB if (vector == KDB_VECTOR) { /* * Setup KDB IPI to be delivered as an NMI */ cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI; } #endif /* CONFIG_KDB */ #if defined(CONFIG_DUMP) || defined(CONFIG_DUMP_MODULE) if (vector == DUMP_VECTOR) { /* * Setup DUMP IPI to be delivered as an NMI */ cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI; } #endif /* CONFIG_DUMP */ /* * Send the IPI. The write to APIC_ICR fires this off. */ apic_write_around(APIC_ICR, cfg); } From sachinp@in.ibm.com Mon Jun 30 22:27:33 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 30 Jun 2003 22:27:39 -0700 (PDT) Received: from over.ny.us.ibm.com (over.ny.us.ibm.com [32.97.182.111]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h615RW2x029608 for ; Mon, 30 Jun 2003 22:27:33 -0700 Received: from e4.ny.us.ibm.com (e4.esmtp.ibm.com [9.14.6.104]) by pokfb.esmtp.ibm.com (8.12.9/8.12.2) with ESMTP id h614IlLE567974 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Tue, 1 Jul 2003 00:18:47 -0400 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e4.ny.us.ibm.com (8.12.9/8.12.2) with ESMTP id h6149Ki8155390; Tue, 1 Jul 2003 00:09:20 -0400 Received: from in.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay04.pok.ibm.com (8.12.9/NCO/VER6.5) with ESMTP id h6149Ei7041060; Tue, 1 Jul 2003 00:09:17 -0400 Message-ID: <3F010A0D.B3C5EEF5@in.ibm.com> Date: Tue, 01 Jul 2003 09:41:57 +0530 From: Sachin Sant X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Keith Owens CC: kdb@oss.sgi.com Subject: [Patch] - cpu command does not work with systems configured with clustered APIC mode References: <3055.1054818169@ocs3.intra.ocs.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 395 X-ecartis-version: Ecartis v1.0.0 Sender: kdb-bounce@oss.sgi.com Errors-to: kdb-bounce@oss.sgi.com X-original-sender: sachinp@in.ibm.com Precedence: bulk X-list: kdb Keith , i came across a problem with the CPU command in KDB. I cannot use CPU command to switch between cpu's on a SMP system. This only happens with machines that are configured to use clustered APIC mode [ xSeries 44X models ] . This support was added by the summit patches [ for x440 and x445 models of xSeries type ]. When you use CPU command on these type of machines you get the following error " Invalid CPU ID " and the kernel prints "invalid interrupt vector DA" for N-1 time [ N being number of CPUS ]. It so happens that the IRQ are not masked as NMI's as is the case in normal machines. The problem was with 2.4.19 kernel. In Vanilla 2.4.19 kernel the code patch followed is In arch/i386/kernel/smp.c smp_kdb_stop ( ) ----> send_IPI_allbutself( ) ---> __send_IPI_shortcut( ) . This function sends IPI to other cpus in form of NMI In case of kernels with summit patch smp_kdb_stop( ) ----> send_IPI_allbutself( ) ----> send_IPI_mask( ) ----> send_IPI_mask_sequence( ). This function sends IPI to other cpus but not in the form of NMI . Hence we see the error message " Unexpected IRQ vector da " The following patch fixes this problem. It only applies to arch/i386/kernel/smp.c [ send_IPI_mask_sequence( ) fun ]. Please let me know your comments. Thanks -Sachin -------------------------------------------------------------------------------------------------------------------------------------------- --- smp.c 2003-06-27 16:50:56.000000000 +0530 +++ smp.c.new 2003-06-27 16:50:37.000000000 +0530 @@ -255,6 +255,15 @@ */ cfg = __prepare_ICR(0, vector); +#ifdef CONFIG_KDB + if (vector == KDB_VECTOR) { + /* + * Setup KDB IPI to be delivered as an NMI + */ + cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI; + } +#endif /* CONFIG_KDB */ + /* * Send the IPI. The write to APIC_ICR fires this off. From kaos@sgi.com Mon Jun 30 22:52:18 2003 Received: with ECARTIS (v1.0.0; list kdb); Mon, 30 Jun 2003 22:52:21 -0700 (PDT) Received: from zok.sgi.com (zok.SGI.COM [204.94.215.101]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h615qF2x030049 for ; Mon, 30 Jun 2003 22:52:15 -0700 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by zok.sgi.com (8.12.9/8.12.2/linux-outbound_gateway-1.2) with SMTP id h615q9iY016006 for ; Mon, 30 Jun 2003 22:52:09 -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 PAA06718; Tue, 1 Jul 2003 15:50:52 +1000 Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 902C1D84FE; Tue, 1 Jul 2003 15:50:52 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 8E590912D6; Tue, 1 Jul 2003 15:50:52 +1000 (EST) X-Mailer: exmh version 2.5 01/15/2001 with nmh-1.0.4 From: Keith Owens To: kdb@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Announce: kdb v4.3 is available for kernels 2.4.20, 2.4.21 In-reply-to: Your message of "Fri, 20 Jun 2003 17:07:47 +1000." <29513.1056092867@kao1.melbourne.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Jul 2003 15:50:47 +1000 Message-ID: <6719.1057038647@kao2.melbourne.sgi.com> X-archive-position: 396 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 ftp://oss.sgi.com/projects/kdb/download/v4.3/ Current versions are kdb-v4.3-2.4.21-common-3.bz2 and kdb-v4.3-2.4.21-i386-3.bz2. common 2003-06-24 Keith Owens * Add task and sigset commands. Mark Goodwin, SGI. * kdb v4.3-2.4.21-common-3. 2003-06-23 Keith Owens * Sync with XFS 2.4.21 tree. * kdb v4.3-2.4.21-common-2. i386 2003-07-01 Keith Owens * Convert kdba_find_return() to two passes to reduce false positives. * Correct jmp disp8 offset calculation for out of line lock code. * Use NMI for kdb IPI in clustered APIC mode. Sachin Sant, IBM. * kdb v4.3-2.4.21-i386-3. 2003-06-23 Keith Owens * Sync with XFS 2.4.21 tree. * kdb v4.3-2.4.21-i386-2.