<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/xmon, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-15T02:00:02Z</updated>
<entry>
<title>powerpc/xmon: Fallback to printk() in xmon_printf() if udbg is not setup</title>
<updated>2012-11-15T02:00:02Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2bb65f680a7b2faa5d6332c02752dca83a49cd6'/>
<id>urn:sha1:b2bb65f680a7b2faa5d6332c02752dca83a49cd6</id>
<content type='text'>
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 &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Fiddle xmon_depth_to_print logic in xmon_show_stack()</title>
<updated>2012-11-15T01:59:59Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0104cd6839bd575f0aa1af4125eb865dc0391aae'/>
<id>urn:sha1:0104cd6839bd575f0aa1af4125eb865dc0391aae</id>
<content type='text'>
Currently xmon_depth_to_print is static and global, but it's only
ever used in xmon_show_stack().

At least with a modern compiler it's inlined, so there's no point
in it being static, we could #define it but it's only used in one
place.

By reworking the logic we can drop count and just decrement the
max value as a loop counter. Also switch to a while loop so we
actually print no more than 64 frames as you'd expect based on the
variable name.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Use STACK_FRAME_OVERHEAD in xmon_show_stack()</title>
<updated>2012-11-15T01:59:55Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4de38093ed9fe94fa35c3adb14afc40bf05e1da'/>
<id>urn:sha1:c4de38093ed9fe94fa35c3adb14afc40bf05e1da</id>
<content type='text'>
We use STACK_FRAME_OVERHEAD in the exception vectors to establish
the exception frame, so it should be good enough to use here.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Remove unused #defines</title>
<updated>2012-11-15T01:59:52Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5c5714d5093e677ec962921210eae14156f7179'/>
<id>urn:sha1:c5c5714d5093e677ec962921210eae14156f7179</id>
<content type='text'>
Neither REGS_PER_LINE or LAST_VOLATILE are used, nor have they ever
been as far back as I can see.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Remove renaming #defines of scanhex() and skipbl()</title>
<updated>2012-11-15T01:59:49Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b3dc19cddce37a1aaebc911c8db94e5209a9764d'/>
<id>urn:sha1:b3dc19cddce37a1aaebc911c8db94e5209a9764d</id>
<content type='text'>
We have two #defines that rename scanhex() and skipbl() to
xmon_scanhex() and xmon_skipbl() - but no one ever uses those
names.

So the only effect is to rename the actual symbols in the generated
code, and AFACIS there is no reason to do that, so drop them.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Merge start.c into nonstdio.c</title>
<updated>2012-11-15T01:59:46Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33b5cd686649f56d40fa258a0881f6acdbd70134'/>
<id>urn:sha1:33b5cd686649f56d40fa258a0881f6acdbd70134</id>
<content type='text'>
The routines in start.c are only ever called from nonstdio.c, so if we
move them in there they can become static which is nice.

I suspect the idea behind the separation was that start.c could be
replaced in order to build xmon in userland. If anyone still cares about
doing that we could handle that with an ifdef or two.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Make xmon_getchar() static</title>
<updated>2012-11-15T01:59:43Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88c6d62641514686e0b1b0e33d9faf1e39ec7e58'/>
<id>urn:sha1:88c6d62641514686e0b1b0e33d9faf1e39ec7e58</id>
<content type='text'>
xmon_getchar() is only called from within nonstdio.c, so make it static.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Remove empty xmon_map_scc()</title>
<updated>2012-11-15T01:59:40Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08702c73a6182d0f6a429271383a553abc92c0b8'/>
<id>urn:sha1:08702c73a6182d0f6a429271383a553abc92c0b8</id>
<content type='text'>
This has been empty since 2005, commit 51d3082 "Unify udbg (#2)".

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/xmon: Remove unused xmon_expect() &amp; xmon_read_poll()</title>
<updated>2012-11-15T01:59:37Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-10-09T04:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb1c2abb611b51a935cdb36bbc0e364958ccb83c'/>
<id>urn:sha1:eb1c2abb611b51a935cdb36bbc0e364958ccb83c</id>
<content type='text'>
It looks like xmon_expect() was used for doing xmon over a modem (!?),
that code was dropped in 2005 in commit 51d3082 "Unify udbg (#2)".

Once xmon_expect() is gone xmon_read_poll() is unused, drop it too.

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Add an xmon command to dump one or all pacas</title>
<updated>2012-09-18T05:02:36Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2012-09-13T23:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddadb6b8e88979a00ac44fba9c92896eec113bd1'/>
<id>urn:sha1:ddadb6b8e88979a00ac44fba9c92896eec113bd1</id>
<content type='text'>
This was originally motivated by a desire to see the mapping between
logical and hardware cpu numbers.

But it seemed that it made more sense to just add a command to dump
(most of) the paca.

With no arguments "dp" will dump the paca for the current cpu.

It also takes an argument, eg. "dp 3" which is the logical cpu number
in hex. This form does not check if the cpu is possible, but displays
the paca regardless, as well as the cpu's state in the possible, present
and online masks.

Thirdly, "dpa" will display the paca for all possible cpus. If there are
no possible cpus, like early in boot, it will tell you that.

Sample output, number in brackets is the offset into the struct:

2:mon&gt; dp 3
paca for cpu 0x3 @ c00000000ff20a80:
 possible         = yes
 present          = yes
 online           = yes
 lock_token       = 0x8000            	(0x8)
 paca_index       = 0x3               	(0xa)
 kernel_toc       = 0xc00000000144f990	(0x10)
 kernelbase       = 0xc000000000000000	(0x18)
 kernel_msr       = 0xb000000000001032	(0x20)
 stab_real        = 0x0               	(0x28)
 stab_addr        = 0x0               	(0x30)
 emergency_sp     = 0xc00000003ffe4000	(0x38)
 data_offset      = 0xa40000          	(0x40)
 hw_cpu_id        = 0x9               	(0x50)
 cpu_start        = 0x1               	(0x52)
 kexec_state      = 0x0               	(0x53)
 __current        = 0xc00000007e568680	(0x218)
 kstack           = 0xc00000007e5a3e30	(0x220)
 stab_rr          = 0x1a              	(0x228)
 saved_r1         = 0xc00000007e7cb450	(0x230)
 trap_save        = 0x0               	(0x240)
 soft_enabled     = 0x0               	(0x242)
 irq_happened     = 0x0               	(0x243)
 io_sync          = 0x0               	(0x244)
 irq_work_pending = 0x0               	(0x245)
 nap_state_lost   = 0x0               	(0x246)

Signed-off-by: Michael Ellerman &lt;michael@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
