Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kmsg_dump - dump kernel log to kernel message dumpers.*@reason: the reason (oops, panic etc) for dumping* Call each of the registered dumper's dump() callback, which can* retrieve the kmsg records with kmsg_dump_get_line() or* kmsg_dump_get_buffer().

Proto:void kmsg_dump(enum kmsg_dump_reason reason)

Type:void

Parameter:

TypeParameterName
enum kmsg_dump_reasonreason
3117  If reason > KMSG_DUMP_OOPS && Not always_kmsg_dump Then Return
3120  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3122  If max_reason && reason > max_reason Then Continue
3126  active = true
3128  logbuf_lock_irqsave(flags)
3129  cur_seq = he next printk record to read after the last 'clear' command
3130  private state of the kmsg iterator = clear_idx
3131  next_seq = dex and sequence number of the next record to store in the buffer
3132  next_idx = log_next_idx
3133  logbuf_unlock_irqrestore(flags)
3136  dump(dumper, reason)
3139  active = false
3141  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
Caller
NameDescribe
oops_exitCalled when the architecture exits its oops handler, after printing* everything.
emergency_restartmergency_restart - reboot the system* Without shutting down any hardware or taking any locks* reboot the system. This is called when we know we are in* trouble so this is our best effort to reboot. This is* safe to call in interrupt context.
kernel_restartkernel_restart - reboot the system*@cmd: pointer to buffer containing command to execute for restart* or %NULL* Shutdown everything and perform a clean reboot.* This is not safe to call in interrupt context.
kernel_haltkernel_halt - halt the system* Shutdown everything and perform a clean system halt.
kernel_power_offkernel_power_off - power_off the system* Shutdown everything and perform a clean system power_off.