[PATCH] fix KDB backtrace for ppc64

Keith Owens kaos at sgi.com
Thu May 6 08:50:46 EST 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 */

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list