免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3973 | 回复: 4
打印 上一主题 下一主题

求解答:为何NMI中断里加打印,系统莫名其妙会重启 ? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-02 15:34 |只看该作者 |倒序浏览
查看printk注释,其可以在任何上下文调用:
/*
* This is printk.  It can be called from any context.  We want it to work. *
* We try to grab the console_sem.  If we succeed, it's easy - we log the output and
* call the console drivers.  If we fail to get the semaphore we place the output
* into the log buffer and return.  The current holder of the console_sem will
* notice the new output in release_console_sem() and will send it to the
* consoles before releasing the semaphore.
*
* One effect of this deferred printing is that code which calls printk() and
* then changes console_loglevel may break. This is because console_loglevel
* is inspected when the actual printing occurs.
*/

那为何系统又会重启呢?
偶研究了NMI中断机制,查看了整个流程,百思不得其解

您知道么?

论坛徽章:
0
2 [报告]
发表于 2011-04-02 20:23 |只看该作者
这句话有错误吧,printk是会引起调度的

论坛徽章:
0
3 [报告]
发表于 2011-04-05 00:03 |只看该作者
“printk是会引起调度的”
不同意这句,应该不会引起调度的。

LZ看看代码吧,也许是其他地方的问题。

论坛徽章:
7
丑牛
日期:2013-10-18 14:43:21技术图书徽章
日期:2013-11-03 09:58:03辰龙
日期:2014-01-15 22:57:50午马
日期:2014-09-15 07:04:39丑牛
日期:2014-10-16 14:25:222015年亚洲杯之伊朗
日期:2015-03-16 10:24:352015亚冠之城南
日期:2015-05-31 09:52:32
4 [报告]
发表于 2011-04-05 16:15 |只看该作者
NMI时间过长 导致看门狗硬件启动系统?

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
5 [报告]
发表于 2011-04-05 21:35 |只看该作者
NMI时间过长 导致看门狗硬件启动系统?
smalloc 发表于 2011-04-05 16:15



    这个解释倒似乎说的过去
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP