2010-07-26 02:20:36     run into trouble when Reload nand driver

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-07-26 02:20:36     run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 91714   

 

I compiled bfn5xx_nand as a moudle on bf527-ezkit.

 

when I loaded it using "modprobe bf5xx_nand" ,it worked well ,but when I unloaded it and then reloaded it ,i got messages below

 

Hardware Trace:

   0 Target : <0x00004880> { _dump_bfin_trace_buffer + 0x0 }

     Source : <0x0003bacc> { _cache_alloc_refill + 0x194 } CALL pcrel

   1 Target : <0x0003bacc> { _cache_alloc_refill + 0x194 }

     Source : <0x0003b9b8> { _cache_alloc_refill + 0x80 } IF !CC JUMP

   2 Target : <0x0003b9a4> { _cache_alloc_refill + 0x6c }

     Source : <0x0003ba28> { _cache_alloc_refill + 0xf0 } IF CC JUMP

   3 Target : <0x0003b9c7> { _cache_alloc_refill + 0x8f }

     Source : <0x0003b9f6> { _cache_alloc_refill + 0xbe } IF CC JUMP

   4 Target : <0x0003b9d0> { _cache_alloc_refill + 0x98 }

     Source : <0x0003b9c4> { _cache_alloc_refill + 0x8c } JUMP.S

   5 Target : <0x0003b99c> { _cache_alloc_refill + 0x64 }

     Source : <0x0003b984> { _cache_alloc_refill + 0x4c } IF !CC JUMP

   6 Target : <0x0003b938> { _cache_alloc_refill + 0x0 }

     Source : <0x0003b92e> { _kmem_cache_alloc + 0x6a } CALL pcrel

   7 Target : <0x0003b92a> { _kmem_cache_alloc + 0x66 }

     Source : <0x0003b8e2> { _kmem_cache_alloc + 0x1e } IF !CC JUMP

   8 Target : <0x0003b8d6> { _kmem_cache_alloc + 0x12 }

     Source : <0x0003b91c> { _kmem_cache_alloc + 0x58 } JUMP.S

   9 Target : <0x0003b91c> { _kmem_cache_alloc + 0x58 }

     Source : <0x000b08fa> { __cond_resched + 0x1a } RTS

  10 Target : <0x000b08e0> { __cond_resched + 0x0 }

     Source : <0x0003b918> { _kmem_cache_alloc + 0x54 } CALL pcrel

  11 Target : <0x0003b918> { _kmem_cache_alloc + 0x54 }

     Source : <0x0003b8d0> { _kmem_cache_alloc + 0xc } IF !CC JUMP

  12 Target : <0x0003b8c4> { _kmem_cache_alloc + 0x0 }

     Source : <0x000426e4> { _do_execve + 0x34 } CALL pcrel

  13 Target : <0x000426d4> { _do_execve + 0x24 }

     Source : <0x000426c8> { _do_execve + 0x18 } IF !CC JUMP

  14 Target : <0x000426c4> { _do_execve + 0x14 }

     Source : <0x0000d3e0> { _unshare_files + 0x50 } RTS

  15 Target : <0x0000d3d6> { _unshare_files + 0x46 }

     Source : <0x0000d3bc> { _unshare_files + 0x2c } IF !CC JUMP

BUG: failure at mm/slab.c:3000/cache_alloc_refill()!

Kernel panic - not syncing: BUG!

 

what am i gonna do?please tell me how to fix this problem.

 

thank you

QuoteReplyEditDelete

 

 

2010-07-26 03:00:38     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 91716   

 

please use the 2009R1 branch.  we've fixed some bugs in the nand driver like this.

QuoteReplyEditDelete

 

 

2010-07-26 22:02:12     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 91750   

 

Hi mike

 

  my uclinux version is uClinux-dist-2009R1.1-RC4 .Is that version right?

 

I still got that problem on that version.

 

which verison should i choose ?

 

thank you

QuoteReplyEditDelete

 

 

2010-07-26 22:38:29     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 91751   

 

you want to get the 2009R1 svn branch and replace the linux-2.6.x directory with that

 

rm -rf linux-2.6.x

svn checkout svn://sources.blackfin.uclinux.org/linux-kernel/branches/2009R1 linux-2.6.x

QuoteReplyEditDelete

 

 

2010-07-28 12:10:56     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 91819   

 

thank you Mike ,now i know what you mean,i'll try it.

QuoteReplyEditDelete

 

 

2010-08-02 02:11:44     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 91998   

 

I've got the code from svn branch and compiled successfully,but it can't even startup .It says :

 

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         ################################

done

Bytes transferred = 4154470 (3f6466 hex)

bfin> bootm

## Booting image at 01000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1.1

   Created:      2010-08-02   4:40:26 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4154406 Bytes =  4 MB

   Load Address: 00001000

   Entry Point:  0016f9b0

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 16f9b0

Linux version 2.6.28.10-ADI-2009R1.1 (root@localhost.localdomain) (gcc version 4

.1.2 (ADI svn)) #30 Mon Aug 2 12:39:25 CST 2010

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart1] enabled

early printk enabled on early_BFuart1

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x000e9240

  rodata    = 0x000e9240-0x0013b164

  bss       = 0x0013c000-0x0014e71c

  data      = 0x0014e71c-0x00162000

    stack   = 0x00160000-0x00162000

  init      = 0x00162000-0x007eb000

  available = 0x007eb000-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 1

Blackfin support (C) 2004-2009 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev 0.1

Warning: Compiled for Rev 1, but running on Rev 2

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 300 MHz core clock and 75 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16001

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 conso

le=ttyBF1,57600

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

bfin-rtc: invalid date; resetting

Console: colour dummy device 80x25

console [ttyBF1] enabled, bootconsole disabled

console [ttyBF1] enabled, bootconsole disabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 55828k/65536k RAM, (6692k init code, 928k kernel code, 484k da

ta, 1024k dma, 576k reserved)

Calibrating delay loop... 598.01 BogoMIPS (lpj=1196032)

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)

Blackfin DMA Controller

ezkit_init(): registering device resources

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, pio, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

msgmni has been set to 109

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

KERN_INFO cmd BFINFB_IOCSBR : 1074022145

KERN_INFO cmd BFINFB_IOCSCON : 1074022146

dma_alloc_init: dma_page @ 0x03eae000 - 256 pages at 0x03f00000

Console: switching to colour frame buffer device 40x30

bfin-otp: initialized

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

Driver 'sd' needs updating - please use bus_type methods

m25p80 spi0.1: unrecognized JEDEC id ffffff

m25p80 spi0.1: found UNKNOWN, expected m25p16

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b

ase@ffc00500, dma channel@7

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0    ----------------It stopped here ,but the code(that is 2008R1.5) I used before can statup up successfully.

 

Please tell me how to fix this.

QuoteReplyEditDelete

 

 

2010-08-02 02:21:13     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 91999   

 

does your board have the RTC connected ?

QuoteReplyEditDelete

 

 

2010-08-02 05:06:16     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 92042   

 

Maybe my hardware has some problem,I've solved this by removing the bfin_rtc temporarily.

 

So I can test the nand flash controller driver,but It still cannot work.

 

---------------------------------------------------------------------operations and info

 

root:/> modprobe bf5xx_nand

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices,

Inc.

bf5xx-nand bf5xx-nand.0: page_size=512, data_width=8, wr_dly=3, rd_dly=3

NAND device: Manufacturer ID: 0x20, Chip ID: 0x76 (ST Micro NAND 64MiB 3,3V 8-bi

t)

Creating 2 MTD partitions on "NAND 64MiB 3,3V 8-bit":

0x00000000-0x00400000 : "linux kernel(nand)"

0x00400000-0x04000000 : "file system(nand)"

root:/> modprobe -r bf5xx_nand

 

 

root:/> modprobe bf5xx_nand

Hardware Trace:

   0 Target : <0x000048d4> { _dump_bfin_trace_buffer + 0x0 }

     Source : <0x00039b44> { _cache_alloc_refill + 0x194 } CALL pcrel

   1 Target : <0x00039b44> { _cache_alloc_refill + 0x194 }

     Source : <0x00039a30> { _cache_alloc_refill + 0x80 } IF !CC JUMP

   2 Target : <0x00039a1c> { _cache_alloc_refill + 0x6c }

     Source : <0x00039aa0> { _cache_alloc_refill + 0xf0 } IF CC JUMP

   3 Target : <0x00039a3f> { _cache_alloc_refill + 0x8f }

     Source : <0x00039a6e> { _cache_alloc_refill + 0xbe } IF CC JUMP

   4 Target : <0x00039a48> { _cache_alloc_refill + 0x98 }

     Source : <0x00039a3c> { _cache_alloc_refill + 0x8c } JUMP.S

   5 Target : <0x00039a14> { _cache_alloc_refill + 0x64 }

     Source : <0x000399fc> { _cache_alloc_refill + 0x4c } IF !CC JUMP

   6 Target : <0x000399b0> { _cache_alloc_refill + 0x0 }

     Source : <0x000399a6> { _kmem_cache_alloc + 0x6a } CALL pcrel

   7 Target : <0x000399a2> { _kmem_cache_alloc + 0x66 }

     Source : <0x0003995a> { _kmem_cache_alloc + 0x1e } IF !CC JUMP

   8 Target : <0x0003994e> { _kmem_cache_alloc + 0x12 }

     Source : <0x00039994> { _kmem_cache_alloc + 0x58 } JUMP.S

   9 Target : <0x00039994> { _kmem_cache_alloc + 0x58 }

     Source : <0x000e63fa> { __cond_resched + 0x1a } RTS

  10 Target : <0x000e63e0> { __cond_resched + 0x0 }

     Source : <0x00039990> { _kmem_cache_alloc + 0x54 } CALL pcrel

  11 Target : <0x00039990> { _kmem_cache_alloc + 0x54 }

     Source : <0x00039948> { _kmem_cache_alloc + 0xc } IF !CC JUMP

  12 Target : <0x0003993c> { _kmem_cache_alloc + 0x0 }

     Source : <0x0004075c> { _do_execve + 0x34 } CALL pcrel

  13 Target : <0x0004074c> { _do_execve + 0x24 }

     Source : <0x00040740> { _do_execve + 0x18 } IF !CC JUMP

  14 Target : <0x0004073c> { _do_execve + 0x14 }

     Source : <0x0000d904> { _unshare_files + 0x50 } RTS

  15 Target : <0x0000d8fa> { _unshare_files + 0x46 }

     Source : <0x0000d8e0> { _unshare_files + 0x2c } IF !CC JUMP

BUG: failure at mm/slab.c:3000/cache_alloc_refill()!

Kernel panic - not syncing: BUG!

QuoteReplyEditDelete

 

 

2010-08-02 13:06:39     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 92059   

 

are you using SLAB, SLOB, or SLUB as your allocator ?

QuoteReplyEditDelete

 

 

2010-08-02 20:48:51     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 92072   

 

yes I choose slab as allocator. CONFIG_SLAB=yes

QuoteReplyEditDelete

 

 

2010-08-02 20:55:02     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 92074   

 

post your actual config file as an attachment

QuoteReplyEditDelete

 

 

2010-08-02 22:28:35     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 92076   

 

I've test all of these allocators ,whicherver allocator i use ,i can't repeat the load-unload operation more than twice.

 

Is it a bug that has not fixed? if it is so ,i'll change my solution to prevent reloading.

QuoteReplyEditDelete

 

 

2010-08-02 22:45:59     Re: run into trouble when Reload nand driver

Carl Wei (CHINA)

Message: 92077   

 

Please check this out

 

config527.rar

QuoteReplyEditDelete

 

 

2010-08-11 17:20:52     Re: run into trouble when Reload nand driver

Mike Frysinger (UNITED STATES)

Message: 92335   

 

you can try this patch:

  blackfin.uclinux.org/gf/project/linux-kernel/scmsvn/?action=browse&path=/branches/2009R1/drivers/mtd/nand/bf5xx_nand.c&r1=9078&r2=9077&pathrev=9078

Attachments

Outcomes