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:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Various sanity checks.

Proto:static void __init smp_sanity_check(void)

Type:void

Parameter:Nothing

1238  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
1241  If def_to_bigsmp && nr_cpu_ids > 8 Then
1245  pr_warn("More than 8 CPUs detected - skipping them\nUse CONFIG_X86_BIGSMP\n")
1248  nr = 0
1250  If nr >= 8 Then set_cpu_present(cpu, false)
1252  nr++
1255  nr = 0
1257  If nr >= 8 Then set_cpu_possible(cpu, false)
1259  nr++
1262  nr_cpu_ids = 8
1266  If Not physid_isset(hard_smp_processor_id(), phys_cpu_present_map) Then
1267  pr_warn("weird, boot CPU (#%d) not listed by the BIOS\n", hard_smp_processor_id())
1270  physid_set(hard_smp_processor_id(), phys_cpu_present_map)
1277  If Not check_phys_apicid_present(boot_cpu_physical_apicid) Then
1278  pr_notice("weird, boot CPU (#%d) not listed by the BIOS\n", boot_cpu_physical_apicid)
1280  physid_set(hard_smp_processor_id(), phys_cpu_present_map)
1282  preempt_enable()
Caller
NameDescribe
native_smp_prepare_cpusPrepare for SMP bootup.*@max_cpus: configured maximum number of CPUs, It is a legacy parameter* for common interface support.