BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / embedded-system / #5469同步于 2009/7/27
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Embedded_System机器人发帖

加载驱动时出现Aiee, killing interrupt handler错误

ninadw
2009/7/27镜像同步4 回复
自己写了个驱动,第一次insmod正常,然后运行测试程序,再rmmod。再次insmod就会报如下错误。一般这种错误是因为什么呢?谢谢大家! [root@EmbedSky home]# insmod ad_driver.ko Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c2e54000 [00000000] *pgd=32e36031, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] Modules linked in: ad_driver s3c2440_camif CPU: 0 PC is at ad_irq_isr+0x34/0x258 [ad_driver] LR is at __do_irq+0x6c/0xb4 pc : [<bf007034>] lr : [<c0022ca0>] Not tainted sp : c3813e30 ip : bf0081a0 fp : c3813e54 r10: c3813ed4 r9 : c0330b64 r8 : 00000013 r7 : 00000000 r6 : 00000000 r5 : bf008028 r4 : 00000000 r3 : 00000000 r2 : c3813ed4 r1 : 00000000 r0 : 00000001 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Segment user Control: C000717F Table: 32E54000 DAC: 00000015 Process insmod (pid: 798, stack limit = 0xc3812194) Stack: (0xc3813e30 to 0xc3814000) 3e20: c3d692c0 c3812000 00000000 00000000 3e40: 00000013 c3813ed4 c3813e7c c3813e58 c0022ca0 bf007010 c0330f40 00000013 3e60: c3d692c0 c3813ed4 00000001 c3813ed4 c3813e9c c3813e80 c0022e08 c0022c44 3e80: ffffffff c3812000 00000001 00000002 c3813ed0 c3813ea0 c0022f94 c0022d68 3ea0: 00000000 0000000b ffffffff c3813f08 00000001 00000002 00000001 c3812000 3ec0: 00000000 c3813f3c c3813ed4 c0021978 c0022f50 00000003 f0000008 00000001 3ee0: 21513c07 c3812000 c3d692c0 40000013 00000013 00000000 c3812000 00000000 3f00: c3813f3c c3813f1c c3813f1c c00234e8 c00234ec 60000013 ffffffff c3d692c0 3f20: 00000013 20000000 bf007000 bf00766c c3813f64 c3813f40 c00235cc c00233f0 3f40: 00000000 bf008040 c3812000 c02ab598 c02ab598 00000000 c3813f7c c3813f68 3f60: bf19a038 c0023520 00000000 c02ab5a8 c3813fa4 c3813f80 c0057da0 bf19a010 3f80: 00000003 00000000 00000000 00000080 c00220a4 00138bbc 00000000 c3813fa8 3fa0: c0021f20 c0057be0 00000000 00000000 00900080 40000000 00001a13 002f82e8 3fc0: 00000003 00000000 00000000 00000002 bea61e94 00008548 00138bbc bea61c60 3fe0: bea61bc0 bea61bb4 0006fc78 001860a0 00000010 00900080 00000a4c 663e333c Backtrace: [<bf007000>] (ad_irq_isr+0x0/0x258 [ad_driver]) from [<c0022ca0>] (__do_irq+0x6c/0xb4) [<c0022c34>] (__do_irq+0x0/0xb4) from [<c0022e08>] (do_edge_IRQ+0xb0/0x12c) [<c0022d58>] (do_edge_IRQ+0x0/0x12c) from [<c0022f94>] (asm_do_IRQ+0x54/0x158) r7 = 00000002 r6 = 00000001 r5 = C3812000 r4 = FFFFFFFF [<c0022f40>] (asm_do_IRQ+0x0/0x158) from [<c0021978>] (__irq_svc+0x38/0x158) [<c00233e0>] (setup_irq+0x0/0x130) from [<c00235cc>] (request_irq+0xbc/0xd8) r8 = BF00766C r7 = BF007000 r6 = 20000000 r5 = 00000013 r4 = C3D692C0 [<c0023510>] (request_irq+0x0/0xd8) from [<bf19a038>] (ad_driver_init+0x38/0xb4 [ad_driver]) [<bf19a000>] (ad_driver_init+0x0/0xb4 [ad_driver]) from [<c0057da0>] (sys_init_module+0x1d0/0x37c) r4 = C02AB5A8 [<c0057bd0>] (sys_init_module+0x0/0x37c) from [<c0021f20>] (ret_fast_syscall+0x0/0x2c) Code: e59f3200 e59c1000 e5933000 e2810001 (e7932104) <0>Kernel panic - not syncing: Aiee, killing interrupt handler!
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
ArmStrong机器人#1 · 2009/7/27
plz check the init function and exit function carefully 【 在 ninadw (嘟嘟) 的大作中提到: 】 : 自己写了个驱动,第一次insmod正常,然后运行测试程序,再rmmod。再次insmod就会报如下错误。一般这种错误是因为什么呢?谢谢大家! : [root@EmbedSky home]# insmod ad_driver.ko : Unable to handle kernel NULL pointer dereference at virtual address 00000000 : ...................
ninadw机器人#2 · 2009/7/28
谢谢ArmStrong, 中断的注册和注销原来放在__init和__exit里,在open和release函数中enable_irq和disable_irq,就报上面的错误,后来直接放到open和release里了就没事了,这又是为什么呢?
ArmStrong机器人#3 · 2009/7/28
there are some rules. For example, the init function must return before quit. I dont's know exactly why the irq can't be enabled in init function 【 在 ninadw (嘟嘟) 的大作中提到: 】 : 谢谢ArmStrong, : 中断的注册和注销原来放在__init和__exit里,在open和release函数中enable_irq和disable_irq,就报上面的错误,后来直接放到open和release里了就没事了,这又是为什么呢?
ninadw机器人#4 · 2009/7/28
谢谢!学习了!