Hello,
when at91_can is compiled as a module, the BUG below occours in dmesg
with 2.6.33.4-rt20.
I think this does not happen when its compiled into the kernel.
Any ideas how to fix it?
Olaf
[ 0.000000] Linux version 2.6.33.4-rt20-arm9-at91sam9263ek (abu...@build19)
(gcc version 4.4.4 (GCC) ) #1 PREEMPT RT Thu May 20 00:11:04 UTC 2010
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Atmel AT91SAM9263-EK
[ 0.000000] Ignoring unrecognised tag 0x54410008
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat c04a46bc, node_mem_map
c0bbd000
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16256 pages, LIFO batch:3
[ 0.000000] Clocks: CPU 199 MHz, master 99 MHz, main 16.367 MHz
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total
pages: 16256
[ 0.000000] Kernel command line: console=ttyS0 root=/dev/nfs
nfsroot=192.168.2.100:/opt/cross/sys-root/arm-linux-gnueabi,tcp rw debug
ip=dhcp panic=3
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 7, 786432 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 6, 393216 bytes)
[ 0.000000] Memory: 64MB = 64MB total
[ 0.000000] Memory: 51776KB available (4076K code, 7492K data, 148K init, 0K
highmem)
[ 0.000000] Real-Time Preemption Support (C) 2004-2007 Ingo Molnar
[ 0.000000] Experimental preemptable hierarchical RCU implementation.
[ 0.000000] NR_IRQS:192
[ 0.000000] AT91: 160 gpio irqs in 5 banks
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] console [ttyS0] enabled
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc.,
Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768
[ 0.000000] ... CHAINHASH_SIZE: 16384
[ 0.000000] memory used by lock dependency info: 3695 kB
[ 0.000000] per task-struct memory footprint: 1152 bytes
[ 0.210000] Calibrating delay loop... 99.32 BogoMIPS (lpj=496640)
[ 0.420000] Mount-cache hash table entries: 512
[ 0.490000] CPU: Testing write buffer coherency: ok
[ 0.570000] khelper used greatest stack depth: 5664 bytes left
[ 0.730000] NET: Registered protocol family 16
[ 0.970000] tcb_clksrc: tc0 at 12.994 MHz
[ 1.420000] bio: create slab <bio-0> at 0
[ 1.480000] SCSI subsystem initialized
[ 1.510000] khelper used greatest stack depth: 5656 bytes left
[ 1.530000] usbcore: registered new interface driver usbfs
[ 1.540000] usbcore: registered new interface driver hub
[ 1.550000] khelper used greatest stack depth: 5504 bytes left
[ 1.560000] usbcore: registered new device driver usb
[ 1.650000] Switching to clocksource tcb_clksrc
[ 1.720000] NET: Registered protocol family 2
[ 1.740000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 1.770000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 1.780000] TCP bind hash table entries: 2048 (order: 5, 196608 bytes)
[ 1.810000] TCP: Hash tables configured (established 2048 bind 2048)
[ 1.820000] TCP reno registered
[ 1.820000] UDP hash table entries: 32 (order: 0, 6656 bytes)
[ 1.840000] UDP-Lite hash table entries: 32 (order: 0, 6656 bytes)
[ 1.850000] NET: Registered protocol family 1
[ 1.870000] RPC: Registered udp transport module.
[ 1.880000] RPC: Registered tcp transport module.
[ 1.880000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.910000] NetWinder Floating Point Emulator V0.97 (double precision)
[ 1.990000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.050000] Slow work thread pool: Starting up
[ 2.060000] Slow work thread pool: Ready
[ 2.060000] JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 2.080000] msgmni has been set to 101
[ 2.090000] io scheduler noop registered (default)
[ 2.120000] atmel_lcdfb atmel_lcdfb.0: backlight control is not available
[ 2.130000] atmel_lcdfb atmel_lcdfb.0: 150KiB frame buffer at 23a40000
(mapped at ffc00000)
[ 2.270000] Console: switching to colour frame buffer device 30x40
[ 2.280000] atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00700000 (mapped
at c4876000), irq 26
[ 2.770000] atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a
ATMEL_SERIAL
[ 2.810000] atmel_usart.1: ttyS1 at MMIO 0xfff8c000 (irq = 7) is a
ATMEL_SERIAL
[ 3.140000] brd: module loaded
[ 3.290000] loop: module loaded
[ 3.380000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND
256MiB 3,3V 8-bit)
[ 3.390000] Scanning device for bad blocks
[ 3.440000] Bad eraseblock 301 at 0x0000025a0000
[ 3.480000] Bad eraseblock 514 at 0x000004040000
[ 3.570000] Bad eraseblock 1180 at 0x000009380000
[ 3.580000] Bad eraseblock 1193 at 0x000009520000
[ 3.610000] Bad eraseblock 1365 at 0x00000aaa0000
[ 3.710000] Creating 2 MTD partitions on "atmel_nand":
[ 3.710000] 0x000000000000-0x000004000000 : "Partition 1"
[ 3.780000] 0x000004000000-0x000010000000 : "Partition 2"
[ 3.830000] atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq
14)
[ 3.910000] vcan: Virtual CAN interface driver
[ 3.910000] CAN device driver interface
[ 3.960000] MACB_mii_bus: probed
[ 3.970000] eth0: Atmel MACB at 0xfffbc000 irq 21 (3a:1f:34:08:54:54)
[ 3.980000] eth0: attached PHY driver [Generic PHY]
(mii_bus:phy_addr=ffffffff:00, irq=-1)
[ 4.010000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 4.020000] at91_ohci at91_ohci: AT91 OHCI
[ 4.090000] at91_ohci at91_ohci: new USB bus registered, assigned bus number
1
[ 4.100000] at91_ohci at91_ohci: irq 29, io mem 0x00a00000
[ 4.180000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
[ 4.190000] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[ 4.200000] usb usb1: Product: AT91 OHCI
[ 4.200000] usb usb1: Manufacturer: Linux 2.6.33.4-rt20-arm9-at91sam9263ek
ohci_hcd
[ 4.210000] usb usb1: SerialNumber: at91
[ 4.270000] hub 1-0:1.0: USB hub found
[ 4.280000] hub 1-0:1.0: 2 ports detected
[ 4.320000] Initializing USB Mass Storage driver...
[ 4.330000] usbcore: registered new interface driver usb-storage
[ 4.340000] USB Mass Storage support registered.
[ 4.350000] usbcore: registered new interface driver ums-alauda
[ 4.360000] usbcore: registered new interface driver ums-cypress
[ 4.380000] usbcore: registered new interface driver ums-datafab
[ 4.390000] usbcore: registered new interface driver ums-freecom
[ 4.410000] usbcore: registered new interface driver ums-isd200
[ 4.420000] usbcore: registered new interface driver ums-jumpshot
[ 4.430000] usbcore: registered new interface driver ums-karma
[ 4.440000] usbcore: registered new interface driver ums-onetouch
[ 4.460000] usbcore: registered new interface driver ums-sddr09
[ 4.470000] usbcore: registered new interface driver ums-sddr55
[ 4.480000] usbcore: registered new interface driver ums-usbat
[ 4.490000] udc: at91_udc version 3 May 2006
[ 4.510000] mice: PS/2 mouse device common for all mice
[ 4.540000] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 4.580000] ads7846 spi0.3: external vREF for ADS7843 not specified
[ 4.590000] ads7846 spi0.3: touchscreen, irq 31
[ 4.610000] input: ADS7843 Touchscreen as
/devices/platform/atmel_spi.0/spi0.3/input/input1
[ 4.660000] rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
[ 4.670000] IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
[ 4.680000] rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
[ 4.690000] i2c /dev entries driver
[ 4.740000] at24 0-0050: 65536 byte 24c512 EEPROM (writable)
[ 4.770000] i2c-gpio i2c-gpio: using pins 68 (SDA) and 69 (SCL)
[ 4.800000] AT91SAM9 Watchdog: sorry, watchdog is disabled
[ 4.810000] at91_wdt: probe of at91_wdt failed with error -5
[ 5.010000] usbcore: registered new interface driver hiddev
[ 5.020000] usbcore: registered new interface driver usbhid
[ 5.030000] usbhid: USB HID core driver
[ 5.030000] TCP cubic registered
[ 5.050000] NET: Registered protocol family 10
[ 5.070000] lo: Disabled Privacy Extensions
[ 5.090000] IPv6 over IPv4 tunneling driver
[ 5.120000] sit0: Disabled Privacy Extensions
[ 5.130000] NET: Registered protocol family 17
[ 5.130000] can: controller area network core (rev 20090105 abi 8)
[ 5.140000] NET: Registered protocol family 29
[ 5.150000] can: raw protocol (rev 20090105)
[ 5.150000] can: broadcast manager protocol (rev 20090105 t)
[ 5.200000] rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware
clock
[ 6.780000] Sending DHCP requests .
[ 6.970000] eth0: link up (100/Full)
[ 8.830000] ., OK
[ 8.860000] IP-Config: Got DHCP answer from 192.168.2.100, my address is
192.168.2.42
[ 8.870000] IP-Config: Complete:
[ 8.880000] device=eth0, addr=192.168.2.42, mask=255.255.255.0,
gw=192.168.2.100,
[ 8.890000] host=at91sam9263ek, domain=easybox, nis-domain=(none),
[ 8.890000] bootserver=192.168.2.100, rootserver=192.168.2.100,
rootpath=
[ 8.920000] Looking up port of RPC 100003/2 on 192.168.2.100
[ 9.010000] Looking up port of RPC 100005/1 on 192.168.2.100
[ 9.260000] VFS: Mounted root (nfs filesystem) on device 0:14.
[ 9.270000]
*****************************************************************************
[ 9.280000] *
*
[ 9.290000] * REMINDER, the following debugging options are turned on in
your .config: *
[ 9.300000] *
*
[ 9.310000] * CONFIG_DEBUG_RT_MUTEXES
*
[ 9.320000] * CONFIG_LOCKDEP
*
[ 9.320000] *
*
[ 9.330000] * they may increase runtime overhead and latencies.
*
[ 9.340000] *
*
[ 9.350000]
*****************************************************************************
[ 9.360000] Freeing init memory: 148K
[ 16.350000] eth0: no IPv6 routers present
[ 16.940000] ldconfig used greatest stack depth: 3320 bytes left
[ 30.320000] /etc/init.d/rcS done.
[ 64.210000] ttyS0: 1 input overrun(s)
[ 67.060000] ttyS0: 2 input overrun(s)
[ 211.140000] at91_can netdevice driver
[ 211.140000] BUG: sleeping function called from invalid context at
/opt/cross/sys-root/arm-linux-gnueabi/usr/src/linux-2.6.33-arm9-kernel-source/kernel/rtmutex.c:684
[ 211.140000] pcnt: 1 0 in_atomic(): 1, irqs_disabled(): 128, pid: 480, name:
modprobe
[ 211.140000] 3 locks held by modprobe/480:
[ 211.140000] #0: (&__lockdep_no_validate__){+.+.+.}, at: [<c01e3194>]
__driver_attach+0x44/0x8c
[ 211.140000] #1: (&__lockdep_no_validate__){+.+.+.}, at: [<c01e31a0>]
__driver_attach+0x50/0x8c
[ 211.140000] #2: (rtnl_mutex){+.+.+.}, at: [<c027ff18>] rtnl_lock+0x14/0x1c
[ 211.140000] irq event stamp: 8763
[ 211.140000] hardirqs last enabled at (8762): [<c0324a78>]
_raw_spin_unlock_irqrestore+0x44/0x70
[ 211.140000] hardirqs last disabled at (8763): [<c032495c>]
_raw_spin_lock_irqsave+0x28/0x6c
[ 211.140000] softirqs last enabled at (0): [<c004844c>]
copy_process+0x378/0xf68
[ 211.140000] softirqs last disabled at (0): [<(null)>] (null)
[ 211.140000] [<c0033ea4>] (unwind_backtrace+0x0/0xdc) from [<c032164c>]
(dump_stack+0x18/0x1c)
[ 211.140000] [<c032164c>] (dump_stack+0x18/0x1c) from [<c0041f18>]
(__might_sleep+0x110/0x130)
[ 211.140000] [<c0041f18>] (__might_sleep+0x110/0x130) from [<c0323f14>]
(rt_spin_lock+0x44/0xa0)
[ 211.140000] [<c0323f14>] (rt_spin_lock+0x44/0xa0) from [<c0033b44>]
(unwind_frame+0x74/0x3d4)
[ 211.140000] [<c0033b44>] (unwind_frame+0x74/0x3d4) from [<c0031970>]
(walk_stackframe+0x34/0x40)
[ 211.140000] [<c0031970>] (walk_stackframe+0x34/0x40) from [<c0031a10>]
(save_stack_trace_tsk+0x94/0xc4)
[ 211.140000] [<c0031a10>] (save_stack_trace_tsk+0x94/0xc4) from [<c0031a64>]
(save_stack_trace+0x24/0x28)
[ 211.140000] [<c0031a64>] (save_stack_trace+0x24/0x28) from [<c006e348>]
(save_trace+0x44/0xd8)
[ 211.140000] [<c006e348>] (save_trace+0x44/0xd8) from [<c006e458>]
(add_lock_to_list+0x7c/0xc8)
[ 211.140000] [<c006e458>] (add_lock_to_list+0x7c/0xc8) from [<c0071fd4>]
(__lock_acquire+0x14e0/0x18a8)
[ 211.140000] [<c0071fd4>] (__lock_acquire+0x14e0/0x18a8) from [<c0072408>]
(lock_acquire+0x6c/0x80)
[ 211.140000] [<c0072408>] (lock_acquire+0x6c/0x80) from [<c032498c>]
(_raw_spin_lock_irqsave+0x58/0x6c)
[ 211.140000] [<c032498c>] (_raw_spin_lock_irqsave+0x58/0x6c) from
[<c0323350>] (rt_spin_lock_slowlock+0x2c/0x23c)
[ 211.140000] [<c0323350>] (rt_spin_lock_slowlock+0x2c/0x23c) from
[<c0323f38>] (rt_spin_lock+0x68/0xa0)
[ 211.140000] [<c0323f38>] (rt_spin_lock+0x68/0xa0) from [<c01a1204>]
(idr_pre_get+0x40/0x7c)
[ 211.140000] [<c01a1204>] (idr_pre_get+0x40/0x7c) from [<c01a1258>]
(ida_pre_get+0x18/0x60)
[ 211.140000] [<c01a1258>] (ida_pre_get+0x18/0x60) from [<c00f81bc>]
(sysfs_new_dirent+0x90/0x11c)
[ 211.140000] [<c00f81bc>] (sysfs_new_dirent+0x90/0x11c) from [<c00f77dc>]
(sysfs_add_file_mode+0x28/0xa0)
[ 211.140000] [<c00f77dc>] (sysfs_add_file_mode+0x28/0xa0) from [<c00f9cbc>]
(internal_create_group+0x128/0x1d4)
[ 211.140000] [<c00f9cbc>] (internal_create_group+0x128/0x1d4) from
[<c00f9d9c>] (sysfs_create_group+0x18/0x1c)
[ 211.140000] [<c00f9d9c>] (sysfs_create_group+0x18/0x1c) from [<c01e0648>]
(device_add_groups+0x24/0x78)
[ 211.140000] [<c01e0648>] (device_add_groups+0x24/0x78) from [<c01e0d5c>]
(device_add+0x294/0x4ac)
[ 211.140000] [<c01e0d5c>] (device_add+0x294/0x4ac) from [<c028301c>]
(netdev_register_kobject+0x58/0x68)
[ 211.140000] [<c028301c>] (netdev_register_kobject+0x58/0x68) from
[<c0277358>] (register_netdevice+0x264/0x464)
[ 211.140000] [<c0277358>] (register_netdevice+0x264/0x464) from [<c027759c>]
(register_netdev+0x44/0x54)
[ 211.140000] [<c027759c>] (register_netdev+0x44/0x54) from [<c020f580>]
(register_candev+0x18/0x20)
[ 211.140000] [<c020f580>] (register_candev+0x18/0x20) from [<bf00416c>]
(at91_can_probe+0x16c/0x218 [at91_can])
[ 211.140000] [<bf00416c>] (at91_can_probe+0x16c/0x218 [at91_can]) from
[<c01e4094>] (platform_drv_probe+0x1c/0x20)
[ 211.140000] [<c01e4094>] (platform_drv_probe+0x1c/0x20) from [<c01e30a0>]
(driver_probe_device+0xb0/0x160)
[ 211.140000] [<c01e30a0>] (driver_probe_device+0xb0/0x160) from [<c01e31b8>]
(__driver_attach+0x68/0x8c)
[ 211.140000] [<c01e31b8>] (__driver_attach+0x68/0x8c) from [<c01e2890>]
(bus_for_each_dev+0x54/0x94)
[ 211.140000] [<c01e2890>] (bus_for_each_dev+0x54/0x94) from [<c01e2f04>]
(driver_attach+0x20/0x28)
[ 211.140000] [<c01e2f04>] (driver_attach+0x20/0x28) from [<c01e2170>]
(bus_add_driver+0xa8/0x22c)
[ 211.140000] [<c01e2170>] (bus_add_driver+0xa8/0x22c) from [<c01e34d0>]
(driver_register+0xb4/0x144)
[ 211.140000] [<c01e34d0>] (driver_register+0xb4/0x144) from [<c01e4338>]
(platform_driver_register+0x4c/0x60)
[ 211.140000] [<c01e4338>] (platform_driver_register+0x4c/0x60) from
[<bf004238>] (at91_can_module_init+0x20/0x30 [at91_can])
[ 211.140000] [<bf004238>] (at91_can_module_init+0x20/0x30 [at91_can]) from
[<c002d3c4>] (do_one_initcall+0x64/0x1d0)
[ 211.140000] [<c002d3c4>] (do_one_initcall+0x64/0x1d0) from [<c007c7b4>]
(sys_init_module+0xc4/0x1f0)
[ 211.140000] [<c007c7b4>] (sys_init_module+0xc4/0x1f0) from [<c002e020>]
(ret_fast_syscall+0x0/0x34)
[ 211.170000] at91_can at91_can: device registered (reg_base=c48a8000, irq=12)
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core