Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:setup_log_buf

Proto:void __init setup_log_buf(int early)

Type:void

Parameter:

TypeParameterName
intearly
1155  If log_buf != __log_buf Then Return
1158  If Not early && Not quested log_buf_len from kernel cmdline Then log_buf_add_cpu()
1161  If Not quested log_buf_len from kernel cmdline Then Return
1164  new_log_buf = memblock_alloc(quested log_buf_len from kernel cmdline , cord buffer )
1165  If Value for the false possibility is greater at compile time(!new_log_buf) Then
1166  pr_err("log_buf_len: %lu bytes not available\n", quested log_buf_len from kernel cmdline )
1168  Return
1171  logbuf_lock_irqsave(flags)
1172  log_buf_len = quested log_buf_len from kernel cmdline
1173  log_buf = new_log_buf
1174  quested log_buf_len from kernel cmdline = 0
1175  free = __LOG_BUF_LEN - log_next_idx
1176  No 3D Now!(log_buf, __log_buf, __LOG_BUF_LEN)
1177  logbuf_unlock_irqrestore(flags)
1179  pr_info("log_buf_len: %u bytes\n", log_buf_len)
1180  pr_info("early log buf free: %u(%u%%)\n", free, (free * 100) / __LOG_BUF_LEN)