[PATCH] fix KDB backtrace for ppc64

Keith Owens kaos at sgi.com
Wed May 5 15:50:46 PDT 2004


On Wed, 5 May 2004 12:54:59 -0700, 
Haren Myneni <hbabu at us.ibm.com> wrote:
>regs will be NULL if we use sysrq-trigger to invoke SysRq key. Noticed on 
>LKCD, but not sure whether it could apply on KDB.
>Example: echo 'd' > /proc/sysrq-trigger.

IA64 SN2 console had the same problem, not running in the interrupt
handler so no registers.  drivers/char/sn_serial.c uses KDB_ENTER() to
get registers.


#ifdef CONFIG_KDB
		if (kdb_on) {
			if (ch == *kdb_serial_ptr) {
				if (!(*++kdb_serial_ptr)) {
					spin_unlock_irqrestore(&sn_sal_lock, *flags);
					if (!regs)
						KDB_ENTER();	/* to get some registers */
					else
						kdb(KDB_REASON_KEYBOARD, 0, regs);
					kdb_serial_ptr = (char *)kdb_serial_str;
					spin_lock_irqsave(&sn_sal_lock, *flags);
					break;
				}
			}
			else
				kdb_serial_ptr = (char *)kdb_serial_str;
		}
#endif /* CONFIG_KDB */

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.


More information about the kdb mailing list