Lines Matching refs:cpu
246 int cpu; in kgdb_roundup_cpus() local
249 for_each_online_cpu(cpu) { in kgdb_roundup_cpus()
251 if (cpu == this_cpu) in kgdb_roundup_cpus()
254 csd = &per_cpu(kgdb_roundup_csd, cpu); in kgdb_roundup_cpus()
264 if (kgdb_info[cpu].rounding_up) in kgdb_roundup_cpus()
266 kgdb_info[cpu].rounding_up = true; in kgdb_roundup_cpus()
268 ret = smp_call_function_single_async(cpu, csd); in kgdb_roundup_cpus()
270 kgdb_info[cpu].rounding_up = false; in kgdb_roundup_cpus()
468 void kdb_dump_stack_on_cpu(int cpu) in kdb_dump_stack_on_cpu() argument
470 if (cpu == raw_smp_processor_id() || !IS_ENABLED(CONFIG_SMP)) { in kdb_dump_stack_on_cpu()
475 if (!(kgdb_info[cpu].exception_state & DCPU_IS_SLAVE)) { in kdb_dump_stack_on_cpu()
477 cpu); in kdb_dump_stack_on_cpu()
492 kgdb_info[cpu].exception_state |= DCPU_WANT_BT; in kdb_dump_stack_on_cpu()
493 while (kgdb_info[cpu].exception_state & DCPU_WANT_BT) in kdb_dump_stack_on_cpu()
589 int cpu; in kgdb_cpu_enter() local
594 kgdb_info[ks->cpu].enter_kgdb++; in kgdb_cpu_enter()
595 kgdb_info[ks->cpu].exception_state |= exception_state; in kgdb_cpu_enter()
613 cpu = ks->cpu; in kgdb_cpu_enter()
614 kgdb_info[cpu].debuggerinfo = regs; in kgdb_cpu_enter()
615 kgdb_info[cpu].task = current; in kgdb_cpu_enter()
616 kgdb_info[cpu].ret_state = 0; in kgdb_cpu_enter()
617 kgdb_info[cpu].irq_depth = hardirq_count() >> HARDIRQ_SHIFT; in kgdb_cpu_enter()
624 atomic_xchg(&kgdb_active, cpu); in kgdb_cpu_enter()
634 if (kgdb_info[cpu].exception_state & DCPU_NEXT_MASTER) { in kgdb_cpu_enter()
635 kgdb_info[cpu].exception_state &= ~DCPU_NEXT_MASTER; in kgdb_cpu_enter()
637 } else if (kgdb_info[cpu].exception_state & DCPU_WANT_MASTER) { in kgdb_cpu_enter()
639 atomic_xchg(&kgdb_active, cpu); in kgdb_cpu_enter()
642 } else if (kgdb_info[cpu].exception_state & DCPU_WANT_BT) { in kgdb_cpu_enter()
644 kgdb_info[cpu].exception_state &= ~DCPU_WANT_BT; in kgdb_cpu_enter()
645 } else if (kgdb_info[cpu].exception_state & DCPU_IS_SLAVE) { in kgdb_cpu_enter()
657 kgdb_info[cpu].debuggerinfo = NULL; in kgdb_cpu_enter()
658 kgdb_info[cpu].task = NULL; in kgdb_cpu_enter()
659 kgdb_info[cpu].exception_state &= in kgdb_cpu_enter()
661 kgdb_info[cpu].enter_kgdb--; in kgdb_cpu_enter()
679 (kgdb_info[cpu].task && in kgdb_cpu_enter()
680 kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) { in kgdb_cpu_enter()
691 kgdb_info[cpu].ret_state = 1; in kgdb_cpu_enter()
789 kgdb_info[cpu].ret_state = error; in kgdb_cpu_enter()
822 kgdb_info[cpu].debuggerinfo = NULL; in kgdb_cpu_enter()
823 kgdb_info[cpu].task = NULL; in kgdb_cpu_enter()
824 kgdb_info[cpu].exception_state &= in kgdb_cpu_enter()
826 kgdb_info[cpu].enter_kgdb--; in kgdb_cpu_enter()
836 return kgdb_info[cpu].ret_state; in kgdb_cpu_enter()
866 ks->cpu = raw_smp_processor_id(); in kgdb_handle_exception()
874 if (kgdb_info[ks->cpu].enter_kgdb != 0) in kgdb_handle_exception()
898 int kgdb_nmicallback(int cpu, void *regs) in kgdb_nmicallback() argument
904 kgdb_info[cpu].rounding_up = false; in kgdb_nmicallback()
907 ks->cpu = cpu; in kgdb_nmicallback()
910 if (kgdb_info[ks->cpu].enter_kgdb == 0 && in kgdb_nmicallback()
920 int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code, in kgdb_nmicallin() argument
927 if (kgdb_info[cpu].enter_kgdb == 0) { in kgdb_nmicallin()
932 ks->cpu = cpu; in kgdb_nmicallin()