[#4766] Kernel Crash: drivers/mmc/host/bfin_sdh.c
Submitted By: Dominik Herwald
Open Date
2008-12-30 09:42:05 Close Date
2009-04-06 22:09:54
Priority:
Medium Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
Bluetechnix CM
Processor:
BF548 Silicon Revision:
0.1
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
Trunk
App binary format:
N/A
Summary: Kernel Crash: drivers/mmc/host/bfin_sdh.c
Details:
Revision 5918 of drivers/mmc/host/bfin_sdh.c:
blackfin.uclinux.org/gf/project/linux-kernel/scmsvn/?action=browse&path=%2Ftrunk%2Fdrivers%2Fmmc%2Fhost%2Fbfin_sdh.c&view=log
works with no problems.
But with all later revisions up to 5928 I get a Kernel Panic / Null Pointer during boot:
## Booting image at 01000000 ...
Image Name: Linux-2.6.28-rc2-ADI-2009R1-pre-
Created: 2008-12-30 14:31:41 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 6466672 Bytes = 6.2 MB
Load Address: 00001000
Entry Point: 0023cf18
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 23cf18
Linux version 2.6.28-rc2-ADI-2009R1-pre-svn5932 (dsh@dsh-workstation) (gcc versi
on 4.1.2 (ADI svn)) #270 Tue Dec 30 15:31:37 CET 2008
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00189b20
rodata = 0x00189b20-0x00206c44
bss = 0x00206c50-0x0021bcac
data = 0x0021bcac-0x00236000
stack = 0x00234000-0x00236000
init = 0x00236000-0x00cfa000
available = 0x00cfa000-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF548 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
Data Cache Enabled for CPU0 (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16001
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,115200 cons
ole=tty0 console=ttyBF0,115200 ip=192.168.10.48:192.168.10.11:192.168.10.1:255.2
55.255.0:cm-bf548-test:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 50640k/65536k RAM, (11024k init code, 1570k kernel code, 690k
data, 1024k dma, 584k reserved)
Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)
Blackfin L2 SRAM: 128 KB (128 KB free)
PDA for CPU0 reserved at 002085fc
net_namespace: 484 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
cm_bf548_init(): registering device resources
SCSI subsystem initialized
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
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
NET: Registered protocol family 1
msgmni has been set to 98
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-dma: initialized
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART
brd: module loaded
smsc911x: Driver version 2007-07-13.
eth0: SMSC911x MAC Address: 92:68:10:48:00:00
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
physmap platform flash device: 00800000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7e0000
No RedBoot partition table detected in physmap-flash.0
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "bootloader(nor)"
mtd: Giving out device 0 to bootloader(nor)
0x00040000-0x00440000 : "linux kernel(nor)"
mtd: Giving out device 1 to linux kernel(nor)
0x00440000-0x00800000 : "file system(nor)"
mtd: Giving out device 2 to file system(nor)
m25p80 spi0.1: found m25p80, expected m25p16
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b
ase@ffc00500, dma channel@4
bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b
ase@ffc02300, dma channel@5
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
NULL pointer access
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=swapper PID=1
CPU = 0
invalid mm
return address: [0x00117f8c]; contents of:
0x00117f60: 0057 6018 4fa0 e126 1000 e62e 0056 e628
0x00117f70: 0050 e3f7 4f8d 4e48 e628 004e e3f7 4f88
0x00117f80: e628 004f e72d 0071 e12a 01c4 [a058] 5b15
0x00117f90: b0e0 9119 b161 e141 001e e101 dc18 b0f1
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060027 IPEND: 8030 SYSCFG: 0006
EXCAUSE : 0x27
physical IVG15 asserted : <0xffa00d58> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa00364> { _timer_interrupt + 0x0 }
logical irq 14 mapped : <0x0010cfa4> { _bfin_rtc_interrupt + 0x0 }
logical irq 173 mapped : <0x000e43cc> { _smsc911x_irqhandler + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x03ee7dc4> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00117f80> { _sdh_probe + 0x60 }
PC : <0x00117f8c> { _sdh_probe + 0x6c }
DCPLB_FAULT_ADDR: <0x00000004> /* Maybe null pointer? */
ICPLB_FAULT_ADDR: <0x00117f8c> { _sdh_probe + 0x6c }
PROCESSOR STATE:
R0 : 07d2b750 R1 : 03360800 R2 : 00000001 R3 : 00000002
R4 : 00000000 R5 : 0022efb8 R6 : 00001000 R7 : 0021d91c
P0 : ffffffff P1 : 03360990 P2 : 000001c4 P3 : 00000000
P4 : 0022efb8 P5 : 03360800 FP : 0021d870 SP : 03ee7ce8
LB0: 000c971c LT0: 000c971c LC0: 00000000
LB1: 00017ca2 LT1: 00017c8c LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 0020a1b4
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 032cdd4c
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 00000000 ASTAT: 00003004
Hardware Trace:
0 Target : <0x00004a00> { _trap_c + 0x0 }
Source : <0xffa006ba> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa0061c> { _exception_to_level5 + 0x0 }
Source : <0xffa004ee> { _bfin_return_from_exception + 0x6 } RTX
2 Target : <0xffa004e8> { _bfin_return_from_exception + 0x0 }
Source : <0xffa00576> { _ex_trap_c + 0x66 } JUMP.S
3 Target : <0xffa00510> { _ex_trap_c + 0x0 }
Source : <0xffa00746> { _trap + 0x2a } JUMP (P4)
4 Target : <0xffa0071c> { _trap + 0x0 }
Source : <0x00117f88> { _sdh_probe + 0x68 } 0xe12a
5 Target : <0x00117f80> { _sdh_probe + 0x60 }
Source : <0x00001ed2> { _get_sclk + 0x46 } RTS
6 Target : <0x00001ecc> { _get_sclk + 0x40 }
Source : <0x00001e9e> { _get_sclk + 0x12 } IF !CC JUMP
7 Target : <0x00001e8c> { _get_sclk + 0x0 }
Source : <0x00117f7c> { _sdh_probe + 0x5c } CALL pcrel
8 Target : <0x00117f76> { _sdh_probe + 0x56 }
Source : <0x00001ed2> { _get_sclk + 0x46 } RTS
9 Target : <0x00001ecc> { _get_sclk + 0x40 }
Source : <0x00001e9e> { _get_sclk + 0x12 } IF !CC JUMP
10 Target : <0x00001e8c> { _get_sclk + 0x0 }
Source : <0x00117f72> { _sdh_probe + 0x52 } CALL pcrel
11 Target : <0x00117f3a> { _sdh_probe + 0x1a }
Source : <0x00111dec> { _mmc_alloc_host + 0xf4 } RTS
12 Target : <0x00111dc0> { _mmc_alloc_host + 0xc8 }
Source : <0x00017132> { _init_timer + 0x12 } RTS
13 Target : <0x00017120> { _init_timer + 0x0 }
Source : <0x00111dbc> { _mmc_alloc_host + 0xc4 } CALL pcrel
14 Target : <0x00111d94> { _mmc_alloc_host + 0x9c }
Source : <0x0001faa8> { _init_waitqueue_head + 0x8 } RTS
15 Target : <0x0001faa0> { _init_waitqueue_head + 0x0 }
Source : <0x00111d90> { _mmc_alloc_host + 0x98 } CALL pcrel
Kernel Stack
Stack info:
SP: [0x03ee7d10] <0x03ee7d10> /* kernel dynamic memory */
FP: (0x03ee7df4)
Memory from 0x03ee7d10 to 03ee8000
03ee7d10:[00017ca2] 000c971c 00017c8c 000c971c 00000000 00000000 00000000
00000000
03ee7d30: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
03ee7d50: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000
03ee7d70: 032cdd4c 0020a1b4 00000000 0021d870 03360800 0022efb8 00000000
000001c4
03ee7d90: 03360990 ffffffff 0021d91c 00001000 0022efb8 00000000 00000002
00000001
03ee7db0: 03360800 07d2b750 07d2b750 ffffffff 00000006 0024de6c 0022efb8 <
0007192a>
03ee7dd0: 00000001 <000dd440> 0022efb8 <000dd54a> 0021d870 0022efb8 00218f1c
0021d91c
03ee7df0: 000000ac (00000000)<00186ef2><00186f1a> 0021d77c <000dd6a4> 0021d870
0022efb8
03ee7e10: 0024de6c 0021d91c 0022d3d4 0024de6c 00000000 <000dcd40> 000dd634
0022d3d4
03ee7e30: 00000000 03ee7e44 00e024e0 <000c5288> 00206c74 03efb5d8 0021d8b8 <
000dd3f6>
03ee7e50: 00206c74 00000000 00e024e0 00000000 03ee7e84 03ee7e84 <000dd100>
000dd634
03ee7e70:<000dd11e> 00000000 <000dd800> 00206c74 001e5a38 001c8cd0 00000000 <
000dd800>
03ee7e90: 00206c74 0022efb8 0024de6c 00000000 00000000 00244cbc 00000000
00000000
03ee7eb0:<0000102c> 00206c74 00244d10 00000000 00000000 00000000 00000000
00000000
03ee7ed0: 03efd220 ffffffff 03ee7f08 <000c45be> 00223d54 002114e0 00211ff0 <
000c4632>
03ee7ef0: 03efb6a4 00000000 0000021c 00211ff0 000000d0 03ee7f08 03ee3f28
00000000
03ee7f10: 00000000 0024de6c <000c4796> 00211ff0 002114e0 00000000 <0006c8cc>
00223d54
03ee7f30: 002114e0 0024de6c 03ee7f5c 03eccc20 03eca120 00000000 00000000
00211ff0
03ee7f50: 03ee7f5c <001cbb10><0006caf4> 0000021c <0006cb02> 00223d54 03eccc20
00004000
03ee7f70: 00000000 00000000 03ee7f9c 7fffff00 00000001 <0002d982> 03ee7f9c
00000106
03ee7f90:<0006cbc6> 0024dbcc 03eca120 00323632 00000000 00240000 <0002d9de>
0021ffe8
03ee7fb0: 0024dbcc 00000106 00223d54 <002363b0> 0024de0c 0024dbcc 00000000
00000000
03ee7fd0: 00000000 00000000 00000000 00000000 00000000 <0000145e> 00000000
00000000
03ee7ff0: 00000000 00000000 ffffffff 00000006 03ef73e8
Return addresses in stack:
address : <0x0007192a> { _create_dir + 0x3a }
address : <0x000dd440> { _driver_sysfs_add + 0x44 }
address : <0x000dd54a> { _driver_probe_device + 0x82 }
frame 1 : <0x00186ef2> { _klist_next + 0x26 }
address : <0x00186f1a> { _klist_next + 0x4e }
address : <0x000dd6a4> { ___driver_attach + 0x70 }
address : <0x000dcd40> { _bus_for_each_dev + 0x3c }
address : <0x000c5288> { _kobject_init_and_add + 0x24 }
address : <0x000dd3f6> { _driver_attach + 0x1a }
address : <0x000dd100> { _bus_add_driver + 0x64 }
address : <0x000dd11e> { _bus_add_driver + 0x82 }
address : <0x000dd800> { _driver_register + 0x40 }
address : <0x000dd800> { _driver_register + 0x40 }
address : <0x0000102c> { _do_one_initcall + 0x2c }
address : <0x000c45be> { _ida_get_new_above + 0x96 }
address : <0x000c4632> { _ida_get_new_above + 0x10a }
address : <0x000c4796> { _ida_pre_get + 0xe }
address : <0x0006c8cc> { _proc_register + 0x30 }
address : <0x001cbb10> /* kernel dynamic memory */
address : <0x0006caf4> { _create_proc_entry + 0x3c }
address : <0x0006cb02> { _create_proc_entry + 0x4a }
address : <0x0002d982> { _register_irq_proc + 0x7e }
address : <0x0006cbc6> { _proc_mkdir_mode + 0x2e }
address : <0x0002d9de> { _init_irq_proc + 0x42 }
address : <0x002363b0> { _kernel_init + 0x84 }
address : <0x0000145e> { _kernel_thread_helper + 0x6 }
Modules linked in:
Kernel panic - not syncing: Kernel exception
Follow-ups
--- Dominik Herwald 2008-12-30 10:09:32
Correction: It is not Rev. 5918 but 5914 which works, with 5918 and all later
ones the crash occurs.
--- Cliff Cai 2008-12-30 22:58:32
it works for me,I tested it with sdio card and sd memory card.
Would you please re-check out kernel tree and have a try?
Cliff
--- Dominik Herwald 2008-12-31 09:46:31
I did a complete new checkout of the Kernel Source now - Revision 5936.
Some SDH definitions were missing in the Bluetechnix Board file.
Once I added them, the Kernel Crash does not happen anymore! Thanks!
So the Problem was this Bluetechnix Board File and not your Code.
--- Mike Frysinger 2008-12-31 09:53:33
please post the changes you made to the kernel to get things working
--- Dominik Herwald 2008-12-31 10:13:00
I changed linux-2.6.x/arch/blackfin/mach-bf548/boards/cm_bf548.c
Here's the diff:
--- cm_bf548_orig.c 2008-12-28 22:57:11.000000000 +0100
+++ cm_bf548.c 2008-12-31 16:11:35.000000000 +0100
@@ -43,6 +43,7 @@
#include <asm/gpio.h>
#include <asm/nand.h>
#include <asm/portmux.h>
+#include <asm/bfin_sdh.h>
#include <mach/bf54x_keys.h>
#include <asm/dpmc.h>
#include <linux/input.h>
@@ -449,9 +450,19 @@
#endif
#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
+
+static struct bfin_sd_host bfin_sdh_data = {
+ .dma_chan = CH_SDH,
+ .irq_int0 = IRQ_SDH_MASK0,
+ .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0},
+};
+
static struct platform_device bf54x_sdh_device = {
.name = "bfin-sdh",
.id = 0,
+ .dev = {
+ .platform_data = &bfin_sdh_data,
+ },
};
#endif
--- Mike Frysinger 2008-12-31 17:55:36
thanks, that points out the original bug and highlights a new one. both should
be fixed now.
--- Dominik Herwald 2009-01-01 10:35:34
Mike, I think you forgot to #include <asm/bfin_sdh.h> and thus build of
current SVN fails.
--- Mike Frysinger 2009-01-01 17:36:51
thanks, added that as well
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found