[#3813] On BF537-STAMP, install ad1836 and SPI module, then remove ad1836 module, kernel will crash
Submitted By: Vivi Li
Open Date
2008-01-04 01:51:14 Close Date
2008-02-20 07:50:52
Priority:
Medium Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
toolchain 4.1-2007_Oct_07
App binary format:
N/A
Summary: On BF537-STAMP, install ad1836 and SPI module, then remove ad1836 module, kernel will crash
Details:
Build kernel with ad1836 driver and SPI controller driver as module.
On BF537-STAMP, install ad1836 and SPI module, then remove ad1836 module. Kernel will crash.
Config file is attached.
----
## Starting application at 0x00178000 ...
Linux version 2.6.22.15-ADI-2007R2-pre-svn4075 (test@uclinux51-ad9960-ad1836) (gcc version 4.1.2 (ADI svn)) #57 Thu Jan 3 168
Hardware Trace Active and Enabled
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Recovering from Watchdog event
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x00116380
rodata = 0x00117000-0x001659ec
data = 0x00166000-0x00178000
stack = 0x00166000-0x00168000
init = 0x00178000-0x0045c000
bss = 0x0045c000-0x0046bbd0
available = 0x0046bbd0-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 14224
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50:10.100.4.174:10.99.22.174:255.255.255.0:BF537:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Physical pages: 37ff
Memory available: 52168k/64104k RAM, (2960k init code, 1108k kernel code, 62k data, 1024k dma)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (39 KB free)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Dynamic Power Management Controller Driver v0.1: major=10, minor = 254
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
SMSC LAN83C185: Registered new driver
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 00:33:24 (2004)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 2960k freed
dma_alloc_init: dma_page @ 0x00459000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.4.1 (2008-01-03 16:22:14 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:~>
root:~> modprobe spi_bfin5xx; modprobe snd-ad1836
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
root:~> tone
TONE: generating sine wave at 1000 Hz...
root:~> lsmod
Module Size Used by
snd_ad1836 16296 0
spi_bfin5xx 9120 0
root:~> rmmod snd_ad1836
NULL pointer access (probably)
Kernel OOPS in progress
Defered Exception context
CURRENT PROCESS:
COMM=rmmod PID=123
TEXT = 0x03180000-0x031d6dc8 DATA = 0x00330dc8-0x0033c0d4
BSS = 0x0033c0d4-0x00380000 USER-STACK = 0x0039feb0
return address: [0x0009e78a]; contents of:
0x0009e760: 6f46 3208 3229 3046 6480 b130 b170 3076
0x0009e770: e140 0009 e100 e7ac 6466 b128 b16e bca9
0x0009e780: e50a 0053 6005 b0f5 3041 [e512] 0026 0062
0x0009e790: 0c00 3038 1404 3006 e303 b5d8 6cc6 0127
SEQUENCER STATUS:
SEQSTAT: 00000027 IPEND: 8030 SYSCFG: 0006
HWERRCAUSE: 0x0
EXCAUSE : 0x27
physical IVG15 asserted : <0xffa011c8> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa00250> { _timer_interrupt + 0x0 }
logical irq 18 mapped : <0x00091f10> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 19 mapped : <0x00091cfc> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 24 mapped : <0x0009b5d0> { _bf537mac_interrupt + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x0321fc8c> /* unknown address */
RETX: <0x0009e78a> { _spi_sync + 0x2e }
RETS: <0x0032410e> { :snd_ad1836:_ad1836_spi_write + 0x7a }
PC : <0x0009e78a> { _spi_sync + 0x2e }
DCPLB_FAULT_ADDR: <0x00000098> /* Maybe null pointer? */
ICPLB_FAULT_ADDR: <0x0009e78a> { _spi_sync + 0x2e }
PROCESSOR STATE:
R0 : 0379fe60 R1 : 0321fcc4 R2 : 0321fcb8 R3 : 00000068
R4 : 03188850 R5 : 00000000 R6 : 0321fc98 R7 : 0000103f
P0 : 0379fbc0 P1 : 0379fe60 P2 : 00000000 P3 : 00452000
P4 : 00452000 P5 : 0321fcc4 FP : 0321fe3c SP : 0321fbb0
LB0: 0007ea66 LT0: 0007ea5e LC0: 00000000
LB1: 000aab8e LT1: 000aab8e LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 037dbc88
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 030fbc58
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : ffff2a5b
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 0000006d A0.x: 00000000 A1.w: 0000006d A1.x: 00000000
USP : 0039fdc0 ASTAT: 02002000
Hardware Trace:
0 Target : <0x000047ac> { _trap_c + 0x0 }
Source : <0xffa00ad4> { _exception_to_level5 + 0xb4 }
1 Target : <0xffa00a20> { _exception_to_level5 + 0x0 }
Source : <0xffa00978> { _ex_trap_c + 0x5c }
2 Target : <0xffa0091c> { _ex_trap_c + 0x0 }
Source : <0xffa007a4> { _ex_workaround_261 + 0x1c }
3 Target : <0xffa00788> { _ex_workaround_261 + 0x0 }
Source : <0xffa00b74> { _trap + 0x28 }
4 Target : <0xffa00b4c> { _trap + 0x0 }
Source : <0xffa008be> { _bfin_return_from_exception + 0xe }
5 Target : <0xffa008b0> { _bfin_return_from_exception + 0x0 }
Source : <0xffa0079a> { _ex_workaround_261 + 0x12 }
6 Target : <0xffa00788> { _ex_workaround_261 + 0x0 }
Source : <0xffa00b74> { _trap + 0x28 }
7 Target : <0xffa00b4c> { _trap + 0x0 }
Source : <0x0009e788> { _spi_sync + 0x2c }
8 Target : <0x0009e75c> { _spi_sync + 0x0 }
Source : <0x0032410c> { :snd_ad1836:_ad1836_spi_write + 0x78 }
9 Target : <0x00324094> { :snd_ad1836:_ad1836_spi_write + 0x0 }
Source : <0x00325822> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0x6b6 }
10 Target : <0x003257fc> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0x690 }
Source : <0x0032584e> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0x6e2 }
11 Target : <0x00325834> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0x6c8 }
Source : <0x00325b8c> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0xa20 }
12 Target : <0x00325b7c> { :snd_ad1836:_bf53x_sport_config_rx_dma + 0xa10 }
Source : <0x00004cd0> { _dma_free_coherent + 0x68 }
13 Target : <0x00004cb0> { _dma_free_coherent + 0x48 }
Source : <0x00004cb6> { _dma_free_coherent + 0x4e }
14 Target : <0x00004cb0> { _dma_free_coherent + 0x48 }
Source : <0x00004cb6> { _dma_free_coherent + 0x4e }
15 Target : <0x00004cb0> { _dma_free_coherent + 0x48 }
Source : <0x00004cb6> { _dma_free_coherent + 0x4e }
Stack from 0321fb90:
0321fbb4 ffa00ad8 0016a788 0016a788 0016a784 0321fc1c 00000008 00000000
0009e78a 00008030 00000027 00000000 0321fc8c 0009e78a 0009e78a 0032410e
0379fe60 02002000 000aab8e 0007ea66 000aab8e 0007ea5e 00000000 00000000
0000006d 00000000 0000006d 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 ffff2a5b 030fbc58 037dbc88 0039fdc0 0321fe3c 0321fcc4 00452000
Call Trace:
[<0000103f>] _init_post+0x27/0xc0
[<000628dc>] _remove_proc_entry+0xc8/0x138
[<0032410e>] _ad1836_spi_write+0x7a/0x84 [snd_ad1836]
[<0000103f>] _init_post+0x27/0xc0
[<00002fff>] _do_signal+0x3db/0xd74
[<000aabac>] _snd_ctl_remove+0x64/0x90
[<0009e7ac>] _spi_complete+0x0/0x4
[<00325824>] _bf53x_sport_config_rx_dma+0x6b8/0xca8 [snd_ad1836]
[<000af286>] _snd_pcm_free+0x56/0x68
[<000a103f>] _input_ff_create+0x7b/0x144
[<00325850>] _bf53x_sport_config_rx_dma+0x6e4/0xca8 [snd_ad1836]
[<003257fc>] _bf53x_sport_config_rx_dma+0x690/0xca8 [snd_ad1836]
[<00001000>] _run_init_process+0x0/0x18
[<000abf9c>] _snd_device_free+0x58/0xa4
[<00002000>] _get_sclk+0x2c/0x58
[<000ac032>] _snd_device_free_all+0x4a/0x50
[<001157cc>] _mutex_lock+0xc/0x40
[<000a897e>] _snd_card_do_free+0x1a/0xcc
[<000a899e>] _snd_card_do_free+0x3a/0xcc
[<000a9384>] _snd_card_free+0xc/0x84
[<000a93f0>] _snd_card_free+0x78/0x84
[<00324456>] _bf53x_sport_done+0x9e/0x1a0 [snd_ad1836]
[<00324456>] _bf53x_sport_done+0x9e/0x1a0 [snd_ad1836]
[<00007c34>] _free_dma+0x0/0xb4
[<00114844>] _klist_del+0x10/0x2c
[<00325f56>] _snd_ad1836_spi_probed+0x142/0xa34 [snd_ad1836]
[<00094b88>] ___device_release_driver+0x38/0x90
[<00094bb6>] ___device_release_driver+0x66/0x90
[<00093fea>] _device_remove_attrs+0x26/0x3c
[<00095064>] _device_release_driver+0x3c/0x7c
[<00094494>] _bus_remove_device+0x48/0x8c
[<0009449e>] _bus_remove_device+0x52/0x8c
[<000944ac>] _bus_remove_device+0x60/0x8c
[<000040d0>] _show_regs+0xf8/0x364
[<00092a6a>] _device_del+0x17a/0x2c0
[<00092a70>] _device_del+0x180/0x2c0
[<000965a2>] _platform_device_del+0x12/0x60
[<00001000>] _run_init_process+0x0/0x18
[<00001000>] _run_init_process+0x0/0x18
[<000968f4>] _platform_device_unregister+0xc/0x18
[<00041400>] _do_ioctl+0x48/0x4c
[<00326860>] _cleanup_module+0x18/0x30 [snd_ad1836]
[<0002695a>] _sys_delete_module+0x142/0x1e8
[<00026992>] _sys_delete_module+0x17a/0x1e8
[<00001fff>] _get_sclk+0x2b/0x58
[<00003633>] _do_signal+0xa0f/0xd74
[<00026818>] _sys_delete_module+0x0/0x1e8
[<0000fffe>] _do_exit+0x402/0x760
[<0018bbaa>] _bfin_serial_console_setup+0x76/0x124
[<00008000>] __l1_sram_alloc+0x4c/0x94
[<0018bbaa>] _bfin_serial_console_setup+0x76/0x124
[<0018bbaa>] _bfin_serial_console_setup+0x76/0x124
Kernel panic - not syncing: Kernel exception
----
Follow-ups
--- Cliff Cai 2008-01-16 03:20:06
All hardware activities have stopped in snd_ad1836_remove ,no hardware operation
is allowed any more.
--- Vivi Li 2008-02-20 07:50:51
OK. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
config.power text/plain 28741 Vivi Li