Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\smpboot.c Create Date:2022-07-28 08:24:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:native_cpu_up

Proto:int native_cpu_up(unsigned int cpu, struct task_struct *tidle)

Type:int

Parameter:

TypeParameterName
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  If apicid == BAD_APICID || Not physid_isset(apicid, phys_cpu_present_map) || Not apic_id_valid(apicid) Then
1141  pr_err("%s: bad cpu %d\n", __func__, cpu)
1142  Return -EINVAL
1148  If pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then
1149  pr_debug("do_boot_cpu %d Already started\n", cpu)
1150  Return -ENOSYS
1157  Save current fixed-range MTRR state of the first cpu in cpu_online_mask.
1160  err = cpu_check_up_prepare(cpu)
1161  If err && err != -EBUSY Then Return err
1165  per_cpu(Track which context is using the FPU on the CPU:, cpu) = NULL
1167  err = common_cpu_up(cpu, tidle)
1168  If err Then Return 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  If err Then
1173  pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu)
1174  ret = -EIO
1175  Go to unreg_nmi
1182  local_irq_save(flags)
1183  check_tsc_sync_source(cpu)
1184  local_irq_restore(flags)
1186  When Not cpu_online(cpu) cycle
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  If cpu0_nmi_registered Then unregister_nmi_handler(NMI_LOCAL, "wake_cpu0")
1199  Return ret