[Crash-utility] ppc: work out irq and fix pte translation display
Toshikazu Nakayama
nakayama.ts at ncos.nec.co.jp
Wed Jun 27 07:25:31 UTC 2012
This patch set updates ppc "irq" and PTE translation display of book3e.
- Support "irq" command for recent kernel
The ppc's "irq" could not work well for recent kernel at all
because ppc_init() always made SIZE(irq_desc_t) invalid by itself.
And also, "irq" options were not supported entirely.
Stash legacy ppc_dump_irq() behind generic_dump_irq() so that
"irq" works on recent kernel and follow toward mainline updates lightly
by using generic irq functions.
- Fix PTE translation for book3e
Although book3e uses multiple PTE bits for one attribute,
ppc_translate_pte() can not handle such attributes well.
And further privilege (kernel) RW protection bit assign of book3e
are different from user's ones.
Fix and add these translation features in ppc_translate_pte().
- results of update
Before: irq can not work at all.
crash> help -m | grep dump_irq
dump_irq: ppc_dump_irq()
crash> irq
irq: cannot determine number of IRQs
After: "irq" command work well
crash> irq 36
IRQ: 36
STATUS: 24004 (IRQ_LEVEL)
HANDLER: ebc08004
typename: c07c7044 " OpenPIC "
startup: c00ca754 <default_startup>
shutdown: c00ca6f0 <default_shutdown>
enable: c00ca7b8 <default_enable>
disable: c00ca5a8 <default_disable>
:
ACTION: eac56e80
handler: c043e398 <serial8250_interrupt>
flags: 8080
name: c07c4534 "serial"
dev_id: ebe3bec0
next: 0
DEPTH: 0
crash> irq -s
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
16: 0 0 0 0 0 0 0 0 OpenPIC bman-err,qman-err,error_rx,fman-err,fman-err,pme-err
17: 0 0 0 0 0 0 0 0 OpenPIC ds3232
:
crash> irq -c 0 -s
CPU0
16: 0 OpenPIC bman-err,qman-err,error_rx,fman-err,fman-err,pme-err
17: 0 OpenPIC ds3232
:
crash> irq -a
IRQ NAME AFFINITY
16 bman-err,qman-err,error_rx,fman-err,fman-err,pme-err 0-7
17 ds3232 0-7
:
Before/After: PTE translation is updated like
crash> vtop f987c01c [kernel vaddr]
PTE PHYSICAL FLAGS
ff974241255 ff974000 (PRESENT|USER|RW|COHERENT|DIRTY|ACCESSED)
* multiple bits attribute USER or RW(non privilege) is not set in 255h
=> Fix as below
PTE PHYSICAL FLAGS
ff974241255 ff974000 (PRESENT|K-RW|COHERENT|DIRTY|ACCESSED)
Thanks,
Toshi
Toshikazu Nakayama (6):
ppc: update dump_irq()
ppc: rework nr_irqs initialization
ppc: add show_interrupts
ppc: add get_irq_affinity
ppc: fix the handling of PTE flags in translate_pte
ppc: handle privilege level rw access from pte
defs.h | 7 ++++-
ppc.c | 65 ++++++++++++++++++++++++++++++++++++++++++++-------------------
2 files changed, 50 insertions(+), 22 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ppc-update-dump_irq.patch
Type: text/x-patch
Size: 1769 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ppc-rework-nr_irqs-initialization.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ppc-add-show_interrupts.patch
Type: text/x-patch
Size: 1420 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ppc-add-get_irq_affinity.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-ppc-fix-the-handling-of-PTE-flags-in-translate_pte.patch
Type: text/x-patch
Size: 2394 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-ppc-handle-privilege-level-rw-access-from-pte.patch
Type: text/x-patch
Size: 3061 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120627/2ce43941/attachment-0005.bin>
More information about the Crash-utility
mailing list