中断函数中不能调用ioremap()!!!!!!!
来源:互联网 发布:seo编辑招聘 编辑:程序博客网 时间:2024/05/16 10:27
在开发板上实验,《ARM嵌入式Linux设备驱动实例开发》第二章按键的例子,每当按下键盘时,都会导致Oops错误。
retry start
sleep
into isr 18
kernel BUG at mm/vmalloc.c:171!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1]
Modules linked in: button
CPU: 0 Not tainted (2.6.22.1 #3)
PC is at __bug+0x20/0x2c
LR is at 0xc030dafc
pc : [<c0031b54>] lr : [<c030dafc>] psr: 60000093
sp : c0303e18 ip : c030dafc fp : c0303e24
r10: e0000000 r9 : 41129200 r8 : 00000001
r7 : 00000012 r6 : 00000001 r5 : 00056000 r4 : 00001000
错误原因:中断处理函数isr_button中,使用了ioremap。
在网上找的一个帖子,老外的。
You're not allowed to call any type of blocking function from within
an interrupt handler.
ioremap is a potentially blocking function, so it cannot be called
from an interrupt handler.
Normally, you would do all of the memory mapping, memory allocation
stuff outside of the interrupt handler and the interrupt handler would
just copy stuff around.
Why do you think you need it from within the interrupt handler?
Perhaps you could describe what you're trying to do, and Ican suggest
a "traditional" method of dealing with that situation.
把中断函数里的ioremap语句移到初始化函数里,就正确了。
- 中断函数中不能调用ioremap()!!!!!!!
- ioremap在中断处理函数中会导致错误
- 中断中C函数调用C++
- nRF51822 的GPIOTE的中断处理函数中不能直接调用softdevice的功能,需要用app_scheduler
- 为什么中断处理函数中不能使用printf语句
- 关于C51的中断函数要注意的几个问题 -----中断中调用函数参数错误问题
- C#中构造函数不能调用构造函数?
- 为什么析构函数中不能调用虚函数
- 中断中处理延时及一些函数的调用规则(中断调i2c驱动有感)
- 中断中处理延时及一些函数的调用规则(中断调i2c驱动有感)
- 为何中断里不能调用printf?
- ioremap函数原理
- ioremap函数解析
- ioremap函数解析
- ioremap函数原理
- 中断响应后函数调用
- MySql不能调用函数
- 不能解决函数调用!
- Datatypes In SQLite Version 3
- IOS 添加自定义字体库
- 嵌入式Linux支持shadow
- PuTTY 提供的文件传输工具PSCP
- NSDictionary排序
- 中断函数中不能调用ioremap()!!!!!!!
- java.lang.IllegalStateException at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFa
- Silverlight Visifire 5.0.4 完美去水印
- Struts2 <s:doubleselect>级联下拉框 详解析
- 学习二次开发的感受
- Hadoop中map/reduce编程中关于mapper和reducer的Format问题
- NSArray与NSDictionary的排序代码分享。同样适用于NSString类的数据
- 二分搜寻法(搜寻原则的代表)
- MFC将Debug转换成release版本