函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\smpboot.c Create Date:2022-07-27 09:24:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:native_cpu_up

函数原型:int native_cpu_up(unsigned int cpu, struct task_struct *tidle)

返回类型:int

参数:

类型参数名称
unsigned intcpu
struct task_struct *tidle
1129  apicid等于cpu_present_to_apicid(cpu)
1130  cpu0_nmi_registered等于0
1132  ret等于0
1134  lockdep_assert_irqs_enabled()
1136  pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu)
1138  如果apicid恒等于BAD_APICID或非physid_isset(apicid, phys_cpu_present_map)或非apic_id_valid(apicid)则
1141  打印错误信息("%s: bad cpu %d\n", __func__, cpu)
1142  返回:负EINVAL
1148  如果测试CPU信息
1149  pr_debug("do_boot_cpu %d Already started\n", cpu)
1150  返回:负ENOSYS
1157  Save current fixed-range MTRR state of the first cpu in cpu_online_mask.
1160  err等于cpu_check_up_prepare(cpu)
1161  如果errerr不等于负EBUSY则返回:err
1165  per_cpu(Track which context is using the FPU on the CPU:, cpu) = NULL
1167  err等于common_cpu_up(cpu, tidle)
1168  如果err则返回:err
1171  err等于NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad* (ie clustered apic addressing mode), this is a LOGICAL apic ID.* Returns zero if CPU booted OK, else error code from* ->wakeup_secondary_cpu.
1172  如果err
1173  打印错误信息("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu)
1174  ret等于负EIO
1175  转到:unreg_nmi
1182  local_irq_save(flags)
1183  check_tsc_sync_source(cpu)
1184  local_irq_restore(flags)
1186  当非cpu_online(cpu)循环
1187  cpu_relax()
1188  h_nmi_watchdog - restart NMI watchdog timeout.* If the architecture supports the NMI watchdog, touch_nmi_watchdog()* may be used to reset the timeout - for code which intentionally* disables interrupts for a long time. This call is stateless.
1191  unreg_nmi :
1196  如果cpu0_nmi_registeredunregister_nmi_handler(NMI_LOCAL, "wake_cpu0")
1199  返回:ret