https://www.cnblogs.com/sky-heaven/p/6742062.html
韦东山老师的printk讲解:https://blog.csdn.net/W1107101310/article/details/80526039
1.开发板内核启动参数:
bootargs = "console=ttySC0,115200n8 rw root=/dev/mmcblk0p3 rootwait ignore_loglevel vt.global_cursor_default=0"
ignore_loglevel:printk.c中即作为启动参数也作为模块参数,指定了它:ignore loglevel setting (prints all kernel messages to the console)"
只有suppress_message_printing()使用了它,拿它做判断
2.4.14.35内核printk()的调用路径:
printk
vprintk_fun
vprintk_emit 调用local_irq_save(flags)并获取spin_lock!
已经看到了这个函数的logbuf_unlock_irqrestore()位置了
回去看: https://blog.csdn.net/W1107101310/article/details/80526039
G6S上配置的是128K的log_buf
#define CONFIG_LOG_BUF_SHIFT 17 /*1<<17=128K*/
static char __log_buf[__LOG_BUF_LEN] __aligned(LOG_ALIGN); /*128k,以struct printk_log大小对其*/
原文:https://www.cnblogs.com/hellokitty2/p/9867168.html