免费注册 查看新帖 |

Chinaunix

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

自己编写的驱动出现这种情况???? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-09-30 14:31 |只看该作者 |正序浏览
加载驱动时,可以加载成功!但是一触发中断之后超级终端打印:

scheduling while atomic: swapper/0x00000100/0
bad: scheduling from the idle thread!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 17 [#1]
Modules linked in: stk_gpio stk_rtc8025 nfs lockd sunrpc mmc_block himci mmc_core sd_mmc_sdio hi3511_usb_1_1 nls_iso8859_1 nls_cp437 hifb fb hi3511_jpege hi3511_h264d hi3511_h264e hi3511_chnl hi3511_ao hi3511_ai hi3511_sio hi3511_md hi3511_vdec hi3511_group hi3511_venc hi3511_vpp hi3511_dsu hi3511_vou hi3511_viu hi3511_sys hi3511_base tde stkwm8510 stkmediactl stksaa7113 stkflashenv hidmac gpioi2c hiether mmz
CPU: 0
PC is at dequeue_task+0xc/0x78
LR is at deactivate_task+0x24/0x30
pc : [<c003346c>]    lr : [<c00337b8>]    Tainted: P     
sp : c02a9dc8  ip : c02a9de0  fp : c02a9ddc
r10: c02fb8d8  r9 : c02a8000  r8 : c02aac40
r7 : c02abe88  r6 : c02aad6c  r5 : 00000000  r4 : c02aac40
r3 : ffffffff  r2 : 40000093  r1 : 00000000  r0 : c02aac40
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  Segment kernel
Control: 5317F  Table: E1B78000  DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc02a8194)
Stack: (0xc02a9dc8 to 0xc02aa000)
9dc0:                   c02aac40 00000000 c02a9df0 c02a9de0 c00337b8 c0033470
9de0: 00000000 c02a9e38 c02a9df4 c0260978 c00337a4 c02aac74 0a0bcb26 00754540
9e00: 0098965c c02aad68 c0037cc8 c02a9e38 ffffc3af 00000015 c02a9e3c c02abe88
9e20: c02a9eac c02abe88 c02fb8d8 c02a9e74 c02a9e3c c0261594 c0260550 c02fbe58
9e40: c02fbe58 ffffc3af 4b87ad6e c00411b4 c02aac40 c02fb8d8 00000002 bf1d8350
9e60: c02a8000 00000000 c02a9e84 c02a9e78 c0261634 c0261530 c02a9e94 c02a9e88
9e80: c00411f8 c0261620 c02a9ea8 c02a9e98 bf1d8444 c00411d8 00000100 c02a9ee0
9ea0: c02a9eac c0040958 bf1d8360 c02a9eac c02a9eac 00000000 00000001 c02fb670
9ec0: 00000001 c02fd124 0000000a c02a8000 c02fb640 c02a9f0c c02a9ee4 c003c858
9ee0: c0040864 c02a8000 fe140000 00000010 c02abc1c c02a9f50 41069265 c02f56e4
9f00: c02a9f1c c02a9f10 c003ca08 c003c7f8 c02a9f4c c02a9f20 c0021e10 c003c9d4
9f20: c0037cc8 00000a00 ffffffff fe140000 00000010 c031453c e001d114 e001d0e4
9f40: c02a9fa4 c02a9f50 c00209c4 c0021cf4 00000000 0005317f 0005217f 60000013
9f60: c0022640 c02a8000 c02f5d6c c031453c e001d114 41069265 e001d0e4 c02a9fa4
9f80: c02a9f98 c02a9f98 c002bab0 c002269c 60000013 ffffffff c02a9fc0 c02a9fa8
9fa0: c00226e8 c0022650 00053175 c02f529c c02fde54 c02a9fd0 c02a9fc4 c0020024
9fc0: c00226b4 c02a9ff4 c02a9fd4 c00087e4 c0020010 c00082e4 c02f5e48 00053175
9fe0: c02f5ddc c02abbb8 00000000 c02a9ff8 e0008094 c0008698 00000000 00000000
Backtrace:
[<c0033460>] (dequeue_task+0x0/0x7 from [<c00337b8>] (deactivate_task+0x24/0x30)
r5 = 00000000  r4 = C02AAC40
[<c0033794>] (deactivate_task+0x0/0x30) from [<c0260978>] (schedule+0x438/0x61
r4 = 00000000
[<c0260540>] (schedule+0x0/0x61 from [<c0261594>] (schedule_timeout+0x74/0xc
[<c0261520>] (schedule_timeout+0x0/0xc from [<c0261634>] (schedule_timeout_uninterruptible+0x24/0x2
r7 = 00000000  r6 = C02A8000  r5 = BF1D8350  r4 = 00000002
[<c0261610>] (schedule_timeout_uninterruptible+0x0/0x2 from [<c00411f8>] (msleep+0x30/0x40)
[<c00411c8>] (msleep+0x0/0x40) from [<bf1d8444>] (send_signal_handle+0xf4/0x14c [stk_gpio])
[<bf1d8350>] (send_signal_handle+0x0/0x14c [stk_gpio]) from [<c0040958>] (run_timer_softirq+0x104/0x1f4)
r4 = 00000100
[<c0040854>] (run_timer_softirq+0x0/0x1f4) from [<c003c858>] (__do_softirq+0x70/0xf0)
[<c003c7e8>] (__do_softirq+0x0/0xf0) from [<c003ca08>] (irq_exit+0x44/0x4c)
[<c003c9c4>] (irq_exit+0x0/0x4c) from [<c0021e10>] (asm_do_IRQ+0x12c/0x140)
[<c0021ce4>] (asm_do_IRQ+0x0/0x140) from [<c00209c4>] (__irq_svc+0x24/0x80)
[<c0022640>] (default_idle+0x0/0x64) from [<c00226e8>] (cpu_idle+0x44/0x60)
[<c00226a4>] (cpu_idle+0x0/0x60) from [<c0020024>] (__init_end+0x24/0x2c)
r6 = C02FDE54  r5 = C02F529C  r4 = 00053175
[<c0020000>] (__init_end+0x0/0x2c) from [<c00087e4>] (start_kernel+0x15c/0x1c4)
[<c0008688>] (start_kernel+0x0/0x1c4) from [<e0008094>] (0xe0008094)
Code: e89da800 e1a0c00d e92dd830 e24cb004 (e5913000)
<0>Kernel panic - not syncing: Aiee, killing interrupt handler!

论坛徽章:
0
12 [报告]
发表于 2010-10-25 21:36 |只看该作者
怎么没有人回帖啊??????{:3_180:}

论坛徽章:
0
11 [报告]
发表于 2010-10-21 21:57 |只看该作者
可不可以这样理解:
众所周知:中断服务子程序中是不允许睡眠的,而内核定时器也是靠中断完成的,所以定时器里的那个send_signal_handle就相当于中断服务子程序,而我在其中用了msleep(200);进而导致睡眠,所以内核崩溃了?
不知道自己理解的对不对?
求高手????
谢谢????

论坛徽章:
0
10 [报告]
发表于 2010-10-20 09:12 |只看该作者
scheduling while atomic: swapper/0x00000100/0
bad: scheduling from the idle thread!


这句话非常的明显

论坛徽章:
0
9 [报告]
发表于 2010-10-19 22:04 |只看该作者
回复 5# star316


    我没有在中断服务子程序中使用sleep啊????????我没有在中断服务子程序中使用sleep啊????????

论坛徽章:
0
8 [报告]
发表于 2010-10-19 22:03 |只看该作者
回复 6# ashengsheng


    我没有在中断服务子程序中使用sleep啊????????

论坛徽章:
0
7 [报告]
发表于 2010-10-18 21:27 |只看该作者
用了NULL指针

论坛徽章:
0
6 [报告]
发表于 2010-10-17 14:11 |只看该作者
哈哈,在中断中sleep了,肯定会出问题的

论坛徽章:
0
5 [报告]
发表于 2010-10-13 17:44 |只看该作者
中断里面 schedule 了当然会出现问题,去掉 msleep就可以了

论坛徽章:
1
射手座
日期:2013-11-07 09:19:48
4 [报告]
发表于 2010-10-12 15:06 |只看该作者
回复 3# zhuqing_739
LZ可否告知是如何解决的,我现在用mini2440,自己写了一个按键驱动,但是只要触发中断也会出现你所描述的问题。
请教LZ是如何解决的?
  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP