From owner-kdb@oss.sgi.com Wed Jun 5 11:18:30 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g55IIUnC013514 for ; Wed, 5 Jun 2002 11:18:30 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g55IITDc013513 for kdb-outgoing; Wed, 5 Jun 2002 11:18:29 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g55IIOnC013509 for ; Wed, 5 Jun 2002 11:18:25 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.11.6/8.11.6/d: outer.mc,v 1.48 2002/05/24 00:39:04 root Exp $) with ESMTP id g55IKle09480 for ; Wed, 5 Jun 2002 18:20:47 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxv042-1.fm.intel.com [132.233.48.110]) by talaria.fm.intel.com (8.11.6/8.11.6/d: inner.mc,v 1.22 2002/05/24 00:38:22 root Exp $) with SMTP id g55IOA700657 for ; Wed, 5 Jun 2002 18:24:11 GMT Received: from fmsmsx29.FM.INTEL.COM ([132.233.42.29]) by fmsmsxvs042.fm.intel.com (NAVGW 2.5.1.16) with SMTP id M2002060511252704423 for ; Wed, 05 Jun 2002 11:25:27 -0700 Received: by fmsmsx29.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Wed, 5 Jun 2002 11:20:21 -0700 Message-ID: <8A9A5F4E6576D511B98F00508B68C20A0C84D023@orsmsx106.jf.intel.com> From: "Raj, Ashok" To: "'kdb@oss.sgi.com'" Subject: Vmware and kdb on thinkpad T20 Date: Wed, 5 Jun 2002 11:20:16 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk Hello Has anyone run linux on a vmware installed on thinkpad? i have used prior versions of vmware (2.XX) and 2.4.x series and it worked just fine. Its been a while since i tried, but now i notice that when iam in kernel debugger mode, i see the keyboard repeat is crazy! the moment i press one key, it just repeats itself for ever or several times. When iam inside the OS it seems to be ok. anyone know what it might be? ashokr -- Ashok Raj Phone :(503)-712-5966 Advanced Chipset Division Fax :(503)-712-1429 Platform Products Group Mail Stop: JF5-361 5200, NE Elam Young Parkway Hillsboro, OR - 97124 From owner-kdb@oss.sgi.com Wed Jun 5 17:24:02 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g560O2nC024511 for ; Wed, 5 Jun 2002 17:24:02 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g560O2wN024510 for kdb-outgoing; Wed, 5 Jun 2002 17:24:02 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g560NtnC024507 for ; Wed, 5 Jun 2002 17:23:56 -0700 Received: (qmail 13162 invoked from network); 6 Jun 2002 00:25:52 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 6 Jun 2002 00:25:52 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id B788E3000BA; Thu, 6 Jun 2002 10:25: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 B39F994; Thu, 6 Jun 2002 10:25:51 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Robin Holt Cc: Dean Roe , Dean Nelson , kdb@oss.sgi.com Subject: Re: Line numbers in kdb? In-reply-to: Your message of "Wed, 05 Jun 2002 13:23:12 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 06 Jun 2002 10:25:46 +1000 Message-ID: <30997.1023323146@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Wed, 5 Jun 2002 13:23:12 -0500, Robin Holt wrote: >Dean Roe and I were discussing kdb. We both wondered if there was any way >of getting the .c line numbers from within kdb or some other util >(objdump). This would greatly increase our use of kdb. Reply copied to kdb list. To get line numbers you have to compile the kernel with -g and use objdump. You will have to exit kdb or put the kernel image and source on a different machine from the one you are debugging in order to run objdump. Given a failing function, identify the object it lives in. Example: xlog_state_do_callback which is in fs/xfs/xfs_log.o cd linux rm fs/xfs/xfs_log.o make CFLAGS_xfs_log.o=-g vmlinux s=$(sed -ne '/xlog_state_do_callback/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') e=$(echo -e "obase=16\nibase=16\n$s+500" | bc) objdump -S --start-address=0x$s --stop-address=0x$e vmlinux >On a different note, we notice that occasionally the 'bt' gives us either >truncated or repeating results. We were wondering if you had seen this >behavior or should we open a bug with more details. Backtrace on i386 without frame pointers is inherently dubious, kdb has to apply heuristics to work out the call trace. Sometimes those heuristics get it wrong. mds %esp will dump the stack and a human can sometimes identify the call trace by hand. If it is ia64 then the backtrace should be clean, ia64 has a well defined ABI for unwinding the call trace. However if the error occurred in code without unwind data (PAL or SAL do not have unwind data) or with incorrect unwind then you are SOL. IA64 return registers are not held in the data stack, they are held in the register stack which starts at the bottom of the stack pages and grows upwards. Get the value of rds from regs, subtract 0x200 and mds from that value, looking for return addresses. From owner-kdb@oss.sgi.com Thu Jun 6 06:01:26 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g56D1QnC016912 for ; Thu, 6 Jun 2002 06:01:26 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g56D1Qat016911 for kdb-outgoing; Thu, 6 Jun 2002 06:01:26 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from eamail1-out.unisys.com (eamail1-out.unisys.com [192.61.61.99]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g56D1KnC016908 for ; Thu, 6 Jun 2002 06:01:20 -0700 Received: from us-ea-gtwy-6.ea.unisys.com (us-ea-gtwy-6.ea.unisys.com [192.61.146.102]) by eamail1-out.unisys.com (8.9.3/8.9.3) with ESMTP id NAA06119; Thu, 6 Jun 2002 13:01:30 GMT Received: by us-ea-gtwy-6.ea.unisys.com with Internet Mail Service (5.5.2655.55) id ; Thu, 6 Jun 2002 08:03:15 -0500 Message-ID: <3FAD1088D4556046AEC48D80B47B478C1FA505@usslc-exch-4.slc.unisys.com> From: "Van Maren, Kevin" To: "'kdb@oss.sgi.com'" Cc: "'David Mosberger'" Subject: user-mode debugging Date: Thu, 6 Jun 2002 08:03:38 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.55) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-kdb@oss.sgi.com Precedence: bulk I'm using KDB-1.8a with 2.4.9 on IA64. I am trying to track down a kernel problem, but it appears that an application is doing something strange. Once I get into kdb, how do I get a user stack trace for a process so I can tell where it did the system call? Thanks, Kevin From owner-kdb@oss.sgi.com Thu Jun 6 06:16:21 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g56DGKnC017908 for ; Thu, 6 Jun 2002 06:16:20 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g56DGKlZ017907 for kdb-outgoing; Thu, 6 Jun 2002 06:16:20 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g56DGGnC017904 for ; Thu, 6 Jun 2002 06:16:17 -0700 Received: (qmail 18946 invoked from network); 6 Jun 2002 13:18:17 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 6 Jun 2002 13:18:17 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id E1DAF3000BA; Thu, 6 Jun 2002 23:18:14 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id 92D4194; Thu, 6 Jun 2002 23:18:14 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: "Van Maren, Kevin" Cc: "'kdb@oss.sgi.com'" , "'David Mosberger'" Subject: Re: user-mode debugging In-reply-to: Your message of "Thu, 06 Jun 2002 08:03:38 EST." <3FAD1088D4556046AEC48D80B47B478C1FA505@usslc-exch-4.slc.unisys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 06 Jun 2002 23:18:09 +1000 Message-ID: <4850.1023369489@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Thu, 6 Jun 2002 08:03:38 -0500 , "Van Maren, Kevin" wrote: >I'm using KDB-1.8a with 2.4.9 on IA64. I am trying to >track down a kernel problem, but it appears that an >application is doing something strange. Once I get into >kdb, how do I get a user stack trace for a process so I >can tell where it did the system call? kdb only does kernel stack traces. It stops at the point that the stack switches from kernel to user space. From owner-kdb@oss.sgi.com Thu Jun 6 14:05:11 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g56L5BnC026185 for ; Thu, 6 Jun 2002 14:05:11 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g56L5BTE026184 for kdb-outgoing; Thu, 6 Jun 2002 14:05:11 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from zeus-e8.americas.sgi.com ([198.149.7.250]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g56L53nC026169 for ; Thu, 6 Jun 2002 14:05:03 -0700 Received: from daisy-e185.americas.sgi.com (daisy-e185.americas.sgi.com [128.162.185.214]) by zeus-e8.americas.sgi.com (SGI-SGI-8.9.3/americas-smart-nospam1.1) with ESMTP id QAA87124; Thu, 6 Jun 2002 16:06:59 -0500 (CDT) Received: from shaft.americas.sgi.com (shaft.americas.sgi.com [128.162.190.45]) by daisy-e185.americas.sgi.com (SGI-8.9.3/SGI-server-1.7) with ESMTP id QAA64844; Thu, 6 Jun 2002 16:06:58 -0500 (CDT) From: Dean Roe Received: by shaft.americas.sgi.com (SGI-8.9.3/SGI-client-1.7) id QAA26340; Thu, 6 Jun 2002 16:06:57 -0500 (CDT) Message-Id: <200206062106.QAA26340@shaft.americas.sgi.com> Subject: Re: Line numbers in kdb? To: kaos@sgi.com (Keith Owens) Date: Thu, 6 Jun 2002 16:06:57 -0500 (CDT) Cc: holt@sgi.com (Robin Holt), roe@sgi.com (Dean Roe), dcn@sgi.com (Dean Nelson), kdb@oss.sgi.com In-Reply-To: <30997.1023323146@ocs3.intra.ocs.com.au> from "Keith Owens" at Jun 06, 2002 10:25:46 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk > > On Wed, 5 Jun 2002 13:23:12 -0500, > Robin Holt wrote: > >Dean Roe and I were discussing kdb. We both wondered if there was any way > >of getting the .c line numbers from within kdb or some other util > >(objdump). This would greatly increase our use of kdb. > > Reply copied to kdb list. > > To get line numbers you have to compile the kernel with -g and use > objdump. You will have to exit kdb or put the kernel image and source > on a different machine from the one you are debugging in order to run > objdump. Given a failing function, identify the object it lives in. > Example: xlog_state_do_callback which is in fs/xfs/xfs_log.o > > cd linux > rm fs/xfs/xfs_log.o > make CFLAGS_xfs_log.o=-g vmlinux > s=$(sed -ne '/xlog_state_do_callback/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') > e=$(echo -e "obase=16\nibase=16\n$s+500" | bc) > objdump -S --start-address=0x$s --stop-address=0x$e vmlinux Any idea how to get this to work with kernel modules? I haven't been able to get any source intermixed with the instructions of any kernel modules (built with -g of course). > >On a different note, we notice that occasionally the 'bt' gives us either > >truncated or repeating results. We were wondering if you had seen this > >behavior or should we open a bug with more details. > > > If it is ia64 then the backtrace should be clean, ia64 has a well > defined ABI for unwinding the call trace. However if the error > occurred in code without unwind data (PAL or SAL do not have unwind > data) or with incorrect unwind then you are SOL. IA64 return registers > are not held in the data stack, they are held in the register stack > which starts at the bottom of the stack pages and grows upwards. Get > the value of rds from regs, subtract 0x200 and mds from that value, > looking for return addresses. So if we do have unwind data and things look pretty normal, we should start filing bugs then? It seems we are able to get truncated and/or looping stack traces somewhat frequently on both dig and sn2 machines. Thanks, Dean --- Dean Roe Silicon Graphics, Inc. roe@sgi.com (651) 683-5203 From owner-kdb@oss.sgi.com Thu Jun 6 16:21:54 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g56NLsnC028880 for ; Thu, 6 Jun 2002 16:21:54 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g56NLsZ5028879 for kdb-outgoing; Thu, 6 Jun 2002 16:21:54 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g56NLqnC028875 for ; Thu, 6 Jun 2002 16:21:52 -0700 Received: from cs.columbia.edu ([12.234.195.52]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020606232350.JZVW975.sccrmhc02.attbi.com@cs.columbia.edu>; Thu, 6 Jun 2002 23:23:50 +0000 Message-ID: <3CFFEF09.4010704@cs.columbia.edu> Date: Thu, 06 Jun 2002 16:23:53 -0700 From: Ethan Solomita User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Keith Owens CC: "Van Maren, Kevin" , "'kdb@oss.sgi.com'" , "'David Mosberger'" Subject: Re: user-mode debugging References: <4850.1023369489@ocs3.intra.ocs.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk You should be able to get the user's registers from "rd u". Then you can see about doing the backtrace by hand. Is it possible to find a stack frame pointer for the user space, and then pass it in as an argument to "bt"? -- Ethan From owner-kdb@oss.sgi.com Thu Jun 6 19:02:00 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5721xnC031458 for ; Thu, 6 Jun 2002 19:01:59 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5721xRf031457 for kdb-outgoing; Thu, 6 Jun 2002 19:01:59 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from deliverator.sgi.com (deliverator.SGI.COM [204.94.214.10]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5721lnC031452 for ; Thu, 6 Jun 2002 19:01:47 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id TAA01200 for ; Thu, 6 Jun 2002 19:03:50 -0700 (PDT) mail_from (kaos@sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.12.3/8.11.4/nodin-1.0) with ESMTP id g5722mEd9213874; Thu, 6 Jun 2002 19:02:49 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id AD7E93045A8; Fri, 7 Jun 2002 12:02:47 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 9F62594; Fri, 7 Jun 2002 12:02:47 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Ethan Solomita Cc: "Van Maren, Kevin" , "'kdb@oss.sgi.com'" , "'David Mosberger'" Subject: Re: user-mode debugging In-reply-to: Your message of "Thu, 06 Jun 2002 16:23:53 MST." <3CFFEF09.4010704@cs.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Jun 2002 12:02:42 +1000 Message-ID: <10690.1023415362@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Thu, 06 Jun 2002 16:23:53 -0700, Ethan Solomita wrote: > You should be able to get the user's registers from "rd u". Then you can >see about doing the backtrace by hand. Is it possible to find a stack >frame pointer for the user space, and then pass it in as an argument to >"bt"? User space stack frames require a process context to access them. kdb runs out of interrupt context, accessing user space is fragile at best. bt on ia64 needs the unwind data and kdb has no idea where that is for user space, it only knows about kernel unwind data. From owner-kdb@oss.sgi.com Thu Jun 6 19:04:27 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5724RnC031490 for ; Thu, 6 Jun 2002 19:04:27 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5724R34031489 for kdb-outgoing; Thu, 6 Jun 2002 19:04:27 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from deliverator.sgi.com (deliverator.SGI.COM [204.94.214.10]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5724NnC031486 for ; Thu, 6 Jun 2002 19:04:23 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id TAA04182 for ; Thu, 6 Jun 2002 19:06:25 -0700 (PDT) mail_from (kaos@sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.12.3/8.11.4/nodin-1.0) with ESMTP id g5725NEd8550115; Thu, 6 Jun 2002 19:05:23 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 8E39B3045A8; Fri, 7 Jun 2002 12:05:22 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 3BABF94; Fri, 7 Jun 2002 12:05:22 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Dean Roe Cc: holt@sgi.com (Robin Holt), dcn@sgi.com (Dean Nelson), kdb@oss.sgi.com Subject: Re: Line numbers in kdb? In-reply-to: Your message of "Thu, 06 Jun 2002 16:06:57 EST." <200206062106.QAA26340@shaft.americas.sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Jun 2002 12:05:17 +1000 Message-ID: <10715.1023415517@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Thu, 6 Jun 2002 16:06:57 -0500 (CDT), Dean Roe wrote: >Keith Owens wrote >> To get line numbers you have to compile the kernel with -g and use >> objdump. You will have to exit kdb or put the kernel image and source >> on a different machine from the one you are debugging in order to run >> objdump. Given a failing function, identify the object it lives in. >> Example: xlog_state_do_callback which is in fs/xfs/xfs_log.o >> >> cd linux >> rm fs/xfs/xfs_log.o >> make CFLAGS_xfs_log.o=-g vmlinux >> s=$(sed -ne '/xlog_state_do_callback/s/ .*//p' System.map | tr '[a-z]' '[A-Z]') >> e=$(echo -e "obase=16\nibase=16\n$s+500" | bc) >> objdump -S --start-address=0x$s --stop-address=0x$e vmlinux > >Any idea how to get this to work with kernel modules? I haven't >been able to get any source intermixed with the instructions of any >kernel modules (built with -g of course). You need the start address of the section in the module, which is why bt prints it. Add --adjust-vma= to objdump. See Documentation/kdb/kdb_bt.man, "MATCHING TRACE TO KERNEL CODE". From owner-kdb@oss.sgi.com Wed Jun 12 02:33:45 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5C9XjnC032519 for ; Wed, 12 Jun 2002 02:33:45 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5C9Xj0s032518 for kdb-outgoing; Wed, 12 Jun 2002 02:33:45 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from ecbull20.frec.bull.fr (ecbull20.frec.bull.fr [129.183.4.3]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5C9XenC032512 for ; Wed, 12 Jun 2002 02:33:41 -0700 Received: from egalis.frec.bull.fr (egalis.frec.bull.fr [129.183.10.1]) by ecbull20.frec.bull.fr (8.9.2/8.9.1) with ESMTP id LAA29248; Wed, 12 Jun 2002 11:35:46 +0200 Received: (from lelarges@localhost) by egalis.frec.bull.fr (AIX4.3/8.9.3/8.9.3) id LAA101248; Wed, 12 Jun 2002 11:35:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15623.5614.77734.18403@egalis.frec.bull.fr> Date: Wed, 12 Jun 2002 11:35:42 +0200 (DFT) From: LELARGE Sebastien To: kdb@oss.sgi.com Cc: k-suganuma@mvj.biglobe.ne.jp, large-discuss@lists.sourceforge.net Subject: USB Keyboard in KDB - patch for kernel 2.4.18 X-Mailer: VM 6.72 under 21.1 "20 Minutes to Nikko" XEmacs Lucid (patch 2) Sender: owner-kdb@oss.sgi.com Precedence: bulk Hello list, I'm student in France and for now I'm working on IA64 machines by BULL in France. We had a problem using KDB on Tiger machine because of the lack of PS/2 port on this machine. In order to bring a solution, I have written some code to bring USB support in KDB. I'm using a RedHat 7.2. You must apply this patch after the 2 KDB patches. It provides an option called "Support for USB Keyboard in KDB" in section Kernel Hacking. For now, it supports the usb-uhci driver for the USB controller. and supports the two USB keyboard drivers (hid and usbkbd) used by RedHat. Notice that you won't be able to use your USB Keyboard before USB subsystem is started. But it's a solution to debug a system running. -- LELARGE Sebastien Phone 7474 BULL S.A - Team Linux IA64 mailto:sebastien.lelarge@bull.net 38000 Echirolles From owner-kdb@oss.sgi.com Wed Jun 12 02:38:51 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5C9cpnC032581 for ; Wed, 12 Jun 2002 02:38:51 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5C9cohl032580 for kdb-outgoing; Wed, 12 Jun 2002 02:38:50 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from ecbull20.frec.bull.fr (ecbull20.frec.bull.fr [129.183.4.3]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5C9cGnC032572 for ; Wed, 12 Jun 2002 02:38:17 -0700 Received: from egalis.frec.bull.fr (egalis.frec.bull.fr [129.183.10.1]) by ecbull20.frec.bull.fr (8.9.2/8.9.1) with ESMTP id LAA17174; Wed, 12 Jun 2002 11:40:24 +0200 Received: (from lelarges@localhost) by egalis.frec.bull.fr (AIX4.3/8.9.3/8.9.3) id LAA43426; Wed, 12 Jun 2002 11:40:21 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Ws0o4wngQZ" Content-Transfer-Encoding: 7bit Message-ID: <15623.5892.890003.682141@egalis.frec.bull.fr> Date: Wed, 12 Jun 2002 11:40:20 +0200 (DFT) From: LELARGE Sebastien To: kdb@oss.sgi.com Cc: k-suganuma@mvj.biglobe.ne.jp Subject: USB Keyboard in KDB - patch for kernel 2.4.18 [part 2] X-Mailer: VM 6.72 under 21.1 "20 Minutes to Nikko" XEmacs Lucid (patch 2) Sender: owner-kdb@oss.sgi.com Precedence: bulk --Ws0o4wngQZ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Here is the patch : --Ws0o4wngQZ Content-Type: application/octet-stream Content-Disposition: attachment; filename="patch_kdb_v2.1_usb_2.4.18_IA64" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNC4xOHJlZi9kcml2ZXJzL3VzYi91c2ItdWhjaS5jCU1vbiBGZWIgMjUg MjA6Mzg6MDcgMjAwMgorKysgbGludXgtMi40LjE4Y3VzdG9tL2RyaXZlcnMvdXNiL3VzYi11 aGNpLmMJV2VkIE1heSAyMiAxMjo1Nzo0NCAyMDAyCkBAIC00MCw3ICs0MCwxMCBAQAogI2lu Y2x1ZGUgPGFzbS9pby5oPgogI2luY2x1ZGUgPGFzbS9pcnEuaD4KICNpbmNsdWRlIDxhc20v c3lzdGVtLmg+Ci0KKyNpZiBkZWZpbmVkKENPTkZJR19LREJfVVNCKQorI2luY2x1ZGUgPGxp bnV4L2tkYi5oPgorZXh0ZXJuIHN0cnVjdCBrZGJfdXNiX2V4Y2hhbmdlIGtkYl91c2JfaW5m b3M7CisjZW5kaWYKIC8qIFRoaXMgZW5hYmxlcyBtb3JlIGRldGFpbGVkIHNhbml0eSBjaGVj a3MgaW4gc3VibWl0X2lzbyAqLwogLy8jZGVmaW5lIElTT19TQU5JVFlfQ0hFQ0sKIApAQCAt MTMyLDYgKzEzNSwxMTggQEAKIC8qIHVzZWQgYnkgdXNlcnNwYWNlIFVIQ0kgZGF0YSBzdHJ1 Y3R1cmUgZHVtcGVyICovCiB1aGNpX3QgKip1aGNpX2RldmljZXMgPSAmZGV2czsKIAorLyog LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tICovCisvKiBLREIgcGFydCAqLworCisjaWYgZGVmaW5lZChDT05GSUdf S0RCX1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dXNiX2luZm9zLnBvbGxfZnVuYykoa2RiX3VzYl9pbmZvcy51 aGNpLCAodXJiX3QgKilrZGJfdXNiX2luZm9zLnVyYik7CisgIAorICBzcGVjID0ga2RiX3Vz Yl9pbmZvcy5idWZmZXJbMF07CisgIGtleWNvZGUgPSBrZGJfdXNiX2luZm9zLmJ1ZmZlclsy XTsKKyAga2RiX3VzYl9pbmZvcy5idWZmZXJbMF0gPSAoY2hhcikwOworICBrZGJfdXNiX2lu Zm9zLmJ1ZmZlclsyXSA9IChjaGFyKTA7CisKKyAgaWYoa2RiX3VzYl9pbmZvcy5idWZmZXJb M10pCisgICAgcmV0dXJuIC0xOworICAvKiBBIG5vcm1hbCBrZXkgaXMgcHJlc3NlZCwgZGVj b2RlIGl0ICovCisgIGlmKGtleWNvZGUpCisgICAga2V5Y29kZSA9IGtkYl91c2Jfa2V5Y29k ZVtrZXljb2RlXTsKKyAgCisgIC8qIDIgS2V5cyBwcmVzc2VkIGF0IG9uZSB0aW1lID8gKi8K KyAgaWYgKHNwZWMgJiYga2V5Y29kZSkgeworICAgIHN3aXRjaChzcGVjKQorICAgICAgewor ICAgICAgY2FzZSAweDI6CisgICAgICBjYXNlIDB4MjA6IC8qIFNoaWZ0ICovCisJa2RiX3By aW50ZigiJWMiLCBzaGlmdF9tYXBba2V5Y29kZV0pOworCXJldHVybiBzaGlmdF9tYXBba2V5 Y29kZV07CisJCisgICAgICBjYXNlIDB4MToKKyAgICAgIGNhc2UgMHgxMDogLyogQ3RybCAq LworCXJldHVybiBjdHJsX21hcFtrZXljb2RlXTsKKwkKKyAgICAgIGNhc2UgMHg0OgorICAg ICAgY2FzZSAweDQwOiAvKiBBbHQgKi8KKwlicmVhazsKKyAgICAgIH0KKyAgICB9IAorICBl bHNlIHsKKyAgICBpZihrZXljb2RlKSB7IC8qIElmIG9ubHkgb25lIGtleSBwcmVzc2VkICov CisgICAgICBzd2l0Y2goa2V5Y29kZSkgCisJeworCWNhc2UgMHgxQzogLyogRW50ZXIgKi8K KwkgIGtkYl9wcmludGYoIlxuIik7CisJICByZXR1cm4gMTM7CisJICBicmVhazsKKwljYXNl IDB4M0E6IC8qIENhcHNsb2NrICovCisJICB1c2JfbG9jayA/ICh1c2JfbG9jayA9IDApIDog KHVzYl9sb2NrID0gMSk7CisJICBicmVhazsKKwljYXNlIDB4MEU6IC8qIEJhY2tzcGFjZSAq LworCSAgcmV0dXJuIDg7CisJICBicmVhazsgCisJY2FzZSAweDBGOiAvKiBUQUIgKi8KKwlj YXNlIDB4Nzc6IC8qIFBhdXNlICovCisJICBicmVhayA7CisJZGVmYXVsdDoKKwkgIGlmKCF1 c2JfbG9jaykgeworCSAgICBrZGJfcHJpbnRmKCIlYyIsIHBsYWluX21hcFtrZXljb2RlXSk7 CisJICAgIHJldHVybiBwbGFpbl9tYXBba2V5Y29kZV07CisJICB9CisJICBlbHNlIHsKKwkg ICAga2RiX3ByaW50ZigiJWMiLCBzaGlmdF9tYXBba2V5Y29kZV0pOworCSAgICByZXR1cm4g c2hpZnRfbWFwW2tleWNvZGVdOworCSAgfQorCSAgCisJfQorICAgIH0KKyAgfQorICByZXR1 cm4gLTE7Cit9CisjZW5kaWYKIGludCBrZGJfcG9ydDsKIAogLyoKQEAgLTQwOCw2ICs1MDks OSBAQAogI2lmZGVmIEtEQl9CTElOS19MRUQKIAlibGlua19sZWQsCiAjZW5kaWYKKyNpZmRl ZiBDT05GSUdfS0RCX1VTQgorCWdldF91c2JfY2hhciwKKyNlbmRpZgogCU5VTEwKIH07CiAK LS0tIGxpbnV4LTIuNC4xOHJlZi9hcmNoL2lhNjQva2RiL01ha2VmaWxlCVdlZCBNYXkgMjIg MTI6NDU6MzcgMjAwMgorKysgbGludXgtMi40LjE4Y3VzdG9tL2FyY2gvaWE2NC9rZGIvTWFr ZWZpbGUJV2VkIE1heSAyMiAxMjozOTozMiAyMDAyCkBAIC0xLDQgKzEsNSBAQAogT19UQVJH RVQgOj0ga2RiYS5vCitleHBvcnQtb2JqcyA6P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QuMThyZWYva2VybmVsL2tzeW1z LmMJV2VkIE1heSAyMiAxMjo0NTowNSAyMDAyCisrKyBsaW51eC0yLjQuMThjdXN0b20va2Vy bmVsL2tzeW1zLmMJV2VkIE1heSAyMiAxMzoxNjozMSAyMDAyCkBAIC01NzEsMyArNTcxLDgg QEAKIAogRVhQT1JUX1NZTUJPTCh0YXNrbGlzdF9sb2NrKTsKIEVYUE9SVF9TWU1CT0wocGlk aGFzaCk7CisKKyNpZiBkZWZpbmVkKENPTkZJR19LREJfVVNCKQorI2luY2x1ZGUgPGxpbnV4 L2tkYi5oPgorRVhQT1JUX1NZTUJPTChrZGJfdXNiX2luZm9zKTsKKyNlbmRpZgo= --Ws0o4wngQZ Content-Type: text/plain; charset=us-ascii Content-Description: .signature Content-Transfer-Encoding: 7bit -- LELARGE Sebastien Poste 7474 BULL S.A - Equipe Linux IA64 mailto:sebastien.lelarge@bull.net 38000 Echirolles --Ws0o4wngQZ-- From owner-kdb@oss.sgi.com Wed Jun 12 23:06:52 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5D66qnC022838 for ; Wed, 12 Jun 2002 23:06:52 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5D66qGI022837 for kdb-outgoing; Wed, 12 Jun 2002 23:06:52 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from deliverator.sgi.com (deliverator.SGI.COM [204.94.214.10]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5D66knC022829 for ; Wed, 12 Jun 2002 23:06:46 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id XAA05979 for ; Wed, 12 Jun 2002 23:09:14 -0700 (PDT) mail_from (kaos@sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.12.3/8.11.4/nodin-1.0) with ESMTP id g5D68BEd10019771; Wed, 12 Jun 2002 23:08:13 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id 906083000BA; Thu, 13 Jun 2002 16:08:10 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 44CF794; Thu, 13 Jun 2002 16:08:10 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: LELARGE Sebastien Cc: kdb@oss.sgi.com, k-suganuma@mvj.biglobe.ne.jp, large-discuss@lists.sourceforge.net Subject: Re: USB Keyboard in KDB - patch for kernel 2.4.18 In-reply-to: Your message of "Wed, 12 Jun 2002 11:35:42 +0200." <15623.5614.77734.18403@egalis.frec.bull.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Jun 2002 16:08:04 +1000 Message-ID: <2542.1023948484@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Wed, 12 Jun 2002 11:35:42 +0200 (DFT), LELARGE Sebastien wrote: >I'm student in France and for now I'm working on IA64 machines by BULL >in France. We had a problem using KDB on Tiger machine because of the >lack of PS/2 port on this machine. In order to bring a solution, I >have written some code to bring USB support in KDB. I'm using a RedHat >7.2. You must apply this patch after the 2 KDB patches. It provides an >option called "Support for USB Keyboard in KDB" in section Kernel >Hacking. Thanks for the patch, it has been uploaded as ftp://oss.sgi.com/projects/kdb/download/v2.1/kdb-v2.1-2.4.18-ia64-usb-keyboard-1.bz2. A couple of comments: Could you use the same coding standard as the rest of the kernel and usb code? It makes the patch look cleaner. Running your changes through scripts/Lindent is the easiest way to standardize the code. You test jiffies, looking for a timeout. When kdb is in control all interrupts are disabled, including the timer. jiffies should not be changing at all. From owner-kdb@oss.sgi.com Tue Jun 25 17:21:25 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5Q0LPnC015977 for ; Tue, 25 Jun 2002 17:21:25 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5Q0LPWn015976 for kdb-outgoing; Tue, 25 Jun 2002 17:21:25 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.129]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5Q0LHnC015972 for ; Tue, 25 Jun 2002 17:21:17 -0700 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.194.22]) by e31.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id g5Q0Oh0Y037012 for ; Tue, 25 Jun 2002 20:24:43 -0400 Received: from us.ibm.com (dyn9-47-17-243.beaverton.ibm.com [9.47.17.243]) by westrelay01.boulder.ibm.com (8.11.1m3/NCO/VER6.2) with ESMTP id g5Q0OgN58090; Tue, 25 Jun 2002 18:24:42 -0600 Message-ID: <3D1909A0.1020408@us.ibm.com> Date: Tue, 25 Jun 2002 17:24:00 -0700 From: Matthew Dobson Reply-To: colpatch@us.ibm.com Organization: IBM LTC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kdb@oss.sgi.com, Michael Hohnbaum , Patricia Gaughen Subject: A small fix. Content-Type: multipart/mixed; boundary="------------020903040107010307000503" Sender: owner-kdb@oss.sgi.com Precedence: bulk This is a multi-part message in MIME format. --------------020903040107010307000503 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit This patch gets stack backtracing to work, and also allows CPU switching on our NUMA-Q hardware. Pat Gaughen and I had posted here a little while ago about the problems we were experiencing with KDB. This patch fixes them for me, so if anyone else can verify that they work smoothly for you too, that'd be great! Cheers! -Matt --------------020903040107010307000503 Content-Type: text/plain; name="259-kdb.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="259-kdb.patch" diff -Nur linux-2.5.9-van+kdb/arch/i386/kdb/kdba_bt.c linux-2.5.9-kdb/arch/i386/kdb/kdba_bt.c --- linux-2.5.9-van+kdb/arch/i386/kdb/kdba_bt.c Mon Jun 24 11:33:52 2002 +++ linux-2.5.9-kdb/arch/i386/kdb/kdba_bt.c Fri Jun 7 10:58:32 2002 @@ -335,9 +335,9 @@ taskregs.xcs = __KERNEL_CS; /* have to assume kernel space */ - if (taskregs.esp < (unsigned long)p || - taskregs.esp >= (unsigned long)p + 8192) { - kdb_printf("Stack is not in task_struct, backtrace not available\n"); + if (taskregs.esp < (unsigned long)p->thread_info || + taskregs.esp >= (unsigned long)p->thread_info + 8192) { + kdb_printf("Stack is not in task_struct->thread_info, backtrace not available\n"); return(0); } diff -Nur linux-2.5.9-van+kdb/arch/i386/kernel/smp.c linux-2.5.9-kdb/arch/i386/kernel/smp.c --- linux-2.5.9-van+kdb/arch/i386/kernel/smp.c Mon Jun 24 11:33:51 2002 +++ linux-2.5.9-kdb/arch/i386/kernel/smp.c Tue Jun 11 13:59:47 2002 @@ -236,7 +237,15 @@ * program the ICR */ 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. */ --------------020903040107010307000503-- From owner-kdb@oss.sgi.com Tue Jun 25 19:10:39 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5Q2AdnC019570 for ; Tue, 25 Jun 2002 19:10:39 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5Q2AdUo019569 for kdb-outgoing; Tue, 25 Jun 2002 19:10:39 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from deliverator.sgi.com (deliverator.SGI.COM [204.94.214.10] (may be forged)) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5Q2AYnC019566 for ; Tue, 25 Jun 2002 19:10:34 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id TAA02245 for ; Tue, 25 Jun 2002 19:14:00 -0700 (PDT) mail_from (kaos@sgi.com) Received: from kao2.melbourne.sgi.com (kao2.melbourne.sgi.com [134.14.55.180]) by nodin.corp.sgi.com (8.12.3/8.11.4/nodin-1.0) with ESMTP id g5Q2CwEd11429027; Tue, 25 Jun 2002 19:12:59 -0700 (PDT) Received: by kao2.melbourne.sgi.com (Postfix, from userid 16331) id C37663000B8; Wed, 26 Jun 2002 12:12:57 +1000 (EST) Received: from kao2.melbourne.sgi.com (localhost [127.0.0.1]) by kao2.melbourne.sgi.com (Postfix) with ESMTP id 550ED94; Wed, 26 Jun 2002 12:12:57 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: colpatch@us.ibm.com Cc: kdb@oss.sgi.com, Michael Hohnbaum , Patricia Gaughen Subject: Re: A small fix. In-reply-to: Your message of "Tue, 25 Jun 2002 17:24:00 MST." <3D1909A0.1020408@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Jun 2002 12:12:51 +1000 Message-ID: <13281.1025057571@kao2.melbourne.sgi.com> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Tue, 25 Jun 2002 17:24:00 -0700, Matthew Dobson wrote: >This patch gets stack backtracing to work That patch is fine. >and also allows CPU switching on our >NUMA-Q hardware. >diff -Nur linux-2.5.9-van+kdb/arch/i386/kernel/smp.c linux-2.5.9-kdb/arch/i386/kernel/smp.c >--- linux-2.5.9-van+kdb/arch/i386/kernel/smp.c Mon Jun 24 11:33:51 2002 >+++ linux-2.5.9-kdb/arch/i386/kernel/smp.c Tue Jun 11 13:59:47 2002 >@@ -236,7 +237,15 @@ > * program the ICR > */ > 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. > */ There are three calls to __prepare_ICR() in smp.c. kdb already patches __send_IPI_shortcut(), your patch updates send_IPI_mask_sequence. What about send_IPI_mask_bitmask, does that need to be tweaked as well? From owner-kdb@oss.sgi.com Thu Jun 27 11:49:17 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5RInHnC020778 for ; Thu, 27 Jun 2002 11:49:17 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5RInHw4020777 for kdb-outgoing; Thu, 27 Jun 2002 11:49:17 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from e21.nc.us.ibm.com (e21.nc.us.ibm.com [32.97.136.227]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5RIn9nC020773 for ; Thu, 27 Jun 2002 11:49:10 -0700 Received: from westrelay01.boulder.ibm.com (westrelay01.boulder.ibm.com [9.17.194.22]) by e21.nc.us.ibm.com (8.12.2/8.12.2) with ESMTP id g5RIqfRY104996; Thu, 27 Jun 2002 14:52:42 -0400 Received: from us.ibm.com (dyn9-47-17-243.beaverton.ibm.com [9.47.17.243]) by westrelay01.boulder.ibm.com (8.11.1m3/NCO/VER6.2) with ESMTP id g5RIqJi40634; Thu, 27 Jun 2002 12:52:19 -0600 Message-ID: <3D1B5EB8.5070104@us.ibm.com> Date: Thu, 27 Jun 2002 11:51:36 -0700 From: Matthew Dobson Reply-To: colpatch@us.ibm.com Organization: IBM LTC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Keith Owens CC: kdb@oss.sgi.com, Michael Hohnbaum , Patricia Gaughen Subject: Re: A small fix. References: <13281.1025057571@kao2.melbourne.sgi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-kdb@oss.sgi.com Precedence: bulk Keith Owens wrote: > On Tue, 25 Jun 2002 17:24:00 -0700, > Matthew Dobson wrote: > >>This patch gets stack backtracing to work > That patch is fine. Great! >>diff -Nur linux-2.5.9-van+kdb/arch/i386/kernel/smp.c linux-2.5.9-kdb/arch/i386/kernel/smp.c >>--- linux-2.5.9-van+kdb/arch/i386/kernel/smp.c Mon Jun 24 11:33:51 2002 >>+++ linux-2.5.9-kdb/arch/i386/kernel/smp.c Tue Jun 11 13:59:47 2002 >>@@ -236,7 +237,15 @@ >> * program the ICR >> */ >> 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. >> */ > > > There are three calls to __prepare_ICR() in smp.c. kdb already patches > __send_IPI_shortcut(), your patch updates send_IPI_mask_sequence. What > about send_IPI_mask_bitmask, does that need to be tweaked as well? I'm not sure. My guess would be yes, since all the rest needed a tweak. The only thing is, send_IPI_mask_bitmask is only called via send_IPI_mask, when we're not in clustered_apic_mode. This case only occurs in flush_tlb_others and smp_send_reschedule... I'm not 100% sure, but I don't think KDB is sending any vectors though those call paths? If that's the case then it can be left alone. I know for our hardware, we're operating in clustered_apic_mode, so send_IPI_mask_bitmask should never be called. Cheers! -Matt From owner-kdb@oss.sgi.com Fri Jun 28 11:25:24 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5SIPOnC013763 for ; Fri, 28 Jun 2002 11:25:24 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5SIPOUN013762 for kdb-outgoing; Fri, 28 Jun 2002 11:25:24 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from test-area.com (server72.aitcom.net [208.234.0.72]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5SIPLnC013759 for ; Fri, 28 Jun 2002 11:25:22 -0700 Received: from there (adsl-156-62-127.asm.bellsouth.net [66.156.62.127]) by test-area.com (8.8.8/8.8.5) with SMTP id OAA01964 for ; Fri, 28 Jun 2002 14:28:58 -0400 Message-Id: <200206281828.OAA01964@test-area.com> Content-Type: text/plain; charset="iso-8859-15" From: anton wilson To: kdb@oss.sgi.com Subject: exiting from kdb Date: Fri, 28 Jun 2002 14:42:53 -0400 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-kdb@oss.sgi.com Precedence: bulk This seems like a silly question but how exactly do you get out of kdb mode. There seems to be no comand to do that that I can find. Anton -- Camotion Software Development From owner-kdb@oss.sgi.com Fri Jun 28 19:05:14 2002 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.3/8.12.3) with ESMTP id g5T25EnC023840 for ; Fri, 28 Jun 2002 19:05:14 -0700 Received: (from majordomo@localhost) by oss.sgi.com (8.12.3/8.12.3/Submit) id g5T25E6o023837 for kdb-outgoing; Fri, 28 Jun 2002 19:05:14 -0700 X-Authentication-Warning: oss.sgi.com: majordomo set sender to owner-kdb@oss.sgi.com using -f Received: from mail.ocs.com.au (mail.ocs.com.au [203.34.97.2]) by oss.sgi.com (8.12.3/8.12.3) with SMTP id g5T257nC023822 for ; Fri, 28 Jun 2002 19:05:08 -0700 Received: (qmail 6765 invoked from network); 29 Jun 2002 02:08:44 -0000 Received: from ocs3.intra.ocs.com.au (192.168.255.3) by mail.ocs.com.au with SMTP; 29 Jun 2002 02:08:44 -0000 Received: by ocs3.intra.ocs.com.au (Postfix, from userid 16331) id DC7C93000BA; Sat, 29 Jun 2002 12:08:38 +1000 (EST) Received: from ocs3.intra.ocs.com.au (localhost [127.0.0.1]) by ocs3.intra.ocs.com.au (Postfix) with ESMTP id D937D9A; Sat, 29 Jun 2002 12:08:38 +1000 (EST) X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: anton wilson Cc: kdb@oss.sgi.com Subject: Re: exiting from kdb In-reply-to: Your message of "Fri, 28 Jun 2002 14:42:53 -0400." <200206281828.OAA01964@test-area.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 29 Jun 2002 12:08:33 +1000 Message-ID: <5419.1025316513@ocs3.intra.ocs.com.au> Sender: owner-kdb@oss.sgi.com Precedence: bulk On Fri, 28 Jun 2002 14:42:53 -0400, anton wilson wrote: >This seems like a silly question but how exactly do you get out of kdb mode. >There seems to be no comand to do that that I can find. 'go'. No guarantees that it will work, the machine may be so badly damaged that it hangs or drops straight back into kdb.