nudtsong
驱动牛犊
驱动牛犊
  • 注册日期2004-11-16
  • 最后登录2011-03-02
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望268点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
阅读:1794回复:6

求教中断方式的驱动在超线程机器上死机的问题

楼主#
更多 发布于:2004-11-16 22:52
一个pci卡的驱动,如果使用中断方式工作,那么就会在超线程机器上死机(非蓝屏,就是静止不动了),而在非超线程机器上就没有问题。如果使用查询方式工作,就都没有问题。
请问问题可能出在什么地方?thx
wowocock
VIP专家组
VIP专家组
  • 注册日期2002-04-08
  • 最后登录2016-01-09
  • 粉丝16
  • 关注2
  • 积分601分
  • 威望1651点
  • 贡献值1点
  • 好评度1227点
  • 原创分1分
  • 专家分0分
沙发#
发布于:2004-11-17 22:10
用核心SEMAPHORE来同步
花开了,然后又会凋零,星星是璀璨的,可那光芒也会消失。在这样 一瞬间,人降生了,笑者,哭着,战斗,伤害,喜悦,悲伤憎恶,爱。一切都只是刹那间的邂逅,而最后都要归入死亡的永眠
nudtsong
驱动牛犊
驱动牛犊
  • 注册日期2004-11-16
  • 最后登录2011-03-02
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望268点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-11-18 18:27
多谢!
现在我觉得问题可能出在ISR或者DPC例程中,您觉得呢?
能否给出上述两个例程的简单例子?
xqchen
驱动牛犊
驱动牛犊
  • 注册日期2001-09-07
  • 最后登录2004-12-12
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2004-11-22 23:38
1. How about SMP machine?
2. If your driver hangs in SMP machine, too. Then it must be synchronized bug in your ISR/DPC, or any share data.KeSynchronizeExecution is another choice in ISR if you want to consider a alternative.
nudtsong
驱动牛犊
驱动牛犊
  • 注册日期2004-11-16
  • 最后登录2011-03-02
  • 粉丝0
  • 关注0
  • 积分27分
  • 威望268点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2004-11-23 18:45
经过测试,发现在SMP机器上也有同样的问题。
我在ISR和DPC中都添加了KSpinLock,但是问题仍然没有解决。
请问为什么?
sean198148
驱动牛犊
驱动牛犊
  • 注册日期2003-01-22
  • 最后登录2014-10-08
  • 粉丝0
  • 关注0
  • 积分44分
  • 威望26点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2004-11-23 22:54
除了isr和dpc之外,其它竞争的地方是否也要spinlock呢?
如果在单cpu机子上没有问题,其它地方似乎没有必要使用spinlock。.....
xqchen
驱动牛犊
驱动牛犊
  • 注册日期2001-09-07
  • 最后登录2004-12-12
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2004-11-25 01:38
1. You won't need to create your own spinllock, every interrupt object has a buildin spinlock. You need your own only if your isr need to handle more than 1 vector or if the driver has more than 1 ISR. This is unlikely.

2. Hang is the most difficult problem to debug, without seeing your code or see some debug output, I can't figure why it hang. I might be able to give you some advices, though.
(1) Do you use cli/sti? They might be fatal in SMP machine if used improperly.
(2) Add debug output and use softice/windbg to see where it hang. You might try to comment out some code to get a point your driver won't hang, then add the code back one by one to figure out the culprit.
游客

返回顶部