]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xmon: Fallback to printk() in xmon_printf() if udbg is not setup
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 9 Oct 2012 04:20:47 +0000 (04:20 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 15 Nov 2012 02:00:02 +0000 (13:00 +1100)
commit6e1c6e5f320a978c31edf9237f906f2f4d368271
tree7aa08b554b4e9c265d54a955c3ea610339bcd276
parentac9d526ae8d30ec58f567066939c4011c2cc1526
powerpc/xmon: Fallback to printk() in xmon_printf() if udbg is not setup

It is possible to configure a kernel which has xmon enabled, but has no
udbg backend to provide IO. This can make xmon rather confusing, as it
produces no output, blocks for two seconds, and then returns.

As a last resort we can instead try to printk(), which may deadlock or
otherwise crash, but tries quite hard not to.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/xmon/nonstdio.c