(gdb) l *(0xffffffff8108820c) 0xffffffff8108820c is in stop_machine_cpu_stop (kernel/stop_machine.c:445). 440 441 /* Simple state machine */ 442 do { 443 /* Chill out and ensure we re-read stopmachine_state. */ 444 cpu_relax(); 445 if (smdata->state != curstate) { 446 curstate = smdata->state; 447 switch (curstate) { 448 case STOPMACHINE_DISABLE_IRQ: 449 local_irq_disable(); (gdb) l *(0xffffffff81088100) 0xffffffff81088100 is in cpu_stopper_thread (kernel/stop_machine.c:267). 262 cpu_stop_fn_t fn = work->fn; 263 void *arg = work->arg; 264 struct cpu_stop_done *done = work->done; 265 char ksym_buf[KSYM_NAME_LEN] __maybe_unused; 266 267 __set_current_state(TASK_RUNNING); 268 269 /* cpu stop callbacks are not allowed to sleep */ 270 preempt_disable(); 271 (gdb) l *(0xffffffff810881a7) 0xffffffff810881a7 is in stop_machine_cpu_stop (kernel/stop_machine.c:430). 425 set_state(smdata, smdata->state + 1); 426 } 427 428 /* This is the cpu_stop function which stops the CPU. */ 429 static int stop_machine_cpu_stop(void *data) 430 { 431 struct stop_machine_data *smdata = data; 432 enum stopmachine_state curstate = STOPMACHINE_NONE; 433 int cpu = smp_processor_id(), err = 0; 434 bool is_active; (gdb) l *(0xffffffff8108811a) 0xffffffff8108811a is in cpu_stopper_thread (kernel/stop_machine.c:273). 268 269 /* cpu stop callbacks are not allowed to sleep */ 270 preempt_disable(); 271 272 ret = fn(arg); 273 if (ret) 274 done->ret = ret; 275 276 /* restore preemption and check it's still balanced */ 277 preempt_enable(); (gdb) l *(0xffffffff816101a8) 0xffffffff816101a8 is in schedule (kernel/sched.c:4266). 4261 raw_spin_unlock_irq(&rq->lock); 4262 4263 post_schedule(rq); 4264 4265 preempt_enable_no_resched(); 4266 if (need_resched()) 4267 goto need_resched; 4268 } 4269 EXPORT_SYMBOL(schedule); 4270 (gdb) l *(0xffffffff81006c32) 0xffffffff81006c32 is at arch/x86/xen/xen-asm.S:132. 127 push %r8 128 push %r9 129 push %r10 130 push %r11 131 call xen_force_evtchn_callback 132 pop %r11 133 pop %r10 134 pop %r9 135 pop %r8 136 pop %rdi (gdb) l *(0xffffffff816114a4) 0xffffffff816114a4 is in _raw_spin_unlock_irqrestore (kernel/spinlock.c:178). 173 174 #ifndef CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE 175 void __lockfunc _raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) 176 { 177 __raw_spin_unlock_irqrestore(lock, flags); 178 } 179 EXPORT_SYMBOL(_raw_spin_unlock_irqrestore); 180 #endif 181 182 #ifndef CONFIG_INLINE_SPIN_UNLOCK_IRQ (gdb) l *(0xffffffff8108803a) 0xffffffff8108803a is in cpu_stopper_thread (kernel/stop_machine.c:239). 234 mutex_unlock(&stop_cpus_mutex); 235 return ret; 236 } 237 238 static int cpu_stopper_thread(void *data) 239 { 240 struct cpu_stopper *stopper = data; 241 struct cpu_stop_work *work; 242 int ret; 243 (gdb) l *(0xffffffff8105f5bd) 0xffffffff8105f5bd is in kthread (kernel/kthread.c:99). 94 ret = -EINTR; 95 if (!self.should_stop) 96 ret = threadfn(data); 97 98 /* we can't just return, we must preserve "self" on stack */ 99 do_exit(ret); 100 } 101 102 /* called from do_fork() to get node information for about to be created task */ 103 int tsk_fork_get_node(struct task_struct *tsk) (gdb) l *(0xffffffff81618564) 0xffffffff81618564 is at arch/x86/kernel/entry_64.S:1163. 1158 * Here we are in the child and the registers are set as they were 1159 * at kernel_thread() invocation in the parent. 1160 */ 1161 call *%rsi 1162 # exit 1163 mov %eax, %edi 1164 call do_exit 1165 ud2 # padding for call trace 1166 CFI_ENDPROC 1167 END(kernel_thread_helper) (gdb) l *(0xffffffff81617973) 0xffffffff81617973 is at arch/x86/kernel/entry_64.S:612. 607 /* 608 * Syscall return path ending with IRET. 609 * Has correct top of stack, but partial stack frame. 610 */ 611 GLOBAL(int_ret_from_sys_call) 612 DISABLE_INTERRUPTS(CLBR_NONE) 613 TRACE_IRQS_OFF 614 testl $3,CS-ARGOFFSET(%rsp) 615 je retint_restore_args 616 movl $_TIF_ALLWORK_MASK,%edi (gdb) l *(0xffffffff816117a1) 0xffffffff816117a1 is at arch/x86/kernel/entry_64.S:855. 850 TRACE_IRQS_IRETQ 851 SWAPGS 852 jmp restore_args 853 854 retint_restore_args: /* return to kernel space */ 855 DISABLE_INTERRUPTS(CLBR_ANY) 856 /* 857 * The iretq could re-enable interrupts: 858 */ 859 TRACE_IRQS_IRETQ (gdb) l *(0xffffffff81618560) 0xffffffff81618560 is at arch/x86/kernel/entry_64.S:1155. 1150 movl %eax,%gs 1151 jmp 2b 1152 .previous 1153 1154 ENTRY(kernel_thread_helper) 1155 pushq $0 # fake return address 1156 CFI_STARTPROC 1157 /* 1158 * Here we are in the child and the registers are set as they were 1159 * at kernel_thread() invocation in the parent. ************************************************* (gdb) l *(0xffffffff8105ae4c) 0xffffffff8105ae4c is in process_one_work (kernel/workqueue.c:1801). 1796 static void process_one_work(struct worker *worker, struct work_struct *work) 1797 __releases(&gcwq->lock) 1798 __acquires(&gcwq->lock) 1799 { 1800 struct cpu_workqueue_struct *cwq = get_work_cwq(work); 1801 struct global_cwq *gcwq = cwq->gcwq; 1802 struct hlist_head *bwh = busy_worker_head(gcwq, work); 1803 bool cpu_intensive = cwq->wq->flags & WQ_CPU_INTENSIVE; 1804 work_func_t f = work->func; 1805 int work_color; Dump of assembler code for function process_one_work: 0xffffffff8105ae25 : push %rbp 0xffffffff8105ae26 : mov %rsp,%rbp 0xffffffff8105ae29 : push %r15 0xffffffff8105ae2b : push %r14 0xffffffff8105ae2d : push %r13 0xffffffff8105ae2f : push %r12 0xffffffff8105ae31 : push %rbx 0xffffffff8105ae32 : mov %rdi,%rbx 0xffffffff8105ae35 : mov %rsi,%rdi 0xffffffff8105ae38 : sub $0x28,%rsp 0xffffffff8105ae3c : mov %rsi,-0x38(%rbp) 0xffffffff8105ae40 : callq 0xffffffff810597df 0xffffffff8105ae45 : mov -0x38(%rbp),%rdx 0xffffffff8105ae49 : mov %rax,%r13 0xffffffff8105ae4c : mov (%rax),%r12 0xffffffff8105ae4f : mov -0x38(%rbp),%rax 0xffffffff8105ae53 : shr $0xb,%rdx 0xffffffff8105ae57 : shr $0x5,%rax 0xffffffff8105ae5b : lea (%rdx,%rax,1),%rax 0xffffffff8105ae5f : mov 0x8(%r13),%rdx 0xffffffff8105ae63 : and $0x3f,%eax 0xffffffff8105ae66 : mov (%rdx),%r15d 0xffffffff8105ae69 : mov -0x38(%rbp),%rdx 0xffffffff8105ae6d : mov 0x18(%rdx),%r14 0xffffffff8105ae71 : mov 0x38(%r12,%rax,8),%rdx 0xffffffff8105ae76 : mov %rdx,%rsi 0xffffffff8105ae79 : jmp 0xffffffff8105ae7e 0xffffffff8105ae7b : mov (%rsi),%rsi 0xffffffff8105ae7e : test %rsi,%rsi 0xffffffff8105ae81 : je 0xffffffff8105aea0 0xffffffff8105ae83 : mov -0x38(%rbp),%rcx 0xffffffff8105ae87 : cmp %rcx,0x10(%rsi) 0xffffffff8105ae8b : jne 0xffffffff8105ae7b 0xffffffff8105ae8d : add $0x20,%rsi 0xffffffff8105ae91 : xor %edx,%edx 0xffffffff8105ae93 : mov %rcx,%rdi 0xffffffff8105ae96 : callq 0xffffffff810598e8 0xffffffff8105ae9b : jmpq 0xffffffff8105b09c 0xffffffff8105aea0 : test %rdx,%rdx 0xffffffff8105aea3 : mov %rdx,(%rbx) 0xffffffff8105aea6 : je 0xffffffff8105aeac 0xffffffff8105aea8 : mov %rbx,0x8(%rdx) 0xffffffff8105aeac : mov -0x38(%rbp),%rsi 0xffffffff8105aeb0 : mov %rbx,0x38(%r12,%rax,8) 0xffffffff8105aeb5 : lea 0x38(%r12,%rax,8),%rax 0xffffffff8105aeba : mov %r13,0x18(%rbx) 0xffffffff8105aebe : mov -0x38(%rbp),%rdi 0xffffffff8105aec2 : mov $0x1,%edx 0xffffffff8105aec7 : mov %rax,0x8(%rbx) 0xffffffff8105aecb : mov %rsi,0x10(%rbx) 0xffffffff8105aecf : mov (%rsi),%rax 0xffffffff8105aed2 : mov 0x18(%r12),%esi 0xffffffff8105aed7 : shr $0x4,%rax 0xffffffff8105aedb : shl $0x8,%esi 0xffffffff8105aede : and $0xf,%eax 0xffffffff8105aee1 : mov %esi,%esi 0xffffffff8105aee3 : mov %eax,-0x3c(%rbp) 0xffffffff8105aee6 : callq 0xffffffff8105a1fe 0xffffffff8105aeeb : mov -0x38(%rbp),%rdx 0xffffffff8105aeef : mov -0x38(%rbp),%rax 0xffffffff8105aef3 : mov 0x8(%rdx),%rcx 0xffffffff8105aef7 : mov %rdx,%rsi 0xffffffff8105aefa : mov 0x10(%rdx),%rdx 0xffffffff8105aefe : add $0x8,%rax 0xffffffff8105af02 : mov %rdx,0x8(%rcx) 0xffffffff8105af06 : mov %rcx,(%rdx) 0xffffffff8105af09 : mov %rax,0x8(%rsi) 0xffffffff8105af0d : mov %rax,0x10(%rsi) 0xffffffff8105af11 : testb $0x10,0x1c(%r12) 0xffffffff8105af17 : je 0xffffffff8105af4a 0xffffffff8105af19 : mov 0x8(%r12),%rdi 0xffffffff8105af1e : lea 0x8(%r12),%rax 0xffffffff8105af23 : cmp %rax,%rdi 0xffffffff8105af26 : je 0xffffffff8105af44 0xffffffff8105af28 : sub $0x8,%rdi 0xffffffff8105af2c : callq 0xffffffff810597df 0xffffffff8105af31 : mov 0x8(%rax),%rax 0xffffffff8105af35 : testb $0x10,(%rax) 0xffffffff8105af38 : je 0xffffffff8105af44 0xffffffff8105af3a : mov %r12,%rdi 0xffffffff8105af3d : callq 0xffffffff8105a2ef 0xffffffff8105af42 : jmp 0xffffffff8105af4a 0xffffffff8105af44 : andl $0xffffffffffffffef,0x1c(%r12) 0xffffffff8105af4a : and $0x20,%r15b 0xffffffff8105af4e : setne %r15b 0xffffffff8105af52 : je 0xffffffff8105af66 0xffffffff8105af54 : mov $0x1,%edx 0xffffffff8105af59 : mov $0x40,%esi 0xffffffff8105af5e : mov %rbx,%rdi 0xffffffff8105af61 : callq 0xffffffff8105a36f 0xffffffff8105af66 : mov %r12,%rdi 0xffffffff8105af69 : callq 0xffffffff8105a22c 0xffffffff8105af6e : mov -0x38(%rbp),%rax 0xffffffff8105af72 : lock andb $0xfe,(%rax) 0xffffffff8105af76 : mov 0xc3c4ac(%rip),%eax # 0xffffffff81c97428 0xffffffff8105af7c : test %eax,%eax 0xffffffff8105af7e : je 0xffffffff8105afa8 0xffffffff8105af80 : mov 0xc3c4b9(%rip),%rax # 0xffffffff81c97440 0xffffffff8105af87 : test %rax,%rax 0xffffffff8105af8a : je 0xffffffff8105afa8 0xffffffff8105af8c : mov 0x8(%rax),%rdi 0xffffffff8105af90 : mov -0x38(%rbp),%rsi 0xffffffff8105af94 : mov %rax,-0x48(%rbp) 0xffffffff8105af98 : callq *(%rax) 0xffffffff8105af9a : mov -0x48(%rbp),%rax 0xffffffff8105af9e : add $0x10,%rax 0xffffffff8105afa2 : cmpq $0x0,(%rax) 0xffffffff8105afa6 : jmp 0xffffffff8105af8a 0xffffffff8105afa8 : mov -0x38(%rbp),%rdi 0xffffffff8105afac : callq *%r14 0xffffffff8105afaf : mov 0xc3c4a3(%rip),%eax # 0xffffffff81c97458 0xffffffff8105afb5 : test %eax,%eax 0xffffffff8105afb7 : je 0xffffffff8105afe1 0xffffffff8105afb9 : mov 0xc3c4b0(%rip),%rax # 0xffffffff81c97470 0xffffffff8105afc0 : test %rax,%rax 0xffffffff8105afc3 : je 0xffffffff8105afe1 0xffffffff8105afc5 : mov 0x8(%rax),%rdi 0xffffffff8105afc9 : mov -0x38(%rbp),%rsi 0xffffffff8105afcd : mov %rax,-0x48(%rbp) 0xffffffff8105afd1 : callq *(%rax) 0xffffffff8105afd3 : mov -0x48(%rbp),%rax 0xffffffff8105afd7 : add $0x10,%rax 0xffffffff8105afdb : cmpq $0x0,(%rax) 0xffffffff8105afdf : jmp 0xffffffff8105afc3 0xffffffff8105afe1 : mov %gs:0xcd08,%rax 0xffffffff8105afea : mov -0x1fbc(%rax),%edx 0xffffffff8105aff0 : test $0xefffffff,%edx 0xffffffff8105aff6 : je 0xffffffff8105b03e 0xffffffff8105aff8 : mov %gs:0xcd00,%rsi 0xffffffff8105b001 : mov 0x27c(%rsi),%ecx 0xffffffff8105b007 : mov $0xffffffff81a57152,%rdi 0xffffffff8105b00e : add $0x428,%rsi 0xffffffff8105b015 : xor %eax,%eax 0xffffffff8105b017 : callq 0xffffffff8160f707 0xffffffff8105b01c : mov $0xffffffff81a57189,%rdi 0xffffffff8105b023 : xor %eax,%eax 0xffffffff8105b025 : callq 0xffffffff8160f707 0xffffffff8105b02a : mov %r14,%rsi 0xffffffff8105b02d : mov $0xffffffff81ac8b32,%rdi 0xffffffff8105b034 : callq 0xffffffff81077351 <__print_symbol> 0xffffffff8105b039 : callq 0xffffffff8160f4eb 0xffffffff8105b03e : mov %r12,%rdi 0xffffffff8105b041 : callq 0xffffffff816114a7 <_raw_spin_lock_irq> 0xffffffff8105b046 : test %r15b,%r15b 0xffffffff8105b049 : je 0xffffffff8105b058 0xffffffff8105b04b : mov $0x40,%esi 0xffffffff8105b050 : mov %rbx,%rdi 0xffffffff8105b053 : callq 0xffffffff810599b9 0xffffffff8105b058 : mov 0x8(%rbx),%rdx 0xffffffff8105b05c : test %rdx,%rdx 0xffffffff8105b05f : je 0xffffffff8105b07f 0xffffffff8105b061 : mov (%rbx),%rax 0xffffffff8105b064 : test %rax,%rax 0xffffffff8105b067 : mov %rax,(%rdx) 0xffffffff8105b06a : je 0xffffffff8105b070 0xffffffff8105b06c : mov %rdx,0x8(%rax) 0xffffffff8105b070 : movq $0x0,(%rbx) 0xffffffff8105b077 : movq $0x0,0x8(%rbx) 0xffffffff8105b07f : mov -0x3c(%rbp),%esi 0xffffffff8105b082 : movq $0x0,0x10(%rbx) 0xffffffff8105b08a : xor %edx,%edx 0xffffffff8105b08c : movq $0x0,0x18(%rbx) 0xffffffff8105b094 : mov %r13,%rdi 0xffffffff8105b097 : callq 0xffffffff8105adad 0xffffffff8105b09c : add $0x28,%rsp 0xffffffff8105b0a0 : pop %rbx 0xffffffff8105b0a1 : pop %r12 0xffffffff8105b0a3 : pop %r13 0xffffffff8105b0a5 : pop %r14 0xffffffff8105b0a7 : pop %r15 0xffffffff8105b0a9 : leaveq 0xffffffff8105b0aa : retq