--- zzzz-none-000/linux-4.9.276/drivers/tty/sysrq.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/drivers/tty/sysrq.c 2023-04-05 08:19:02.000000000 +0000 @@ -47,7 +47,7 @@ #include #include #include - +#include #include #include @@ -262,6 +262,19 @@ .enable_mask = SYSRQ_ENABLE_DUMP, }; #endif +#if defined(CONFIG_AVM_IPI_YIELD) +static DEFINE_SPINLOCK(reg_lock); +static void per_cpu_sysrq_handle_showregs(void *dummy __maybe_unused) +{ + struct pt_regs *regs = get_irq_regs(); + if (regs) { + spin_lock(®_lock); + show_regs(regs); + perf_event_print_debug(); + spin_unlock(®_lock); + } +} +#endif /*--- #if defined(CONFIG_AVM_IPI_YIELD) ---*/ static void sysrq_handle_showregs(int key) { @@ -272,6 +285,17 @@ if (regs) show_regs(regs); perf_event_print_debug(); +#if defined(CONFIG_AVM_IPI_YIELD) + { + int cpu; + for_each_online_cpu (cpu) { + if (cpu != smp_processor_id()) { + yield_call(cpu, per_cpu_sysrq_handle_showregs, + NULL); + } + } + } +#endif /*--- #if defined(CONFIG_AVM_IPI_YIELD) ---*/ } static struct sysrq_key_op sysrq_showregs_op = { .handler = sysrq_handle_showregs,