mirror of
https://github.com/crash-utility/crash
synced 2025-02-23 08:56:48 +00:00
Fix for the "irq -s" option for Linux 4.2 and later kernels. Without
the patch, the irq_chip.name string (e.g. "IO-APIC", "PCI-MSI", etc.) is missing from the display. (rabin.vincent@axis.com)
This commit is contained in:
parent
0c47739aee
commit
c1eb2b99e2
1
defs.h
1
defs.h
@ -1950,6 +1950,7 @@ struct offset_table { /* stash of commonly-used offsets */
|
||||
long pt_regs_cp0_badvaddr;
|
||||
long address_space_page_tree;
|
||||
long page_compound_head;
|
||||
long irq_desc_irq_data;
|
||||
};
|
||||
|
||||
struct size_table { /* stash of commonly-used sizes */
|
||||
|
12
kernel.c
12
kernel.c
@ -523,6 +523,7 @@ kernel_init()
|
||||
if (VALID_STRUCT(irq_data)) {
|
||||
MEMBER_OFFSET_INIT(irq_data_chip, "irq_data", "chip");
|
||||
MEMBER_OFFSET_INIT(irq_data_affinity, "irq_data", "affinity");
|
||||
MEMBER_OFFSET_INIT(irq_desc_irq_data, "irq_desc", "irq_data");
|
||||
}
|
||||
|
||||
STRUCT_SIZE_INIT(irq_cpustat_t, "irq_cpustat_t");
|
||||
@ -6841,10 +6842,13 @@ generic_show_interrupts(int irq, ulong *cpus)
|
||||
readmem(irq_desc_addr + OFFSET(irq_desc_t_chip), KVADDR,
|
||||
&handler, sizeof(long), "irq_desc chip",
|
||||
FAULT_ON_ERROR);
|
||||
else if (VALID_MEMBER(irq_data_chip))
|
||||
readmem(irq_desc_addr + OFFSET(irq_data_chip), KVADDR,
|
||||
&handler, sizeof(long), "irq_data chip",
|
||||
FAULT_ON_ERROR);
|
||||
else if (VALID_MEMBER(irq_data_chip)) {
|
||||
tmp = irq_desc_addr + OFFSET(irq_data_chip);
|
||||
if (VALID_MEMBER(irq_desc_irq_data))
|
||||
tmp += OFFSET(irq_desc_irq_data);
|
||||
readmem(tmp, KVADDR, &handler, sizeof(long), "irq_data chip",
|
||||
FAULT_ON_ERROR);
|
||||
}
|
||||
|
||||
fprintf(fp, "%3d: ", irq);
|
||||
|
||||
|
@ -8831,6 +8831,8 @@ dump_offset_table(char *spec, ulong makestruct)
|
||||
OFFSET(irq_data_chip));
|
||||
fprintf(fp, " irq_data_affinity: %ld\n",
|
||||
OFFSET(irq_data_affinity));
|
||||
fprintf(fp, " irq_desc_irq_data: %ld\n",
|
||||
OFFSET(irq_desc_irq_data));
|
||||
fprintf(fp, " kernel_stat_irqs: %ld\n",
|
||||
OFFSET(kernel_stat_irqs));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user