diff --git a/loongarch64.c b/loongarch64.c index 5c19933..6437c4a 100644 --- a/loongarch64.c +++ b/loongarch64.c @@ -1158,6 +1158,9 @@ loongarch64_dump_machdep_table(ulong arg) fprintf(fp, " is_task_addr: loongarch64_is_task_addr()\n"); fprintf(fp, " verify_symbol: loongarch64_verify_symbol()\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: loongarch64_cmd_mach()\n"); fprintf(fp, " get_smp_cpus: loongarch64_get_smp_cpus()\n"); fprintf(fp, " is_kvaddr: generic_is_kvaddr()\n"); @@ -1240,6 +1243,9 @@ loongarch64_init(int when) machdep->is_task_addr = loongarch64_is_task_addr; machdep->get_smp_cpus = loongarch64_get_smp_cpus; 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->init_kernel_pgd = NULL; break; @@ -1247,7 +1253,16 @@ loongarch64_init(int when) case POST_GDB: machdep->section_size_bits = _SECTION_SIZE_BITS; machdep->max_physmem_bits = _MAX_PHYSMEM_BITS; + + 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); + loongarch64_stackframe_init(); + if (!machdep->hz) machdep->hz = 250; break;