mirror of
https://github.com/crash-utility/crash
synced 2025-03-02 12:30:31 +00:00
MIPS32/64: Add 'irq' command support
Add support for the 'irq' series of commands in the MIPS32/64 architecture, except for the 'irq -d' command, others can be used. Without the patch, the 'irq' command fails as follows: irq: cannot determine number of IRQs Signed-off-by: Youling Tang <tangyouling@loongson.cn>
This commit is contained in:
parent
704623dfde
commit
859d1c0e8a
10
mips.c
10
mips.c
@ -1126,8 +1126,14 @@ mips_init(int when)
|
|||||||
machdep->get_irq_affinity = generic_get_irq_affinity;
|
machdep->get_irq_affinity = generic_get_irq_affinity;
|
||||||
machdep->section_size_bits = _SECTION_SIZE_BITS;
|
machdep->section_size_bits = _SECTION_SIZE_BITS;
|
||||||
machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
|
machdep->max_physmem_bits = _MAX_PHYSMEM_BITS;
|
||||||
ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc,
|
|
||||||
"irq_desc", NULL, 0);
|
if (symbol_exists("irq_desc"))
|
||||||
|
ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc,
|
||||||
|
"irq_desc", NULL, 0);
|
||||||
|
else if (kernel_symbol_exists("nr_irqs"))
|
||||||
|
get_symbol_data("nr_irqs", sizeof(unsigned int),
|
||||||
|
&machdep->nr_irqs);
|
||||||
|
|
||||||
mips_stackframe_init();
|
mips_stackframe_init();
|
||||||
|
|
||||||
if (!machdep->hz)
|
if (!machdep->hz)
|
||||||
|
14
mips64.c
14
mips64.c
@ -1160,6 +1160,9 @@ mips64_dump_machdep_table(ulong arg)
|
|||||||
fprintf(fp, " is_task_addr: mips64_is_task_addr()\n");
|
fprintf(fp, " is_task_addr: mips64_is_task_addr()\n");
|
||||||
fprintf(fp, " verify_symbol: mips64_verify_symbol()\n");
|
fprintf(fp, " verify_symbol: mips64_verify_symbol()\n");
|
||||||
fprintf(fp, " dis_filter: generic_dis_filter()\n");
|
fprintf(fp, " dis_filter: generic_dis_filter()\n");
|
||||||
|
fprintf(fp, " dump_irq: generic_dump_irq()\n");
|
||||||
|
fprintf(fp, " show_interrupts: generic_show_interrupts()\n");
|
||||||
|
fprintf(fp, " get_irq_affinity: generic_get_irq_affinity()\n");
|
||||||
fprintf(fp, " cmd_mach: mips64_cmd_mach()\n");
|
fprintf(fp, " cmd_mach: mips64_cmd_mach()\n");
|
||||||
fprintf(fp, " get_smp_cpus: mips64_get_smp_cpus()\n");
|
fprintf(fp, " get_smp_cpus: mips64_get_smp_cpus()\n");
|
||||||
fprintf(fp, " is_kvaddr: generic_is_kvaddr()\n");
|
fprintf(fp, " is_kvaddr: generic_is_kvaddr()\n");
|
||||||
@ -1246,6 +1249,9 @@ mips64_init(int when)
|
|||||||
machdep->is_task_addr = mips64_is_task_addr;
|
machdep->is_task_addr = mips64_is_task_addr;
|
||||||
machdep->get_smp_cpus = mips64_get_smp_cpus;
|
machdep->get_smp_cpus = mips64_get_smp_cpus;
|
||||||
machdep->dis_filter = generic_dis_filter;
|
machdep->dis_filter = generic_dis_filter;
|
||||||
|
machdep->dump_irq = generic_dump_irq;
|
||||||
|
machdep->show_interrupts = generic_show_interrupts;
|
||||||
|
machdep->get_irq_affinity = generic_get_irq_affinity;
|
||||||
machdep->value_to_symbol = generic_machdep_value_to_symbol;
|
machdep->value_to_symbol = generic_machdep_value_to_symbol;
|
||||||
machdep->init_kernel_pgd = NULL;
|
machdep->init_kernel_pgd = NULL;
|
||||||
break;
|
break;
|
||||||
@ -1257,6 +1263,14 @@ mips64_init(int when)
|
|||||||
mips64_stackframe_init();
|
mips64_stackframe_init();
|
||||||
if (!machdep->hz)
|
if (!machdep->hz)
|
||||||
machdep->hz = 250;
|
machdep->hz = 250;
|
||||||
|
|
||||||
|
if (symbol_exists("irq_desc"))
|
||||||
|
ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc,
|
||||||
|
"irq_desc", NULL, 0);
|
||||||
|
else if (kernel_symbol_exists("nr_irqs"))
|
||||||
|
get_symbol_data("nr_irqs", sizeof(unsigned int),
|
||||||
|
&machdep->nr_irqs);
|
||||||
|
|
||||||
MEMBER_OFFSET_INIT(elf_prstatus_pr_reg, "elf_prstatus",
|
MEMBER_OFFSET_INIT(elf_prstatus_pr_reg, "elf_prstatus",
|
||||||
"pr_reg");
|
"pr_reg");
|
||||||
STRUCT_SIZE_INIT(note_buf, "note_buf_t");
|
STRUCT_SIZE_INIT(note_buf, "note_buf_t");
|
||||||
|
Loading…
Reference in New Issue
Block a user