2009-07-03 03:00:23 Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76731
Hi sir,
When copy a small file from sdram to SD card,the system output many message and dead after about 20 seconds.From cache write back to SD card happen this problem.The Sd card file format is fat32.How to find out the uClinux bug and avoid
this problem?
Output message:
root:/>
root:/> dmesg
Linux version 2.6.30-ADI-2010R1-pre (xiechl@localhost.localdomain) (gcc version 4.1.2 (ADI svn)) #18 Wed Jul 1 22:06:08 CST 2009
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0011ddf0
rodata = 0x0011ddf0-0x001988f8
bss = 0x00199000-0x001ab890
data = 0x001ab890-0x001c0000
stack = 0x001be000-0x001c0000
init = 0x001c0000-0x00665000
available = 0x00665000-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 3
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF518 Rev 0.0
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 80 MHz System Clock
boot memmap: 0000000000665000 - 0000000003eff000 (usable)
On node 0 totalpages: 16127
free_area_init_node: node 0, pgdat 001bc9c4, node_mem_map 00667000
DMA zone: 126 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 16001 pages, LIFO batch:0
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16001
Kernel command line: console=ttyBF0,57600
NR_IRQS:119
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x25
console [ttyBF0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Kernel managed physical pages: 16127
Memory available: 57388k/65536k RAM, (4756k init code, 1139k kernel code, 649k data, 1024k dma, 576k reserved)
Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)
net_namespace: 296 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
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
Setting up Blackfin MMR debugfs
msgmni has been set to 112
io scheduler noop registered (default)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
brd: module loaded
bfin_mii_bus: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc03400, dma channel@5
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
drivers/mmc/host/bfin_sdh.c sdh_init 664
drivers/mmc/host/bfin_sdh.c sdh_probe 504
dma_alloc_init: dma_page @ 0x038d3000 - 256 pages at 0x03f00000
TCP cubic registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0[0]: detected a KSZ8893M switch
dsa slave smi: probed
rtc-bfin rtc-bfin: setting system clock to 1996-09-09 13:27:06 UTC (842275626)
Freeing unused kernel memory: 4756k freed
mmc0: new SD card at address d921
mmcblk0: mmc0:d921 SD02G 1.89 GiB
mmcblk0:
eth1: link up, 100 Mb/s, full duplex
Trying 100/FULL
PHY: 0:03 - Link is Up - 100/Full
Exception context:
Undefined instruction
- May be used to emulate instructions that are not defined for
a particular processor implementation.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=pdflush PID=84
CPU = 0
invalid mm
return address: [0x00093a7e]; contents of:
0x00093a50: a3b0 9331 4f18 e121 0110 5008 e131 0000
0x00093a60: e134 003f 3600 e132 001f e130 0001 e13b
0x00093a70: 0041 3610 345d e139 001f e137 0001 [3c9b]
0x00093a80: e093 006b 2005 3220 9131 67d1 9331 9134
ADSP-BF518-0.0 400(MHz CCLK) 80(MHz SCLK) (mpu off)
Linux version 2.6.30-ADI-2010R1-pre (xiechl@localhost.localdomain) (gcc version 4.1.2 (ADI svn)) #18 Wed Jul 1 22:06:08 CST 2009
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060021 IPEND: 8008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x21
physical IVG3 asserted : <0xffa00624> { _trap + 0x0 }
physical IVG15 asserted : <0xffa00e3c> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa002f8> { _timer_interrupt + 0x0 }
logical irq 21 mapped : <0x000c4b4c> { _bfin_rtc_interrupt + 0x0 }
logical irq 24 mapped : <0x000ce9fc> { _sdh_dma_irq + 0x0 }
logical irq 27 mapped : <0x000c7f20> { _bfin_twi_interrupt_entry + 0x0 }
logical irq 29 mapped : <0x000b2400> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 30 mapped : <0x000b278c> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x000bac44> { _bfin_mac_interrupt + 0x0 }
logical irq 58 mapped : <0x000cea20> { _sdh_stat_irq + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x038dfce8> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x0009418c> { _radix_tree_gang_lookup_tag_slot + 0x74 }
PC : <0x00093a7e> { ___lookup_tag + 0x4a }
DCPLB_FAULT_ADDR: <0x038dfce8> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x00093a7e> { ___lookup_tag + 0x4a }
PROCESSOR STATE:
R0 : 00000110 R1 : 00000110 R2 : 00000000 R3 : 004e1d08
R4 : 00000fff R5 : 0000000e R6 : 00000000 R7 : 00000000
P0 : 004e1dcc P1 : 00000000 P2 : 0000000c P3 : 038dfdcc
P4 : 02339210 P5 : 00000002 FP : 038dfe04 SP : 038dfc0c
LB0: 00096d1a LT0: 00096d1a LC0: 00000000
LB1: 00093efc LT1: 00093ece LC1: 00000000
B0 : 00000110 L0 : 00000000 M0 : 0000003f I0 : 00000001
B1 : 0000001f L1 : 00000000 M1 : 0000000e I1 : 00000000
B2 : 00000110 L2 : 00000000 M2 : 038dfdcc I2 : 0000001f
B3 : 00000041 L3 : 00000000 M3 : 00000001 I3 : 00000002
A0.w: 0000b383 A0.x: 00000000 A1.w: 00000fad A1.x: 00000000
USP : 00000000 ASTAT: 02002000
Hardware Trace:
0 Target : <0x00004ea4> { _trap_c + 0x0 }
Source : <0xffa005b8> { _exception_to_level5 + 0x94 } CALL pcrel
1 Target : <0xffa00524> { _exception_to_level5 + 0x0 }
Source : <0xffa003fc> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa003e4> { _bfin_return_from_exception + 0x0 }
Source : <0xffa00478> { _ex_trap_c + 0x4c } JUMP.S
3 Target : <0xffa0042c> { _ex_trap_c + 0x0 }
Source : <0xffa0067e> { _trap + 0x5a } JUMP (P4)
4 Target : <0xffa00624> { _trap + 0x0 }
Source : <0x00093a7a> { ___lookup_tag + 0x46 } 0xe137
5 Target : <0x00093a34> { ___lookup_tag + 0x0 }
Source : <0x00094188> { _radix_tree_gang_lookup_tag_slot + 0x70 } CALL pcrel
6 Target : <0x00094174> { _radix_tree_gang_lookup_tag_slot + 0x5c }
Source : <0x0009416a> { _radix_tree_gang_lookup_tag_slot + 0x52 } JUMP.S
7 Target : <0x00094118> { _radix_tree_gang_lookup_tag_slot + 0x0 }
Source : <0x0002e23a> { _find_get_pages_tag + 0x26 } CALL pcrel
8 Target : <0x0002e228> { _find_get_pages_tag + 0x14 }
Source : <0x0002e226> { _find_get_pages_tag + 0x12 } JUMP.S
9 Target : <0x0002e214> { _find_get_pages_tag + 0x0 }
Source : <0x0003530e> { _pagevec_lookup_tag + 0x1a } CALL pcrel
10 Target : <0x000352f4> { _pagevec_lookup_tag + 0x0 }
Source : <0x00033480> { _write_cache_pages + 0xb0 } CALL pcrel
11 Target : <0x00033428> { _write_cache_pages + 0x58 }
Source : <0x0003340a> { _write_cache_pages + 0x3a } IF CC JUMP
12 Target : <0x00033408> { _write_cache_pages + 0x38 }
Source : <0x00033670> { _write_cache_pages + 0x2a0 } JUMP.S
13 Target : <0x00033668> { _write_cache_pages + 0x298 }
Source : <0x000333f4> { _write_cache_pages + 0x24 } IF !CC JUMP
14 Target : <0x000333d0> { _write_cache_pages + 0x0 }
Source : <0x0005eb24> { _mpage_writepages + 0x2c } CALL pcrel
15 Target : <0x0005eaf8> { _mpage_writepages + 0x0 }
Source : <0x0007d27c> { _fat_writepages + 0x8 } JUMP.L
Kernel Stack
Stack info:
SP: [0x038dff18] <0x038dff18> /* kernel dynamic memory */
FP: (0x038dff88)
Memory from 0x038dff10 to 038e0000
038dff10: 038dff60 <00034290>[001a4680] 038dff64 001a4694 001aef4c 039ddae0 001a4640
038dff30: 00000000 00000000 00000000 00000000 00000000 00000400 00000000 00000000
038dff50: 00000000 00000000 00000000 00000031 00000b38 0000059c <000348c4> 038dffcc
038dff70: 038dffc0 001b2508 001aef4c 001a4644 001a4640 00000000 (038dffa0)<0000ae00>
038dff90: 00000000 00000000 <00034a2c> 00034a10 (00000000) 00000000 00000000 00000000
038dffb0: 00000000 00034a10 00000000 <038de000> 03e993e0 000341ec 00000000 038dffcc
038dffd0: 038dffcc 0023ea7a <0001ece8> 00000000 00000000 00000000 <0000146e> 00000000
038dfff0: 00000000 00000000 ffffffff 00000006 464c457f
Return addresses in stack:
address : <0x00034290> { _background_writeout + 0xa4 }
address : <0x000348c4> { ___pdflush + 0xc4 }
frame 1 : <0x0000ae00> { _set_user_nice + 0xa0 }
address : <0x00034a2c> { _pdflush + 0x1c }
address : <0x038de000> /* kernel dynamic memory */
address : <0x0001ece8> { _kthread + 0x54 }
address : <0x0000146e> { _kernel_thread_helper + 0x6 }
Modules linked in:
Kernel panic - not syncing: Kernel exception
Hardware Trace:
Stack info:
SP: [0x038dfb24] <0x038dfb24> /* kernel dynamic memory */
FP: (0x038dfd98)
Memory from 0x038dfb20 to 038e0000
038dfb20: 038dfdcc [0016d544]<0000f574> 0019fc0c 0016d544 0019e49e 0019e49e 0019e49e
038dfb40: 038dfb60 038dfb60 <0000521a> 038dfc0c ffe02014 038dfdcc 0016cd44 038dfdd4
038dfb60: 001adfdc 0000003f 001adfdc 0000003f 00030001 0016cd44 00030001 001adfdc
038dfb80: 0000003f 603b6800 <0008b72c> 00030001 03e8b0d8 00000001 01000001 00000000
038dfba0: 6c620910 000f4940 0000c810 00000010 00000001 <0008b844> 002e67c0 002e67c0
038dfbc0: 030e581c 03e8b0c8 00000000 00000005 00000001 00000070 03ea3a20 03ea3a20
038dfbe0: 00000010 <0005b49e><ffa005bc> 0019b000 00008008 00000006 0000000e 00000fff
038dfc00: 0000000e 00000fff 00000480 00000480 00008008 00060021 00000000 038dfce8
038dfc20: 00000480 00093a7e <0009418c> 00000110 02002000 00093efc 00096d1a 00093ece
038dfc40: 00096d1a 00000000 00000000 00000fad 00000000 0000b383 00000000 00000041
038dfc60: 00000110 0000001f 00000110 00000000 00000000 00000000 00000000 00000001
038dfc80: 038dfdcc 0000000e 0000003f 00000002 0000001f 00000000 00000001 00000000
038dfca0: 038dfe04 00000002 02339210 038dfdcc 0000000c 00000000 004e1dcc 00000000
038dfcc0: 00000000 0000000e 00000fff 004e1d08 00000000 00000110 00000110 00000110
038dfce0: 004e1dcc 00000006 00000006 038dfe04 02339210 038dfd24 038dfdcc 00000000
038dfd00: 00000000 0000000e 00000fff 0000000e 00000fff 038dfde8 0000000e 038dfd24
038dfd20: 00000000 038dfd2c <0002e23e> 038dfdcc 038dff38 038dfdcc 00000000 00000000
038dfd40: 004e1d0c 00000000 038dfde8 038dff3c 038dfde8 0000000e 00000000 004e1d08
038dfd60:<00035312> 038dfdcc 038dff38 ffffffff 00000000 00000000 00000000 00000400
038dfd80: 038dfde8 038dff3c ffffffff 0000000e 038dfdcc <00033484>(038dff38)<00033484>
038dfda0: 038dff3c 006c8c60 00000000 0000000e ffffffff 03e8b164 00000000 00000001
038dfdc0: 00000000 00000000 00000000 ffffffff 03e8b164 00000000 00000001 00000000
038dfde0: 00000000 00000000 00000000 <ffa002c6><00057c18><0007e352><00033dc6><00671ce0>
038dfe00: 006f8cb0 00000000 038dff38 <0005eb28> 038dff38 038dff38 03b60c00 00000007
038dfe20: 00000000 00000000 004e1d08 038dff3c 038dff38 0005e60c 038dfe3c 00000000
038dfe40: 00000000 0007d048 00000001 <000336d4> 00000007 03b60c00 00000007 004e1ecc
038dfe60:<00053ac8> 004e1c70 004e1dc4 00000000 004e1dc4 <00053bec> 004e1c70 038dff38
038dfe80:<038de000> 00000000 0023ec1b 00000000 ffff4b7a 00000000 00564000 001b2a38
038dfea0: 001b2508 <00057b1c> 00564000 0000003f 001a4644 00615f30 <00057c18><00053ee6>
038dfec0: 004e1c70 03e8b164 <038de000> 00000000 0023ec1b 00000000 <0000ac14> 001adaec
038dfee0:<00033906> 001acfa0 <00054136> 03b60c00 001b2a38 038dff38 03b60c3c 00000000
038dff00: 00000000 038dff60 001acfa0 <0003425e> 038dff60 <00034290> 001a4680 038dff64
038dff20: 001a4694 001aef4c 039ddae0 001a4640 00000000 00000000 (00000000) 00000000
038dff40: 00000000 00000400 00000000 00000000 00000000 00000000 00000000 00000031
038dff60: 00000b38 0000059c <000348c4> 038dffcc 038dffc0 001b2508 001aef4c 001a4644
038dff80: 001a4640 00000000 038dffa0 <0000ae00> 00000000 00000000 <00034a2c> 00034a10
038dffa0: 00000000 00000000 00000000 00000000 00000000 00034a10 00000000 <038de000>
038dffc0: 03e993e0 000341ec 00000000 038dffcc 038dffcc 0023ea7a <0001ece8> 00000000
038dffe0: 00000000 00000000 <0000146e> 00000000 00000000 00000000 ffffffff 00000006
038e0000: 464c457f
Return addresses in stack:
address : <0x0000f574> { _panic + 0x4c }
address : <0x0000521a> { _trap_c + 0x376 }
address : <0x0008b72c> { _get_request + 0xb0 }
address : <0x0008b844> { _get_request_wait + 0x18 }
address : <0x0005b49e> { _bio_phys_segments + 0x22 }
address : <0xffa005bc> { _exception_to_level5 + 0x98 }
address : <0x0009418c> { _radix_tree_gang_lookup_tag_slot + 0x74 }
address : <0x0002e23e> { _find_get_pages_tag + 0x2a }
address : <0x00035312> { _pagevec_lookup_tag + 0x1e }
address : <0x00033484> { _write_cache_pages + 0xb4 }
frame 1 : <0x00033484> { _write_cache_pages + 0xb4 }
address : <0xffa002c6> { _asm_do_IRQ + 0x36 }
address : <0x00057c18> { ___getblk + 0x10 }
address : <0x0007e352> { _fat_time_unix2fat + 0x1e6 }
address : <0x00033dc6> { _task_dirty_inc + 0x1e }
address : <0x00671ce0> /* kernel dynamic memory */
address : <0x0005eb28> { _mpage_writepages + 0x30 }
address : <0x000336d4> { _do_writepages + 0x2c }
address : <0x00053ac8> { ___sync_single_inode + 0x34 }
address : <0x00053bec> { ___writeback_single_inode + 0x34 }
address : <0x038de000> /* kernel dynamic memory */
address : <0x00057b1c> { ___find_get_block + 0x20 }
address : <0x00057c18> { ___getblk + 0x10 }
address : <0x00053ee6> { _generic_sync_sb_inodes + 0x122 }
address : <0x038de000> /* kernel dynamic memory */
address : <0x0000ac14> { _dequeue_entity + 0x2c }
address : <0x00033906> { _get_dirty_limits + 0x16 }
address : <0x00054136> { _writeback_inodes + 0x6a }
address : <0x0003425e> { _background_writeout + 0x72 }
address : <0x00034290> { _background_writeout + 0xa4 }
address : <0x000348c4> { ___pdflush + 0xc4 }
address : <0x0000ae00> { _set_user_nice + 0xa0 }
address : <0x00034a2c> { _pdflush + 0x1c }
address : <0x038de000> /* kernel dynamic memory */
address : <0x0001ece8> { _kthread + 0x54 }
address : <0x0000146e> { _kernel_thread_helper + 0x6 }
--Bill
QuoteReplyEditDelete
2009-07-03 09:55:23 Re: Write data to BF518 SD with exception context
Robin Getz (UNITED STATES)
Message: 76776
Bill:
Can you do a "make bugreport", and post the bugreport.tgz that it makes?
The next thing to do - is do not use trunk - use the 2009R1 branch.
QuoteReplyEditDelete
2009-07-05 21:36:11 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76813
Robin,
Thank you.I post bugreport.tar.gz.When I add debug message in lib/radix-tree.c __lookup_tag function,It is ok when copy file to sd card.It is problem to link 2009R1.
--Bill
bugreport.tar.gz
QuoteReplyEditDelete
2009-07-05 22:24:13 Re: Write data to BF518 SD with exception context
Yi Li (CHINA)
Message: 76815
Bill,
If using 2009R1, can you reproduce your problem?
-Yi
QuoteReplyEditDelete
2009-07-05 22:47:00 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76816
Yi,
I will try 2009R1 to test.But It is trouble to download blackfin.uclinux.org/gf/download/frsrelease/380/6509/uClinux-dist-2009R1-RC1.tar.bz2 with "Invalid/empty data or corrupted file" message.
--Bill
QuoteReplyEditDelete
2009-07-07 03:32:02 Re: Write data to BF518 SD with exception context
Yi Li (CHINA)
Message: 76844
Bill,
I tested this link and it works fine:
blackfin.uclinux.org/gf/download/frsrelease/380/6527/uClinux-dist-2009R1-RC1.tar.bz2
-Yi
QuoteReplyEditDelete
2009-07-07 04:40:58 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76880
Yi,
Thank you.I have been working in 2009R1-RC1,But the 518 mmc host also have this promblem.It is no problem using blackfin.uclinux.org/gf/download/frsrelease/380/6515/uImage_bf518_ezbrd to write sd card.Compareed both image dmesg information,it is almost same ecept for
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00116a50
rodata = 0x00116a50-0x00169918
bss = 0x0016a000-0x0017c358
data = 0x0017c358-0x00190000
stack = 0x0018e000-0x00190000
init = 0x00190000-0x00722000
available = 0x00722000-0x03eff000
DMA Zone = 0x03f00000-0x04000000
It is puzzled to both image file to induce two result to write sd card.
--Bill
QuoteReplyEditDelete
2009-07-07 05:17:49 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76881
Hi Sir,
Because of write sd card with exception in 2009R1+518,It is happened exception in lib/radix-tree.c
static unsigned int
__lookup_tag(struct radix_tree_node *slot, void ***results, unsigned long index,
unsigned int max_items, unsigned long *next_index, unsigned int tag)
{
unsigned int nr_found = 0;
unsigned int shift, height;
height = slot->height;
if (height == 0)
goto out;
shift = (height-1) * RADIX_TREE_MAP_SHIFT;
while (height > 0) {
unsigned long i = (index >> shift) & RADIX_TREE_MAP_MASK ;
#ifdef SD_DEBU
printk(KERN_DEBUG "%s %s %d i=%d RADIX_TREE_MAP_MASK=%d index=%d\n",__FILE__,__FUNCTION__,__LINE__,i,RADIX_TREE_MAP_MASK,index);
#endif
for (;;) {
if (tag_get(slot, tag, i))
break;
index &= ~((1UL << shift) - 1);
index += 1UL << shift;
if (index == 0)
goto out; /* 32-bit wraparound */
i++;
if (i == RADIX_TREE_MAP_SIZE)
goto out;
}
height--;
if (height == 0) { /* Bottom level: grab some items */
unsigned long j = index & RADIX_TREE_MAP_MASK;
for ( ; j < RADIX_TREE_MAP_SIZE; j++) {
index++;
if (!tag_get(slot, tag, j))
continue;
/*
* Even though the tag was found set, we need to
* recheck that we have a non-NULL node, because
* if this lookup is lockless, it may have been
* subsequently deleted.
*
* Similar care must be taken in any place that
* lookup ->slots[x] without a lock (ie. can't
* rely on its value remaining the same).
*/
if (slot->slots[j]) {
results[nr_found++] = &(slot->slots[j]);
if (nr_found == max_items)
goto out;
}
}
}
shift -= RADIX_TREE_MAP_SHIFT;
slot = rcu_dereference(slot->slots[i]);
if (slot == NULL)
break;
}
out:
*next_index = index;
return nr_found;
}
It is not reappear exception write data to sd card when added debug code with red. I not found bug in __lookup_tag function.Who can help me fix thi bug? Thank you.
--Bill
QuoteReplyEditDelete
2009-07-07 06:08:55 Re: Write data to BF518 SD with exception context
Yi Li (CHINA)
Message: 76882
Please make sure you are using 2009R1 toolchain (2009R1_RC9). You can download from: blackfin.uclinux.org/gf/project/toolchain/frs/?action=FrsReleaseBrowse&frs_package_id=74.
If you are using 2009R1 branch kernel. also 2009R1_RC9 toolchain, and you still see the problem, you can do "make bugreport" under uclinux-dist/ and post bugreport.tgz here.
We tested the SD host on BF518 everyday and it works well, so we need you configuration to reproduce.
-Yi
QuoteReplyEditDelete
2009-07-07 06:48:07 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76883
Yi,
Thank you. I will install 2009R1 toolchain.Please help me analyze this assembler code.
Undefined instruction
- May be used to emulate instructions that are not defined for
a particular processor implementation.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=pdflush PID=77
CPU = 0
invalid mm
return address: [0x0008893c]; contents of:
0x00088910: 05e3 3218 014f a2f0 3609 3600 915d 0c45
0x00088920: 1843 5cad a370 5b12 4f18 6fd4 e130 0000
0x00088930: 3410 344d e133 001f e134 0001 [3c99] e093
0x00088940: 007d 2003 3218 6fd4 304c 3002 4048 61f9
ADSP-BF518-0.0 400(MHz CCLK) 80(MHz SCLK) (mpu off)
Linux version 2.6.28.10-ADI-2009R1
Built with gcc version 4.1.2 (ADI svn)
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060021 IPEND: 8030 SYSCFG: 0006
EXCAUSE : 0x21
interrupts disabled
physical IVG5 asserted : <0xffa00b90> { _evt_ivhw + 0x0 }
physical IVG15 asserted : <0xffa00de0> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa00328> { _timer_interrupt + 0x0 }
logical irq 21 mapped : <0x000b68cc> { _bfin_rtc_interrupt + 0x0 }
logical irq 24 mapped : <0x000c0e70> { _sdh_dma_irq + 0x0 }
logical irq 27 mapped : <0x000b93a0> { _bfin_twi_interrupt_entry + 0x0 }
logical irq 29 mapped : <0x000a4ed4> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 30 mapped : <0x000a5210> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x000ace54> { _bfin_mac_interrupt + 0x0 }
logical irq 58 mapped : <0x000c0e94> { _sdh_stat_irq + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x03bd7d24> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x000891a0> { _radix_tree_gang_lookup_tag_slot + 0x74 }
PC : <0x0008893c> { ___lookup_tag + 0x2c }
DCPLB_FAULT_ADDR: <0x03bd7d58> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x0008893c> { ___lookup_tag + 0x2c }
00088910 <___lookup_tag>:
88910: e3 05 [--SP] = (R7:4, P5:3);
88912: 18 32 P3 = R0;
88914: 4f 01 [--SP] = FP;
88916: f0 a2 R0 = [SP + 0x2c];
88918: 09 36 B1 = R1;
8891a: 00 36 B0 = R0;
8891c: 5d 91 P5 = [P3];
8891e: 45 0c CC = P5 == 0x0;
88920: 43 18 IF CC JUMP 0x889a6 <___lookup_tag+0x96>;
88922: ad 5c P2 = P5 + (P5 << 0x1);
88924: 70 a3 R0 = [SP + 0x34];
88926: 12 5b P4 = P2 << 0x1;
88928: 18 4f R0 <<= 0x3;
8892a: d4 6f P4 += -0x6; /* ( -6) */
8892c: 30 e1 00 00 I0 = 0x0 (X); /* I0=0x0 <__ebss_l2>( 0) */
88930: 10 34 I2 = R0;
88932: 4d 34 I1 = P5;
88934: 33 e1 1f 00 I3 = 0x1f (X); /* I3=0x1f( 31) */
88938: 34 e1 01 00 M0 = 0x1 (X); /* M0=0x1( 1) */
8893c: 99 3c LC1 = I1;
8893e: 93 e0 7d 00 LSETUP(0x88944 <___lookup_tag+0x34>, 0x88a38 <___lookup_tag+0x128>) LC1;
88942: 03 20 JUMP.S 0x88948 <___lookup_tag+0x38>;
88944: 18 32 P3 = R0;
88946: d4 6f P4 += -0x6; /* ( -6) */
88948: 4c 30 R1 = P4;
8894a: 02 30 R0 = R2;
8894c: 48 40 R0 >>= R1;
8894e: f9 61 R1 = 0x3f (X); /* R1=0x3f( 63) */
88950: 08 54 R0 = R0 & R1;
What wrong is in 8893c: 99 3c LC1 = I1;
--Bill
QuoteReplyEditDelete
2009-07-07 08:13:00 Re: Write data to BF518 SD with exception context
Robin Getz (UNITED STATES)
Message: 76885
Bill:
Exactly which toolchain did you use to build that code? (it is wrong, and needs a bug fixed).
-Robin
QuoteReplyEditDelete
2009-07-07 08:15:14 Re: Write data to BF518 SD with exception context
Robin Getz (UNITED STATES)
Message: 76886
Bill:
When I use the latest toolchain:
> cat foo.S
LC1 = I1;
> bfin-elf-as foo.S -o foo
foo.S: Assembler messages:
foo.S:1: Error: Register mismatch.
Nothing should be generating that assembly - since _it_is_ an illegal instruction.
-Robin
QuoteReplyEditDelete
2009-07-09 06:32:44 Re: Write data to BF518 SD with exception context
Bill Xie (CHINA)
Message: 76964
Robin,
Thank you.It is ok with toolchain 2009R1-RC9 to compile uClinux when write data to sd card.
--Bill