[#5813] Gadget serial tests will make kernel crash

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

[#5813] Gadget serial tests will make kernel crash

Submitted By: Vivi Li

Open Date

2010-01-05 04:30:22     Close Date

2010-01-21 21:44:10

Priority:

Medium     Assignee:

Cliff Cai

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

Drivers     Board:

N/A

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.3_trunk3771

App binary format:

N/A     

Summary: Gadget serial tests will make kernel crash

Details:

 

Gadget serial tests will make kernel crash.

It happens when write to gadget serial driver.

Both of generic and linuxACM tests may fail.

 

This bug does not exist in 09r1.1

 

Bellow is the log on BF548-ezkit:

--

Linux version 2.6.32.2-ADI-2010R1-pre-svn8107 (test@uclinux62-548-usbdev) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #56 Mon Jan 4 09:40:30 CST 2010^M

register early platform devices^M

bootconsole [early_shadow0] enabled^M

bootconsole [early_BFuart1] enabled^M

early printk enabled on early_BFuart1^M

Board Memory: 64MB^M

Kernel Managed Memory: 64MB^M

Memory map:^M

  fixedcode = 0x00000400-0x00000490^M

  text      = 0x00001000-0x0019ba60^M

  rodata    = 0x0019ba60-0x00231e98^M

  bss       = 0x00232000-0x00246774^M

  data      = 0x00246774-0x00260000^M

    stack   = 0x00260000-0x00262000^M

  init      = 0x00262000-0x009cc000^M

  available = 0x009cc000-0x03e00000^M

  DMA Zone  = 0x03e00000-0x04000000^M

Hardware Trace Active and Enabled^M

Boot Mode: 1^M

Recovering from Watchdog event^M

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

Compiled for ADSP-BF548 Rev 0.2^M

Blackfin Linux support by http://blackfin.uclinux.org/^M

Processor Speed: 525 MHz core clock and 131 MHz System Clock^M

NOMPU: setting up cplb tables^M

Instruction Cache Enabled for CPU0^M

  External memory: cacheable in instruction cache^M

  L2 SRAM        : uncacheable in instruction cache^M

Data Cache Enabled for CPU0^M

  External memory: cacheable (write-through) in data cache^M

  L2 SRAM        : uncacheable in data cache^M

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15748^M

Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart1,57600 console=ttyBF1,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf548-ezkit:eth0:off^M

PID hash table entries: 256 (order: -2, 1024 bytes)^M

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

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

Memory available: 52888k/65536k RAM, (7592k init code, 1642k kernel code, 794k data, 2048k dma, 572k reserved)^M

Hierarchical RCU implementation.^M

NR_IRQS:263^M

Configuring Blackfin Priority Driven Interrupts^M

console [ttyBF1] enabled, bootconsole disabled^M

console [ttyBF1] enabled, bootconsole disabled^M

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)^M

Mount-cache hash table entries: 512^M

Blackfin Scratchpad data SRAM: 4 KB^M

Blackfin L1 Data A SRAM: 16 KB (16 KB free)^M

Blackfin L1 Data B SRAM: 16 KB (16 KB free)^M

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)^M

Blackfin L2 SRAM: 128 KB (128 KB free)^M

NET: Registered protocol family 16^M

Blackfin DMA Controller^M

ezkit_init(): registering device resources^M

bio: create slab <bio-0> at 0^M

SCSI subsystem initialized^M

usbcore: registered new interface driver usbfs^M

usbcore: registered new interface driver hub^M

usbcore: registered new device driver usb^M

Switching to clocksource jiffies^M

musb_hdrc: version 6.0, pio, peripheral, debug=0^M

musb_hdrc: USB Peripheral mode controller at ffc03c00 using PIO, IRQ 82^M

NET: Registered protocol family 2^M

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)^M

TCP established hash table entries: 2048 (order: 2, 16384 bytes)^M

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)^M

TCP: Hash tables configured (established 2048 bind 2048)^M

TCP reno registered^M

NET: Registered protocol family 1^M

Slow work thread pool: Starting up^M

Slow work thread pool: Ready^M

msgmni has been set to 103^M

io scheduler noop registered^M

io scheduler anticipatory registered (default)^M

bf54x-lq043: FrameBuffer initializing...^M

dma_alloc_init: dma_page @ 0x029b6000 - 512 pages at 0x03e00000^M

bfin-otp: initialized^M

bfin-uart: Blackfin serial driver^M

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

brd: module loaded^M

register bfin atapi driver^M

scsi0 : pata-bf54x^M

ata1: PATA max UDMA/66 irq 68^M

physmap platform flash device: 02000000 at 20000000^M

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Using buffer write method^M

Using auto-unlock on power-up/resume^M

cfi_cmdset_0001: Erase suspend on write enabled^M

RedBoot partition parsing not available^M

Using physmap partition information^M

Creating 3 MTD partitions on "physmap-flash.0":^M

0x000000000000-0x000000040000 : "bootloader(nor)"^M

0x000000040000-0x000000440000 : "linux kernel(nor)"^M

0x000000440000-0x000001000000 : "file system(nor)"^M

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

bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3^M

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)^M

Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":^M

0x000000000000-0x000000400000 : "linux kernel(nand)"^M

0x000000400000-0x000010000000 : "file system(nand)"^M

m25p80 spi0.1: m25p16 (2048 Kbytes)^M

Creating 2 MTD partitions on "m25p80":^M

0x000000000000-0x000000040000 : "bootloader(spi)"^M

ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100^M

ata1.00: 78140160 sectors, multi 16: LBA ^M

0x000000040000-0x000000200000 : "linux kernel(spi)"^M

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@4^M

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc02300, dma channel@5^M

ata1.00: configured for UDMA/66^M

blk_queue_max_hw_segments: set to minimum 1^M

scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5^M

smsc911x: Driver version 2008-10-21.^M

smsc911x-mdio: probed^M

eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)^M

net eth0: MAC Address: 00:e0:22:fe:bd:09^M

sd 0:0:0:0: [sda] 78140160 512-byte logical blocks: (40.0 GB/37.2 GiB)^M

sd 0:0:0:0: [sda] Write Protect is off^M

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA^M

Initializing USB Mass Storage driver...^M

usbcore: registered new interface driver usb-storage^M

sda:^M

USB Mass Storage support registered.^M

input: bf54x-keys as /devices/platform/bf54x-keys/input/input0^M

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0^M

i2c /dev entries driver^M

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc00700^M

i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc02200^M

bfin-wdt: initialized: timeout=20 sec (nowayout=0)^M

bfin-sdh bfin-sdh.0: unable to request DMA channel^M

bfin-sdh: probe of bfin-sdh.0 failed with error -16^M

usbcore: registered new interface driver usbhid^M

usbhid: v2.6:USB HID core driver^M

Advanced Linux Sound Architecture Driver Version 1.0.21.^M

No device for DAI SSM2602^M

dma rx:0 tx:1, err irq:10, regs:ffc00800^M

ssm2602 Audio Codec 0.1^M

asoc: SSM2602 <-> bf5xx-i2s mapping ok^M

ALSA device list:^M

  #0: bf5xx_ssm2602 (SSM2602)^M

TCP cubic registered^M

NET: Registered protocol family 17^M

rtc-bfin rtc-bfin: setting system clock to 2005-01-31 13:33:29 UTC (1107178409)^M

sda1^M

sd 0:0:0:0: [sda] Attached SCSI disk^M

net eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175^M

IP-Config: Complete:^M

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,^M

     host=bf548-ezkit, domain=, nis-domain=(none),^M

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=^M

Freeing unused kernel memory: 7592k freed^M

                           _____________________________________^M

        a8888b.           / Welcome to the uClinux distribution \^M

       d888888b.         /       _     _                         \^M

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |^M

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |^M

       8'    .88       \        | |   | |  _ \| | | | \  /        |^M

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |^M

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |^M

     dP   .    Y8b.       \   For embedded processors including   |^M

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /^M

   d8"         'Y88b        \___________________________________/^M

  :8P    '      :888^M

   8a.   :     _a88P         For further information, check out:^M

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/^M

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/^M

/     \.___.d|    .'           - http://www.uclinux.org/^M

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin^M

^M

Have a lot of fun...^M

^M

^M

BusyBox v1.15.3 (2010-01-04 04:14:58 CST) hush - the humble shell^M

^M

root:/> version^M

kernel:    Linux release 2.6.32.2-ADI-2010R1-pre-svn8107, build #56 Mon Jan 4 09:40:30 CST 2010^M

toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3771) ^M

user-dist: release svn-9334, build #42 Mon Jan 4 09:39:36 CST 2010^M

root:/> successful boot attempt

************** STEP 3: Start testing.

 

ifconfig eth0 10.100.4.50^M

root:/> ^M

root:/> modprobe g_serial use_acm=1^M

g_serial gadget: Gadget Serial v2.4^M

g_serial gadget: g_serial ready^M

root:/> g_serial gadget: high speed config #2: CDC ACM config^M

 

Case 1 ...PASS

 

Case 1 ...PASS

dmesg|tail^M

sd 0:0:0:0: [sda] Attached SCSI disk^M

net eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175^M

IP-Config: Complete:^M

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,^M

     host=bf548-ezkit, domain=, nis-domain=(none),^M

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=^M

Freeing unused kernel memory: 7592k freed^M

g_serial gadget: Gadget Serial v2.4^M

g_serial gadget: g_serial ready^M

g_serial gadget: high speed config #2: CDC ACM config^M

root:/>

Case 2 ...PASS

 

Case 2 ...PASS

spawn /bin/bash^M

su^M

^[[?1034htest@uclinux62-548-usbdev:..testsuites/usbdev> su^M

Password: ^M

^[[?1034h^[[1m^[[31muclinux62-548-usbdev:..testsuites/usbdev # ^[(B^[[m

Case 3 ...PASS

Case 3 ...PASS

sudo mount -t usbfs none /proc/bus/usb/^M

mount: none already mounted or /proc/bus/usb/ busy

Case 4 ...PASS

 

Case 4 ...PASS

mount^M

^M

^[[1m^[[31muclinux62-548-usbdev:..testsuites/usbdev # ^[(B^[[mmount^M

/dev/sda2 on / type ext3 (rw,acl,user_xattr)^M

proc on /proc type proc (rw)^M

sysfs on /sys type sysfs (rw)^M

debugfs on /sys/kernel/debug type debugfs (rw)^M

udev on /dev type tmpfs (rw)^M

devpts on /dev/pts type devpts (rw,mode=0620,gid=5)^M

/dev/sdb1 on /home type ext3 (rw,acl,user_xattr)^M

/dev/sda3 on /usr type ext3 (rw,acl,user_xattr)^M

fusectl on /sys/fs/fuse/connections type fusectl (rw)^M

securityfs on /sys/kernel/security type securityfs (rw)^M

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)^M

nfsd on /proc/fs/nfsd type nfsd (rw)^M

rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)^M

gvfs-fuse-daemon on /home/test/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=test)^M

none on /proc/bus/usb type usbfs (rw)^M

^[[1m^[[31muclinux62-548-usbdev:..testsuites/usbdev # ^[(B^[[m

Case 5 ...PASS

 

Case 5 ...PASS

cat /proc/bus/usb/devices|grep -i gadget^M

S:  Product=Gadget Serial v2.4^M

^[[1m^[[31muclinux62-548-usbdev:..testsuites/usbdev # ^[(B^[[m

Case 6 ...PASS

 

Case 6 ...PASS

cat /dev/ttyACM0 > serial_linuxACM^M

 

Case 7 ...PASS

 

Case 7 ...PASS

ls /dev^M

^[[1;35maudio^[[0m               ^[[1;35mmtd2^[[0m                ^[[1;35mnull^[[0m                ^[[1;35mram8^[[0m^M

^[[1;35mbfin-otp^[[0m            ^[[1;35mmtd2ro^[[0m              ^[[1;36mpcmC0D0c^[[0m            ^[[1;35mram9^[[0m^M

^[[1;35mconsole^[[0m             ^[[1;35mmtd3^[[0m                ^[[1;36mpcmC0D0p^[[0m            ^[[1;35mrandom^[[0m^M

^[[1;36mcontrolC0^[[0m           ^[[1;35mmtd3ro^[[0m              ^[[1;35mptmx^[[0m                ^[[1;35mrtc0^[[0m^M

^[[1;35mcpu_dma_latency^[[0m     ^[[1;35mmtd4^[[0m                ^[[1;34mpts^[[0m                 ^[[1;35msda^[[0m^M

^[[1;35mdsp^[[0m                 ^[[1;35mmtd4ro^[[0m              ^[[1;35mram0^[[0m                ^[[1;35msda1^[[0m^M

^[[1;35mfb0^[[0m                 ^[[1;35mmtd5^[[0m                ^[[1;35mram1^[[0m                ^[[1;34msnd^[[0m^M

^[[1;36mfd^[[0m                  ^[[1;35mmtd5ro^[[0m              ^[[1;35mram10^[[0m               ^[[1;36mstderr^[[0m^M

^[[1;35mfull^[[0m                ^[[1;35mmtd6^[[0m                ^[[1;35mram11^[[0m               ^[[1;36mstdin^[[0m^M

^[[1;35mi2c-0^[[0m               ^[[1;35mmtd6ro^[[0m              ^[[1;35mram12^[[0m               ^[[1;36mstdout^[[0m^M

^[[1;35mi2c-1^[[0m               ^[[1;35mmtdblock0^[[0m           ^[[1;35mram13^[[0m               ^[[1;36mtimer^[[0m^M

^[[1;35mkmsg^[[0m                ^[[1;35mmtdblock1^[[0m           ^[[1;35mram14^[[0m               ^[[1;35mtty^[[0m^M

^[[1;35mlog^[[0m                 ^[[1;35mmtdblock2^[[0m           ^[[1;35mram15^[[0m               ^[[1;35mttyBF1^[[0m^M

^[[1;35mmem^[[0m                 ^[[1;35mmtdblock3^[[0m           ^[[1;35mram2^[[0m                ^[[1;35mttyGS0^[[0m^M

^[[1;35mmixer^[[0m               ^[[1;35mmtdblock4^[[0m           ^[[1;35mram3^[[0m                ^[[1;35murandom^[[0m^M

^[[1;35mmtd0^[[0m                ^[[1;35mmtdblock5^[[0m           ^[[1;35mram4^[[0m                ^[[1;35musbmon0^[[0m^M

^[[1;35mmtd0ro^[[0m              ^[[1;35mmtdblock6^[[0m           ^[[1;35mram5^[[0m                ^[[1;35mwatchdog^[[0m^M

^[[1;35mmtd1^[[0m                ^[[1;35mnetwork_latency^[[0m     ^[[1;35mram6^[[0m                ^[[1;35mzero^[[0m^M

^[[1;35mmtd1ro^[[0m              ^[[1;35mnetwork_throughput^[[0m  ^[[1;35mram7^[[0m^M

root:/>

Case 8 ...PASS

 

Case 8 ...PASS

cat /etc/boa.conf > /dev/ttyGS0^M

BUG: scheduling while atomic: cat/324/0x00000100^M

Modules linked in: g_serial^M

^M

ADSP-BF548-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)^M

Linux version 2.6.32.2-ADI-2010R1-pre-svn8107 (test@uclinux62-548-usbdev) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #56 Mon Jan 4 09:40:30 CST 2010^M

^M

SEQUENCER STATUS:               Not tainted^M

SEQSTAT: 00002000  IPEND: 8810  IMASK: 0000  SYSCFG: 0006^M

  Global Interrupts Disabled (IPEND[4])^M

  Peripheral interrupts masked off^M

  Kernel interrupts masked off^M

  EXCAUSE   : 0x0^M

  interrupts disabled^M

  physical IVG11 asserted : <0xffa00e84> { _evt_evt11 + 0x0 }^M

  physical IVG15 asserted : <0xffa00f38> { _evt_system_call + 0x0 }^M

  logical irq   6 mapped  : <0xffa0039c> { _bfin_coretmr_interrupt + 0x0 }^M

  logical irq   9 mapped  : <0x000b408c> { _bfin_bf54x_irq_error + 0x0 }^M

  logical irq  10 mapped  : <0x00148740> { _err_handler + 0x0 }^M

  logical irq  14 mapped  : <0x0011592c> { _bfin_rtc_interrupt + 0x0 }^M

  logical irq  16 mapped  : <0x00148a44> { _rx_handler + 0x0 }^M

  logical irq  17 mapped  : <0x001489e8> { _tx_handler + 0x0 }^M

  logical irq  48 mapped  : <0x000c0de4> { _bfin_serial_dma_rx_int + 0x0 }^M

  logical irq  49 mapped  : <0x000c0b68> { _bfin_serial_dma_tx_int + 0x0 }^M

  logical irq  52 mapped  : <0x00118388> { _bfin_twi_interrupt_entry + 0x0 }^M

  logical irq  53 mapped  : <0x00118388> { _bfin_twi_interrupt_entry + 0x0 }^M

  logical irq  68 mapped  : <0x000e492c> { _bfin_ata_interrupt + 0x0 }^M

  logical irq  74 mapped  : <0x000f38ac> { _bf5xx_nand_dma_irq + 0x0 }^M

  logical irq  76 mapped  : <0x0011393c> { _bfin_kpad_isr + 0x0 }^M

  logical irq  82 mapped  : <0x0010eb38> { _blackfin_interrupt + 0x0 }^M

  logical irq 175 mapped  : <0x000fa78c> { _smsc911x_irqhandler + 0x0 }^M

RETE: <0x00000000> /* Maybe null pointer? */^M

RETN: <0x02b6c000> /* kernel dynamic memory */^M

RETX: <0x02d0404e> [ cat + 0x400e ]^M

RETS: <0x02b2c870> { :g_serial:_gserial_disconnect + 0x560 }^M

PC  : <0x02b2c884> { :g_serial:_gserial_disconnect + 0x574 }^M

PROCESSOR STATE:^M

R0 : 0000ffff    R1 : 00000003    R2 : 003d0900    R3 : 00906c00^M

R4 : 00000001    R5 : 02a14000    R6 : 0000ffff    R7 : 00000002^M

P0 : 02b03002    P1 : 02b6be34    P2 : 00247c50    P3 : 02b8ba40^M

P4 : 02a14000    P5 : 02a558e0    FP : 02a14084    SP : 02b6bcfc^M

LB0: 000a8440    LT0: 000a843e    LC0: 00000000^M

LB1: 02a94a4b    LT1: 02a94a42    LC1: 00000000^M

B0 : 00000000    L0 : 00000000    M0 : 00000004    I0 : 02d6cfed^M

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 02b64074^M

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 02d6ceb8^M

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000^M

A0.w: 00000003   A0.x: 00000000   A1.w: 00000003   A1.x: 00000000^M

USP : 02d6be1c  ASTAT: 02003004^M

^M

NULL pointer access^M

Kernel OOPS in progress^M

Deferred Exception context^M

No Valid process in current context^M

return address: [0xffa0084a]; contents of:^M

0xffa00820:  0011  e801  0000  0010  e10a  2108  e14a  ffe0 ^M

0xffa00830:  0023  9110  b070  3107  b230  307e  e106  e000 ^M

0xffa00840:  e146  ffff  55f7  3217  9152 [e716] 0082  e127 ^M

0xffa00850:  0172  3070  08be  1383  307e  e106  e000  e146 ^M

^M

ADSP-BF548-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)^M

Linux version 2.6.32.2-ADI-2010R1-pre-svn8107 (test@uclinux62-548-usbdev) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #56 Mon Jan 4 09:40:30 CST 2010^M

^M

SEQUENCER STATUS:               Not tainted^M

SEQSTAT: 00002027  IPEND: 8008  IMASK: ffff  SYSCFG: 0006^M

  EXCAUSE   : 0x27^M

  physical IVG3 asserted : <0xffa00700> { _trap + 0x0 }^M

  physical IVG15 asserted : <0xffa00f38> { _evt_system_call + 0x0 }^M

  logical irq   6 mapped  : <0xffa0039c> { _bfin_coretmr_interrupt + 0x0 }^M

  logical irq   9 mapped  : <0x000b408c> { _bfin_bf54x_irq_error + 0x0 }^M

  logical irq  10 mapped  : <0x00148740> { _err_handler + 0x0 }^M

  logical irq  14 mapped  : <0x0011592c> { _bfin_rtc_interrupt + 0x0 }^M

  logical irq  16 mapped  : <0x00148a44> { _rx_handler + 0x0 }^M

  logical irq  17 mapped  : <0x001489e8> { _tx_handler + 0x0 }^M

  logical irq  48 mapped  : <0x000c0de4> { _bfin_serial_dma_rx_int + 0x0 }^M

  logical irq  49 mapped  : <0x000c0b68> { _bfin_serial_dma_tx_int + 0x0 }^M

  logical irq  52 mapped  : <0x00118388> { _bfin_twi_interrupt_entry + 0x0 }^M

  logical irq  53 mapped  : <0x00118388> { _bfin_twi_interrupt_entry + 0x0 }^M

  logical irq  68 mapped  : <0x000e492c> { _bfin_ata_interrupt + 0x0 }^M

  logical irq  74 mapped  : <0x000f38ac> { _bf5xx_nand_dma_irq + 0x0 }^M

  logical irq  76 mapped  : <0x0011393c> { _bfin_kpad_isr + 0x0 }^M

  logical irq  82 mapped  : <0x0010eb38> { _blackfin_interrupt + 0x0 }^M

  logical irq 175 mapped  : <0x000fa78c> { _smsc911x_irqhandler + 0x0 }^M

RETE: <0x00000000> /* Maybe null pointer? */^M

RETN: <0x02cec704> /* kernel dynamic memory (maybe user-space) */^M

RETX: <0x00000480> /* Maybe fixed code section */^M

RETS: <0xffa00f9c> { _evt_system_call + 0x64 }^M

PC  : <0xffa0084a> { _system_call + 0x22 }^M

DCPLB_FAULT_ADDR: <0x00000208> /* Maybe null pointer? */^M

ICPLB_FAULT_ADDR: <0xffa0084a> { _system_call + 0x22 }^M

PROCESSOR STATE:^M

R0 : ffa00f9c    R1 : 02cec894    R2 : 02cec808    R3 : 00000008^M

R4 : 02ce2f0c    R5 : 00000000    R6 : ffffe000    R7 : 02cec000^M

P0 : 000000ae    P1 : 0000001f    P2 : 00000000    P3 : 02cecd4c^M

P4 : 02cec894    P5 : 02cecdd8    FP : 02cec7ec    SP : 02cec628^M

LB0: 02c8ec32    LT0: 02c8ec32    LC0: 00000000^M

LB1: 02c8d9f9    LT1: 02c8d9f8    LC1: 00000000^M

B0 : 00000000    L0 : 00000000    M0 : 00000004    I0 : 02cece5c^M

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00000000^M

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 02cecebc^M

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000^M

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000^M

USP : 02cece98  ASTAT: 02002000^M

^M

Hardware Trace:^M

   0 Target : <0x00005124> { _trap_c + 0x0 }^M

     Source : <0xffa00694> { _exception_to_level5 + 0xa4 } CALL pcrel^M

   1 Target : <0xffa005f0> { _exception_to_level5 + 0x0 }^M

     Source : <0xffa004a4> { _bfin_return_from_exception + 0x18 } RTX^M

   2 Target : <0xffa0048c> { _bfin_return_from_exception + 0x0 }^M

     Source : <0xffa00548> { _ex_trap_c + 0x74 } JUMP.S^M

   3 Target : <0xffa004d4> { _ex_trap_c + 0x0 }^M

     Source : <0xffa0075a> { _trap + 0x5a } JUMP (P4)^M

   4 Target : <0xffa00700> { _trap + 0x0 }^M

     Source : <0xffa00848> { _system_call + 0x20 } 0x9152^M

   5 Target : <0xffa00828> { _system_call + 0x0 }^M

     Source : <0xffa00f98> { _evt_system_call + 0x60 } CALL pcrel^M

   6 Target : <0xffa00f38> { _evt_system_call + 0x0 }^M

     Source : <0xffa004a4> { _bfin_return_from_exception + 0x18 } RTX^M

   7 Target : <0xffa0048c> { _bfin_return_from_exception + 0x0 }^M

     Source : <0xffa00436> { _ex_syscall + 0x2 } JUMP.S^M

   8 Target : <0xffa00434> { _ex_syscall + 0x0 }^M

     Source : <0xffa0075a> { _trap + 0x5a } JUMP (P4)^M

   9 Target : <0xffa00700> { _trap + 0x0 }^M

     Source : <0x02c97c28> /* kernel dynamic memory (maybe user-space) */ EXCPT 0x0^M

  10 Target : <0x02c97c1c> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c94908> /* kernel dynamic memory (maybe user-space) */ CALL pcrel^M

  11 Target : <0x02c948e0> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c8ec44> /* kernel dynamic memory (maybe user-space) */ RTS^M

  12 Target : <0x02c8ec0c> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c948dc> /* kernel dynamic memory (maybe user-space) */ CALL pcrel^M

  13 Target : <0x02c948b4> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c8a4ca> /* kernel dynamic memory (maybe user-space) */ CALL pcrel^M

  14 Target : <0x02c8a4be> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c949c0> /* kernel dynamic memory (maybe user-space) */ RTS^M

  15 Target : <0x02c949ba> /* kernel dynamic memory (maybe user-space) */^M

     Source : <0x02c8ecfa> /* kernel dynamic memory (maybe user-space) */ RTS^M

Kernel Stack^M

Stack info:^M

SP: [0x02cec57c] <0x02cec57c> /* kernel dynamic memory (maybe user-space) */^M

FP: (0x02cec600)^M

Memory from 0x02cec570 to 02ced000^M

02cec570: 00000013  00000027  02cec628 [02cec57c] 0000003f  00000000  00000000  0003000b ^M

02cec590: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec5b0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec5d0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec5f0: 00000000  00000000  00000000  00000000 (00000000)<ffa00698> 00235000  00008008 ^M

02cec610: 00002027  00000000  02ce2f0c  00000000  00000000  00000480  00000480  00008008 ^M

02cec630: 00002027  00000000  02cec704  00000480  ffa0084a <ffa00f9c><ffa00f9c> 02002000 ^M

02cec650: 02c8d9f9  02c8ec32  02c8d9f8  02c8ec32  00000000  00000000  00000000  00000000 ^M

02cec670: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec690: 00000000  00000000  00000000  00000000  00000000  00000004  00000000  02cecebc ^M

02cec6b0: 00000000  02cece5c  02cece98  02cec7ec  02cecdd8  02cec894  02cecd4c  00000000 ^M

02cec6d0: 0000001f  000000ae  02cec000  ffffe000  00000000  02ce2f0c  00000008  02cec808 ^M

02cec6f0: 02cec894 <ffa00f9c><ffa00f9c> 000000ae  00000006  02c97c2b  00008000  00002000 ^M

02cec710: 00000000  02cec7e0  02c97c2a  02c97c2b <02c9490c><ffa00f9c> 02002001  02c8d9f9 ^M

02cec730: 02c8ec32  02c8d9f8  02c8ec32  00000000  00000000  00000000  00000000  00000000 ^M

02cec750: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec770: 00000000  00000000  00000000  00000000  00000004  00000000  02cecebc  00000000 ^M

02cec790: 02cece5c  02cece98  02cec7ec  02cecdd8  02cec894  02cecd4c  02cec808  0000001f ^M

02cec7b0: 000000ae  0000000d  00000003  00000000  02ce2f0c  00000008  02cec808  02cec894 ^M

02cec7d0: 0000000d  0000000d  000000ae  00000006  00000008  00000008  02cecebc  02cec920 ^M

02cec7f0:<02c9490c> 0000000d  00000000  00000000  00000000  00000008  00000000  00000000 ^M

02cec810: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec830: 00000000  00000000  00000000  02cec850 <02c9519c> 00000007 <02c801ba> 00000007 ^M

02cec850: 0000016d <02c8b282> 02cece74  02ce17c4  02cec8b4  00000001  02cec8b4 <02c8b6ec>^M

02cec870: 02ce345c  00000000  02ce348c  02ce17e0  02ce346c  02ce348c  02ce2f0c  00000000 ^M

02cec890: 00000000  02c8a28c  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec8b0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec8d0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec8f0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec910: 00000000  00000000  00000000  00000000  02cece78 <02c8a4ce> 02cecdd8  02ce2f40 ^M

02cec930: 02ce330c  02ce2f0c  00000000  00000000  02cdadf8  02ceceb8  00000000  3e34313c ^M

02cec950: 206e614a  31203133  33333a33  2039333a  6e72656b  203a6c65  65735f67  6c616972 ^M

02cec970: 64616720  3a746567  67696820  70732068  20646565  666e6f63  23206769  43203a32 ^M

02cec990: 41204344  63204d43  69666e6f  72200067  70746f6f  3d687461  2e342e00  2c343731 ^M

02cec9b0: 34383700  00293930  63666640  30323230  30300030  6d64202c  68632061  656e6e61 ^M

02cec9d0: 0035406c  69002964  30313d70  3030312e  352e342e  30313a30  3030312e  312e342e ^M

02cec9f0: 313a3437  30312e30  2e342e30  3a343731  2e353532  2e353532  2e353532  66623a30 ^M

02ceca10: 2d383435  696b7a65  74653a74  6f3a3068  02006666  02ce0908  00000000  00000000 ^M

02ceca30: 02cece8c <02cc8a4a> 00000000  00000000  00000000  02ce0908  00000000  02cecf9c ^M

02ceca50: 02ceca38  00000002  00000000  63000000  02ce0908  00000000  ffffffff  00000063 ^M

02ceca70: 00000000  00000001  00000000  00000000  00000000  02cecebc  00000000  0000006e ^M

02ceca90: 00000000  00000002  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecab0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecad0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecaf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecb10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecb30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecb50: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecb70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecb90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecbb0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecbd0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecbf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  02cecd40 ^M

02cecc10:<02c9490c> 02cecd64  00000000  00000000  00000000  00000008  00000000  02cecd60 ^M

02cecc30:<02c9490c> 02cecd84  00000000  00000000  00000000  00000008  02ca9e3c  10000000 ^M

02cecc50: 00000000  00000001  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecc70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecc90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02ceccb0: 00000000  02ca9e3c  10000000  00000000  02000000  00000000  00000000  00000000 ^M

02ceccd0: 00000000  00000001  10000000  02cecf98  00000001  00000000  00000000  00000000 ^M

02ceccf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecd10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecd30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  02ca9e3c ^M

02cecd50: 00001000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cecd70: 00000000  00000000  02cec850 <02c9519c> 00000007 <02c801ba> 00000007  0000016d ^M

02cecd90:<02c8b282> 02cece74  02ce17c4  02cec8b4  00000001  02cec8b4 <02c8b6ec> 02ce345c ^M

02cecdb0: 00000000  02ce348c  02ce17e0  02ce346c  02ce348c  02ce2f0c  00000000  00000000 ^M

02cecdd0: 10000000  00000000  02c8a28c  00000000  00000000  00000000  00000000  00000000 ^M

02cecdf0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cece10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cece30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cece50: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cece70: 00000000  41fe33b3  02cecea8 <02c8a7ae> 02ce2f0f  02ce2f40  02ce330c  02ce2f0c ^M

02cece90: 00000000  00000000  02ce2f0c  000003ff  02ce1144  02ceceb8  000003ff <02ca9e32>^M

02ceceb0: 02cecf98  00000031  02ce2f0f  00000000  02cecf54 <02c9c1e8> 02ce2e2c  02cecf98 ^M

02ceced0: 00000030  02cd0fa2  00000002  00000112  02cce124  02cecf98  02ce2ce4  02cce124 ^M

02cecef0:<02c9c204> 02ce2f00  02cecf98  00000002  02cecfb7  02cecf98  02ce2ce4  02cecf54 ^M

02cecf10:<02c9c3a2> 02cecfb1 <02c9c37c> 02ce2f00  02cecf98  00000000  02cecf98  02ce2ce4 ^M

02cecf30: 02cce164  02cce164  02cecf54 <02c975d0> 02cce164  02ce1bc8  00000000  00000000 ^M

02cecf50: 00000000  00000000 <02a60afa> 02cce164  02a780c0  02a780c4  00000000  41fe33b0 ^M

02cecf70: 00000005  00000048  02c9c30c  00000000  00000000  02cce124  02cce136  00000000 ^M

02cecf90: 029fbacd  00000002  02cecfb1  02cecfbd  00000000  02cecfc0  02cecfcd  00000000 ^M

02cecfb0: 62732f00  6b2f6e69  64676f6c  006e2d00  4d524554  6b6e753d  6e776f6e  54415000 ^M

02cecfd0: 622f3d48  2f3a6e69  2f727375  3a6e6962  6962732f  752f3a6e  732f7273  006e6962 ^M

02cecff0: 6962732f  6c6b2f6e  0064676f  00000000 ^M

Return addresses in stack:^M

   frame  1 : <0xffa00698> { _exception_to_level5 + 0xa8 }^M

    address : <0xffa00f9c> { _evt_system_call + 0x64 }^M

    address : <0xffa00f9c> { _evt_system_call + 0x64 }^M

    address : <0xffa00f9c> { _evt_system_call + 0x64 }^M

    address : <0xffa00f9c> { _evt_system_call + 0x64 }^M

    address : <0x02c9490c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0xffa00f9c> { _evt_system_call + 0x64 }^M

    address : <0x02c9490c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9519c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c801ba> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8b282> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8b6ec> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8a4ce> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02cc8a4a> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9490c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9490c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9519c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c801ba> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8b282> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8b6ec> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c8a7ae> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02ca9e32> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9c1e8> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9c204> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9c3a2> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c9c37c> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02c975d0> /* kernel dynamic memory (maybe user-space) */^M

    address : <0x02a60afa> /* kernel dynamic memory (maybe user-space) */^M

Modules linked in: g_serial^M

Kernel panic - not syncing: Kernel exception^M

Hardware Trace:^M

Stack info:^M

SP: [0x02cec544] <0x02cec544> /* kernel dynamic memory (maybe user-space) */^M

FP: (0x02cec600)^M

Memory from 0x02cec540 to 02ced000^M

02cec540: 00000027 [001de21c]<0019a3f6> 02cec628  001de21c  002386de  002386de  002386de ^M

02cec560: 02cec57c <0000553e> 02cec628  ffe02014  02cecd4c  00008008  02cec628  0000003f ^M

02cec580: 0000003f  00000000  00000000  0003000b  00000000  00000000  00000000  00000000 ^M

02cec5a0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

02cec5c0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000 ^M

...

(kernel crashed in blackfin board)

--

 

Follow-ups

 

--- Vivi Li                                                  2010-01-05 05:16:54

The first time I see this bug happen:

--

kernel:    Linux release 2.6.32-ADI-2010R1-pre-svn7934, build #20 Mon Dec 7

08:01:13 CST 2009^M

toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3679) ^M

user-dist: release svn-9220, build #15 Mon Dec 7 07:59:31 CST 2009^M

--

 

--- Robin Getz                                               2010-01-05 13:28:57

This looks like a problem in the system call code (or userspace doing a system

call that we don't support)...

 

        /* Store RETS for now */

        r0 = rets;

        [sp + PT_RESERVED] = r0;

        /* Set the stack for the current process */

        r7 = sp;

        r6.l = lo(ALIGN_PAGE_MASK);

        r6.h = hi(ALIGN_PAGE_MASK);

        r7 = r7 & r6;           /* thread_info */

        p2 = r7;

        p2 = [p2];

 

        [p2+(TASK_THREAD+THREAD_KSP)] = sp;

 

And P2 == 0 and BOOM!.

 

Any idea why the stored thread_info is zero?

 

?

 

--- Robin Getz                                               2010-01-06 13:33:47

In looking closer - I don't think that matters...

 

The first bug ...

 

BUG: scheduling while atomic

 

is the problem. Something turns back on interrupts, when they should be turned

off, and that causes the stack to get screwed up...

 

-Robin

 

--- Cliff Cai                                                2010-01-07 04:57:33

For first bug,kernel crashes at random point,it looks like a stack overflow

problem at first sight,but even I increase the stack size of busybox to a big

value,it still crashes.

 

Cliff

 

--- Robin Getz                                               2010-01-07 10:38:12

Userspace stack overflows shouldn't cause "scheduling while atomic"...

(unless it is clobbering a kernel module.)

 

Put a dump_bfin_trace_buffer() at the very start of

kernel/sched.c:__schedule_bug(), and increase the trace so you can see where

things are going on...

 

-Robin

 

--- Cliff Cai                                                2010-01-08 05:09:40

Through gdb,now can see that g_serial use a tasklet to hand the received data up

to tty,for some reason,the tty layer eventually runs in to a mutex_lock() and

causes a schedule.

And I need further digging.

 

Cliff

 

 

  

 

--- Cliff Cai                                                2010-01-11 03:00:35

According to the discussion in below thread,low_latency mode is not allowed in

IRQ context.

http://kerneltrap.org/mailarchive/linux-usb/2009/6/23/6064913/thread#mid-6064913

However,removing the setting only solves the "schduling while atomic"

problem,

kernel still crashes with NULL pointer access.

 

Cliff

 

--- Cliff Cai                                                2010-01-11 04:56:09

mm,after using a work queue to transfer data(disabling low_latency mode,which is

a direct way to transfer data), now,there is a problem of data sychronization.

 

Cliff

 

--- Cliff Cai                                                2010-01-21 03:03:44

fixed by appling a patch in linux-usb mailling list.

Using work queue instead of tasklet to fix 'scheduling while atomic'

problem,also low_latency mode is allowed

 

Cliff

 

--- Vivi Li                                                  2010-01-21 21:43:53

No crash now.

Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.usbdev.pio    application/octet-stream    45173    Vivi Li

Attachments

Outcomes