Internal error: Oops: 37 [#1] PREEMPT SMP ARM


linux kernel version: 4.4.38

hardware : exynos4412-tiny4412 

起因:我向调试开发板上的网络设备驱动,需要更新kernel,更新后发现开发板无法启动,log如下:

 1 [    2.123373] usb4604 usb-hub: switched to HUB mode
 2 [    2.123422] usb4604 usb-hub: usb4604_probe: probed in hub mode
 3 [    2.125274] mousedev: PS/2 mouse device common for all mice
 4 [    2.131205] edt_ft5x06 1-0038: touchscreen probe failed
 5 [    2.136329] touchscreen-1wire        initialized
 6 [    2.139793] ts-backlight     initialized
 7 [    2.143515] tiny4412_1wire 139d0000.tiny4412_1wire: can't request region for resource [mem 0x139d0000-0x139d0fff]
 8 [    2.153639] setup_irq: ret = 0
 9 [    2.156670] timer_for_1wire clock = 100000000
10 [    2.160989] Unable to handle kernel paging request at virtual address fffffff0
11 [    2.168190] pgd = c0004000
12 [    2.170878] [fffffff0] *pgd=6fffd861, *pte=00000000, *ppte=00000000
13 [    2.177121] Internal error: Oops: 37 [#1] PREEMPT SMP ARM
14 [    2.182500] Modules linked in:
15 [    2.185541] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.38-tiny4412 #14
16 [    2.192308] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
17 [    2.198385] task: ef078000 ti: ef080000 task.ti: ef080000
18 [    2.203769] PC is at init_timer_for_1wire+0x50/0x134
19 [    2.208714] LR is at init_timer_for_1wire+0x4c/0x134
20 [    2.213662] pc : [<c0304ff0>]    lr : [<c0304fec>]    psr: 60000013
21 [    2.213662] sp : ef081e50  ip : 00000001  fp : 00000000
22 [    2.225118] r10: c06bd848  r9 : 0000009f  r8 : c07427ec
23 [    2.230327] r7 : ef385810  r6 : 05f5e100  r5 : fffffff0  r4 : c07427ec
24 [    2.236837] r3 : 00000000  r2 : 00000000  r1 : 00000002  r0 : 00000021
25 [    2.243348] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
26 [    2.250465] Control: 10c5387d  Table: 4000404a  DAC: 00000051
27 [    2.256193] Process swapper/0 (pid: 1, stack limit = 0xef080210)
28 [    2.262182] Stack: (0xef081e50 to 0xef082000)
29 [    2.266524] 1e40:                                     00000000 c07427ec ef385800 ef385810
30 [    2.274684] 1e60: c07427ec c030591c c0741ff4 ef385810 c06f102c fffffdfb 00000000 c027b83c
31 [    2.282843] 1e80: c0741ff4 ef385810 c06f102c 00000000 00000000 c0279f7c ef385810 c06f102c
32 [    2.291002] 1ea0: ef385844 c06edc38 00000000 c027a0fc 00000000 c06f102c c027a070 c0278424

13行:提示internal error

10行:不能处理虚拟地址,大概是非法内存访问,

7行:不能访问资源范围

于是我去内核源码里搜索tiny4412_1wire关键字,发现

 1 moxa@moxa-ThinkPad-X240:~/linux/github/tiny4412/linux-4.4.38-for-tiny4412$ find . -type f -name "*.c" | xargs grep "Unable to handle kernel paging request at virtual address"
 2 ./arch/sparc/mm/fault_32.c:             printk(KERN_ALERT "Unable to handle kernel paging request at virtual address %08lx\n",
 3 moxa@moxa-ThinkPad-X240:~/linux/github/tiny4412/linux-4.4.38-for-tiny4412$ find . -type f -name "*.c" | xargs grep "timer_for_1wire"                ./drivers/input/touchscreen/tiny4412_1wire_host.c:static int init_timer_for_1wire(struct device *dev)
 4 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      printk(KERN_ALERT"timer_for_1wire clock = %ld\n", pclk);
 5 ./drivers/input/touchscreen/tiny4412_1wire_host.c:static inline void stop_timer_for_1wire(void)
 6 ./drivers/input/touchscreen/tiny4412_1wire_host.c:static irqreturn_t timer_for_1wire_interrupt(int irq, void *dev_id)
 7 ./drivers/input/touchscreen/tiny4412_1wire_host.c:                      stop_timer_for_1wire();
 8 ./drivers/input/touchscreen/tiny4412_1wire_host.c:              stop_timer_for_1wire();
 9 ./drivers/input/touchscreen/tiny4412_1wire_host.c:static struct irqaction timer_for_1wire_irq = {
10 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      .handler = timer_for_1wire_interrupt,
11 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      .dev_id  = &timer_for_1wire_irq,
12 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      ret = setup_irq(irq_timer3, &timer_for_1wire_irq);
13 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      ret = init_timer_for_1wire(dev);
14 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      free_irq(irq_timer3, &timer_for_1wire_irq);
15 ./drivers/input/touchscreen/tiny4412_1wire_host.c:      ret = init_timer_for_1wire(dev);

然后我猜测这与input设备有关,于是make menuconfig查看touhscreen是否又被编译,

Device Drivers  --->

  Input device support  --->

    [*]   Touchscreens  ---> 

果然touchscreens被编译了,但是我的触摸屏没有接。

于是取消此编译选项,重新编译,开发成功启动~


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM