/* * Start kdump: create a LGR log entry, store status of all CPUs and * branch to __do_machine_kdump. */ static noinline void __machine_kdump(void *image) { int this_cpu, cpu; lgr_info_log(); /* Get status of the other CPUs */ this_cpu = smp_find_processor_id(stap()); for_each_online_cpu(cpu) { if (cpu == this_cpu) continue; if (smp_store_status(cpu)) continue; } /* Store status of the boot CPU */ if (MACHINE_HAS_VX) save_vx_regs((void *) &S390_lowcore.vector_save_area); /* * To create a good backchain for this CPU in the dump store_status * is passed the address of a function. The address is saved into * the PSW save area of the boot CPU and the function is invoked as * a tail call of store_status. The backchain in the dump will look * like this: * restart_int_handler -> __machine_kexec -> __do_machine_kdump * The call to store_status() will not return. */ store_status(__do_machine_kdump, image); }
/* Store registers needed to create the signal frame */ static void store_sigregs(void) { int i; save_access_regs(current->thread.acrs); save_fp_ctl(¤t->thread.fp_regs.fpc); if (current->thread.vxrs) { save_vx_regs(current->thread.vxrs); for (i = 0; i < __NUM_FPRS; i++) current->thread.fp_regs.fprs[i] = *(freg_t *)(current->thread.vxrs + i); } else save_fp_regs(current->thread.fp_regs.fprs); }