[#4813] cp on nand device fails now
Submitted By: Mingquan Pan
Open Date
2009-01-16 03:13:27 Close Date
2009-02-04 04:39:43
Priority:
Medium Assignee:
Yi Li
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF548 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
Nov 11
App binary format:
N/A
Summary: cp on nand device fails now
Details:
cp on nand device fails now. It happens on both bf537 stamp and 548 ezkit.
dmesg
Linux version 2.6.28-ADI-2009R1-pre-svn6014 (test@uclinux55-bf537-cf-spi) (gcc version 4.1.2 (ADI svn)) #6 Wed Jan 14 23:30:19 MST 2009
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0011c9f0
rodata = 0x0011c9f0-0x00174588
bss = 0x00174590-0x00183068
data = 0x00183068-0x00194000
stack = 0x00192000-0x00194000
init = 0x00194000-0x0077e000
available = 0x0077e000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 0
Reset caused by Software reset
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
boot memmap: 000000000077e000 - 00000000037ff000 (usable)
On node 0 totalpages: 14335
free_area_init_node: node 0, pgdat 00190e14, node_mem_map 00783000
DMA zone: 112 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 14223 pages, LIFO batch:3
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
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: 14223
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:1:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Kernel managed physical pages: 14335
Memory available: 49088k/65536k RAM, (6056k init code, 1134k kernel code, 478k data, 1024k dma, 7756k reserved)
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
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 (41 KB free)
PDA for CPU0 reserved at 00175678
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
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
yaffs Jan 14 2009 23:27:12 Installing.
msgmni has been set to 95
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
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 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
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 2037-04-14 17:47:51 UTC (2123344071)
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=1, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 6056k freed
dma_alloc_init: dma_page @ 0x0077a000 - 256 pages at 0x03f00000
PHY: 0:01 - Link is Up - 100/Full
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 711 at 0x058e0000
Bad eraseblock 778 at 0x06140000
Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00400000 : "linux kernel"
0x00400000-0x08000000 : "file system"
root
Case 2 ...PASS
Case 2 ...PASS
:/>
************** STEP 5: Show file systems.
cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev tmpfs
nodev inotifyfs
nodev devpts
nodev ramfs
yaffs
yaff
Case 3 ...PASS
Case 3 ...PASS
s2
root:/>
************** STEP 6: MTD test
cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 "linux kernel"
mtd1: 07c00000 00020000 "file system"
r
Case 4 ...PASS
Case 4 ...PASS
Nand_rootfs_num is 1
oot:/>
************** STEP 7: Erase MTD
flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 54c0000 -- 68 % complete.
Skipping bad block at 0x054e0000
Erasing 128 Kibyte @ 5d20000 -- 75 % complete.
Skipping bad block at 0x05d40000
Erasing 128 Kibyte @ 7c00000 -- 100 % complete.
root:/>
Case 5 ...PASS
Case 5 ...PASS
************** STEP 8: Touch file
1)create file system directory
mkdir -p rootfs
root:/>
2)create test file
echo This is test for mtd driver > rootfs/test
root:/>
************** STEP 9: Reading MTD
mount -t yaffs2 /dev/mtdblock1 /mnt
yaffs: dev is 32505857 name is "mtdblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
block 680 is bad
block 747 is bad
root:/>
Case 6 ...PASS
Case 6 ...PASS
************** STEP 10: cp pwd to YAFFS.
cp /bin/pwd /mnt
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=cp PID=175
CPU = 0
TEXT = 0x03100040-0x0314b160 DATA = 0x0314b164-0x0315eb84
BSS = 0x0315eb84-0x031604f4 USER-STACK = 0x03169f78
return address: [0x00000002]; contents of:
SEQUENCER STATUS: Not tainted
SEQSTAT: 00062021 IPEND: 8030 SYSCFG: 0006
EXCAUSE : 0x21
interrupts disabled
physical IVG5 asserted : <0xffa00bac> { _evt_ivhw + 0x0 }
physical IVG15 asserted : <0xffa00d08> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0xffa0037c> { _timer_interrupt + 0x0 }
logical irq 10 mapped : <0x000c2c1c> { _bfin_rtc_interrupt + 0x0 }
logical irq 18 mapped : <0x000a9910> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 19 mapped : <0x000a9c28> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 24 mapped : <0x000b2ac0> { _bfin_mac_interrupt + 0x0 }
RETE: <0x00000000> { _do_one_initcall + 0xfffff000 }
RETN: <0x03795ce4> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x0003158a> { _generic_file_buffered_write + 0xca }
PC : <0x00000002> /* Maybe null pointer? */
DCPLB_FAULT_ADDR: <0x0379402c> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x00000002> /* Maybe null pointer? */
PROCESSOR STATE:
R0 : 00a4e3c0 R1 : 037a1ee8 R2 : 00000000 R3 : 0000004c
R4 : 00001000 R5 : 00000000 R6 : 00000000 R7 : 00001000
P0 : 03168cec P1 : 0018a3f0 P2 : 00000000 P3 : 00a4e3c0
P4 : 037a1ee8 P5 : 03794000 FP : 00000000 SP : 03795c08
LB0: 0310cfc1 LT0: 0310cfc0 LC0: 00000000
LB1: 0310bd51 LT1: 0310bd50 LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 03169fe9
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 031556d8
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 : 03168c88 ASTAT: 02002020
Hardware Trace:
0 Target : <0x00004a28> { _trap_c + 0x0 }
Source : <0xffa00632> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa00594> { _exception_to_level5 + 0x0 }
Source : <0xffa00462> { _bfin_return_from_exception + 0xe } RTX
2 Target : <0xffa00454> { _bfin_return_from_exception + 0x0 }
Source : <0xffa004ea> { _ex_trap_c + 0x66 } JUMP.S
3 Target : <0xffa00484> { _ex_trap_c + 0x0 }
Source : <0xffa006cc> { _trap + 0x38 } JUMP (P4)
4 Target : <0xffa006b2> { _trap + 0x1e }
Source : <0xffa006ae> { _trap + 0x1a } IF !CC JUMP
5 Target : <0xffa00694> { _trap + 0x0 }
Source : <0x00000000> { _do_one_initcall + 0xfffff000 }
6 Target : <0x00000000> { _do_one_initcall + 0xfffff000 }
Source : <0x00031588> { _generic_file_buffered_write + 0xc8 } CALL (P2)
7 Target : <0x0003155c> { _generic_file_buffered_write + 0x9c }
Source : <0x000305be> { _iov_iter_fault_in_readable + 0x66 } RTS
8 Target : <0x000305a8> { _iov_iter_fault_in_readable + 0x50 }
Source : <0xffa00216> { __access_ok + 0xba } RTS
9 Target : <0xffa00206> { __access_ok + 0xaa }
Source : <0xffa00184> { __access_ok + 0x28 } IF CC JUMP
10 Target : <0xffa0015c> { __access_ok + 0x0 }
Source : <0x000305a4> { _iov_iter_fault_in_readable + 0x4c } CALL pcrel
11 Target : <0x00030580> { _iov_iter_fault_in_readable + 0x28 }
Source : <0xffa00216> { __access_ok + 0xba } RTS
12 Target : <0xffa00206> { __access_ok + 0xaa }
Source : <0xffa00184> { __access_ok + 0x28 } IF CC JUMP
13 Target : <0xffa0015c> { __access_ok + 0x0 }
Source : <0x0003057c> { _iov_iter_fault_in_readable + 0x24 } CALL pcrel
14 Target : <0x00030558> { _iov_iter_fault_in_readable + 0x0 }
Source : <0x00031558> { _generic_file_buffered_write + 0x98 } CALL pcrel
15 Target : <0x0003153a> { _generic_file_buffered_write + 0x7a }
Source : <0x0003152a> { _generic_file_buffered_write + 0x6a } JUMP.S
Kernel Stack
Stack info:
SP: [0x03795f24] <0x03795f24> /* kernel dynamic memory */
Memory from 0x03795f20 to 03796000
03795f20: 00000004 [03103072] 00008000 00002000 00000000 03796000 03103072 03103072
03795f40:<0311a4e8><ffa00d6c> 02003004 0310bd51 0310cfc1 0310bd50 0310cfc0 00000000
03795f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
03795f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
03795fa0: 00000000 00000000 00000000 031556d8 03169fe9 03168c88 03168c94 0315fb08
03795fc0: 00000004 00000003 03160104 ffffeff4 00000004 00001000 03168cec 00000004
03795fe0: 00000004 0315e898 00001000 03168cec 00000004 00000004 00000004 00000006
03796000: 037a3da0
Return addresses in stack:
address : <0x0311a4e8> [ cp + 0x1a4a8 ]
address : <0xffa00d6c> { _evt_system_call + 0x64 }
Modules linked in: bfin_nand
Kernel panic - not syncing: Kernel exception
U-Boot 1.1.6-svn1273 (ADI-2008R1.5) (Jul 21 2008 - 00:33:04)
CPU: ADSP bf537-0.2 (Detected Rev: 0.2)
Board: ADI BF537 stamp board
Support: blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
RAM: 64 MB
Flash: 4 MB
In: serial
Out: serial
Err: serial
Net: Blackfin EMAC
MAC: 00:EA:BC:80:02:00
Hit any key to stop autoboot: 0
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'linux'.
The last time this case was good is in the log of Jan_05.
echo "************* Tested uclinux-dist svn info *************"
Path: .
URL: svn://10.99.22.20/uclinux-dist/trunk
Repository Root: svn://10.99.22.20/uclinux-dist
Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a
Revision: 7530
Node Kind: directory
Schedule: normal
Last Changed Author: vivili
Last Changed Rev: 7530
Last Changed Date: 2009-01-05 10:08:35 +0000 (Mon, 05 Jan 2009)
echo "************* Tested linux svn info ********************"
Path: .
URL: svn://10.99.22.20/linux-kernel/trunk
Repository Root: svn://10.99.22.20/linux-kernel
Repository UUID: 526b6c2d-f592-4532-a319-5dd88ccb003d
Revision: 5942
Node Kind: directory
Schedule: normal
Last Changed Author: grace
Last Changed Rev: 5942
Last Changed Date: 2009-01-05 03:06:35 +0000 (Mon, 05 Jan 2009)
Follow-ups
--- Yi Li 2009-01-19 04:50:13
Yaffs broken on trunk - I can reproduce this on my side.
--- Yi Li 2009-01-19 22:33:21
I am debugging this bug now.
--- Yi Li 2009-01-20 05:05:18
The exception happens in mm/filemap.c: generic_perform_write():
status = a_ops->write_begin(file, mapping, pos, bytes, flags, &page,
&fsdata);
There is no write_begin() in yaffs, so null pointer.
There is a patch in yaffs mailing list, but I don't think it is in yaffs CVS
yet, need to keep tracking yaffs CVS then upgrade our tree.
lists.aleph1.co.uk/lurker/message/20090120.011055.9ae3e2a4.en.html
-Yi
--- Yi Li 2009-01-21 22:47:46
Fixed now when Bryan sync yaffs2 with upstream. See commit r6029.
--- Mingquan Pan 2009-02-04 04:39:43
Yes,fixed. close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found