Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_core.c Create Date:2022-07-28 11:03:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Move into place and start executing a preloaded standalone* executable. If nothing was preloaded return an error.

Proto:int kernel_kexec(void)

Type:int

Parameter:Nothing

1121  error = 0
1123  If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Return -EBUSY
1125  If Not kexec_image Then
1126  error = -EINVAL
1127  Go to Unlock
1163  Flag to indicate we are going to kexec a new kernel = true
1164  kernel_restart_prepare(NULL)
1165  migrate_to_reboot_cpu()
1173  cpu_hotplug_enable()
1174  These can be used to print at the various log levels.* All of these will print unconditionally, although note that pr_debug()* and other debug macros are compiled out unless either DEBUG is defined* or CONFIG_DYNAMIC_DEBUG is set.("Starting new kernel\n")
1175  machine_shutdown()
1178  Do not allocate memory (or fail in any way) in machine_kexec().* We are past the point of no return, committed to rebooting now.
1199  Unlock :
1200  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1201  Return error
Caller
NameDescribe
SYSCALL_DEFINE4Reboot system call: for obvious reasons only root may call it,* and even root needs to set up some magic numbers in the registers* so that some mistake won't make this reboot the whole machine.* You can also set the meaning of the ctrl-alt-del-key here.