2009-03-25 08:39:44     Kernel panic on access to /dev/sport[01] on BF527

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

2009-03-25 08:39:44     Kernel panic on access to /dev/sport[01] on BF527

Ulisses Montenegro (BRAZIL)

Message: 71526   

 

Hi there.

 

We are getting reproducible kernel panics whenever we try to read or write anything to either /dev/sport0 or /dev/sport1 on our BF527-EZKIT board running 2008R1.5-RC3. sport0 conflicts with bfin_mac, which I need for Ethernet support, while sport1 conflicts with bfin-uart, which we need for serial console debugging. As far as I can tell, it should be possible to use both SPORT and Ethernet/UART on the boards, even if they do share some pins according to Analog hardware reference. Is this supported on the BF527-EZKIT? If so, how would I proceed in order to have SPORT and Ethernet/UART support?

 

root:~> echo 123 > /dev/sport0

peripheral_request: Peripheral 31 function 0 is already reserved by bfin_mac !

Hardware Trace:

   0 Target : <0x00004828> { _dump_stack + 0x0 }

     Source : <0x00005d02> { _peripheral_request + 0x14a }

   1 Target : <0x00005d02> { _peripheral_request + 0x14a }

     Source : <0x0000d412> { _printk + 0x16 }

   2 Target : <0x0000d40e> { _printk + 0x12 }

     Source : <0x0000d2c4> { _vprintk + 0x1b8 }

   3 Target : <0x0000d2b8> { _vprintk + 0x1ac }

     Source : <0x0000d2aa> { _vprintk + 0x19e }

   4 Target : <0x0000d2a6> { _vprintk + 0x19a }

     Source : <0x0000d106> { _wake_up_klogd + 0x36 }

   5 Target : <0x0000d102> { _wake_up_klogd + 0x32 }

     Source : <0x0000949c> { ___wake_up + 0x2c }

   6 Target : <0x00009496> { ___wake_up + 0x26 }

     Source : <0x00009488> { ___wake_up + 0x18 }

   7 Target : <0x00009484> { ___wake_up + 0x14 }

     Source : <0x0000946e> { ___wake_up_common + 0x52 }

   8 Target : <0x00009460> { ___wake_up_common + 0x44 }

     Source : <0x00009456> { ___wake_up_common + 0x3a }

   9 Target : <0x00009450> { ___wake_up_common + 0x34 }

     Source : <0x0001d104> { _autoremove_wake_function + 0x2c }

  10 Target : <0x0001d0ea> { _autoremove_wake_function + 0x12 }

     Source : <0x0000a430> { _try_to_wake_up + 0x3c }

  11 Target : <0x0000a428> { _try_to_wake_up + 0x34 }

     Source : <0x0000a41a> { _try_to_wake_up + 0x26 }

  12 Target : <0x0000a414> { _try_to_wake_up + 0x20 }

     Source : <0x0000a43e> { _try_to_wake_up + 0x4a }

  13 Target : <0x0000a43a> { _try_to_wake_up + 0x46 }

     Source : <0x0000a4c0> { _try_to_wake_up + 0xcc }

  14 Target : <0x0000a4be> { _try_to_wake_up + 0xca }

     Source : <0x0000a49c> { _try_to_wake_up + 0xa8 }

  15 Target : <0x0000a48e> { _try_to_wake_up + 0x9a }

     Source : <0x000096d2> { ___activate_task + 0x2e }

Stack from 03153d70:

        00027bca 00005d06 00000002 0000801f 0000000f 001367a4 0000001f 00000000

        00b49b34 00005d54 0019dba8 030944c4 00d23d60 00000000 00000000 00171104

        00000001 000a4bd0 0009c0a4 03b22800 0009c0e4 03b22800 00000000 03ef37a0

        03132000 00000000 030944c4 00d23d60 001710d4 03b22800 00038a68 03b22800

        03ecdd00 0000001f 0003f480 00000000 0003520e 00d23d60 030944c4 000389ec

        00000000 00000000 03ecddb4 00016358 031eebcc 00035378 00d23d60 00000005

 

Call Trace:

[<000353be>] _do_filp_open+0x3a/0x44

[<000172de>] _sys_rt_sigaction+0x4e/0x84

[<00017290>] _sys_rt_sigaction+0x0/0x84

[<000353fa>] _do_sys_open+0x32/0xac

[<00035494>] _sys_open+0x1c/0x24

[<00035478>] _sys_open+0x0/0x24

[<00008000>] __l1_sram_free+0xc/0xb4

 

bf5xx-sportdev: Requesting Peripherals failed

BUG: failure at arch/blackfin/kernel/bfin_dma_5xx.c:165/free_dma()!

Kernel panic - not syncing: BUG!

 

root:~> echo 123 > /dev/sport1

peripheral_request: Peripheral 15 function 1 is already reserved by bfin-uart !

Hardware Trace:

   0 Target : <0x00004828> { _dump_stack + 0x0 }

     Source : <0x00005d02> { _peripheral_request + 0x14a }

   1 Target : <0x00005d02> { _peripheral_request + 0x14a }

     Source : <0x0000d412> { _printk + 0x16 }

   2 Target : <0x0000d40e> { _printk + 0x12 }

     Source : <0x0000d2c4> { _vprintk + 0x1b8 }

   3 Target : <0x0000d2b8> { _vprintk + 0x1ac }

     Source : <0x0000d2aa> { _vprintk + 0x19e }

   4 Target : <0x0000d2a6> { _vprintk + 0x19a }

     Source : <0x0000d106> { _wake_up_klogd + 0x36 }

   5 Target : <0x0000d102> { _wake_up_klogd + 0x32 }

     Source : <0x0000949c> { ___wake_up + 0x2c }

   6 Target : <0x00009496> { ___wake_up + 0x26 }

     Source : <0x00009488> { ___wake_up + 0x18 }

   7 Target : <0x00009484> { ___wake_up + 0x14 }

     Source : <0x0000946e> { ___wake_up_common + 0x52 }

   8 Target : <0x00009460> { ___wake_up_common + 0x44 }

     Source : <0x00009456> { ___wake_up_common + 0x3a }

   9 Target : <0x00009450> { ___wake_up_common + 0x34 }

     Source : <0x0001d104> { _autoremove_wake_function + 0x2c }

  10 Target : <0x0001d0ea> { _autoremove_wake_function + 0x12 }

     Source : <0x0000a430> { _try_to_wake_up + 0x3c }

  11 Target : <0x0000a428> { _try_to_wake_up + 0x34 }

     Source : <0x0000a41a> { _try_to_wake_up + 0x26 }

  12 Target : <0x0000a414> { _try_to_wake_up + 0x20 }

     Source : <0x0000a43e> { _try_to_wake_up + 0x4a }

  13 Target : <0x0000a43a> { _try_to_wake_up + 0x46 }

     Source : <0x0000a4c0> { _try_to_wake_up + 0xcc }

  14 Target : <0x0000a4be> { _try_to_wake_up + 0xca }

     Source : <0x0000a49c> { _try_to_wake_up + 0xa8 }

  15 Target : <0x0000a48e> { _try_to_wake_up + 0x9a }

     Source : <0x000096d2> { ___activate_task + 0x2e }

Stack from 001d3d70:

        00027bca 00005d06 00000000 0000820f 00000010 001367a4 0000000f 00000001

        00b49a34 00005d54 0019dbba 030943a8 00e5a760 00000000 00000006 00171104

        00000001 000a4bd0 0009c0a4 038c68c4 0009c154 038c68c4 00000000 03ef37a0

        001be000 00000000 030943a8 00e5a760 001710d4 038c68c4 00038a68 038c68c4

        00000001 00000000 0003f480 00000000 0003520e 00e5a760 030943a8 000389ec

        00000000 00000000 00b5317c 0000ffff 031eebcc 00035378 00e5a760 00000005

 

Call Trace:

[<000353be>] _do_filp_open+0x3a/0x44

[<001be005>] _icmp_init+0x21/0x64

[<001be000>] _icmp_init+0x1c/0x64

[<000172de>] _sys_rt_sigaction+0x4e/0x84

[<00017290>] _sys_rt_sigaction+0x0/0x84

[<000353fa>] _do_sys_open+0x32/0xac

[<00035494>] _sys_open+0x1c/0x24

[<00035478>] _sys_open+0x0/0x24

[<00008000>] __l1_sram_free+0xc/0xb4

 

bf5xx-sportdev: Requesting Peripherals failed

BUG: failure at arch/blackfin/kernel/bfin_dma_5xx.c:165/free_dma()!

Kernel panic - not syncing: BUG!

 

config.linux-2.6.x

dmesg.txt

QuoteReplyEditDelete

 

 

2009-03-25 09:16:51     Re: Kernel panic on access to /dev/sport[01] on BF527

Ulisses Montenegro (BRAZIL)

Message: 71529   

 

Just confirmed that it also happens in trunk, though the messages regarding conflicts with bfin_mac and bfin-uart are not present:

 

root:/> uname -a

Linux blackfin 2.6.28.7-ADI-2009R1-pre #3 Wed Mar 25 10:10:11 BRT 2009 blackfin unknown

root:/dev> echo 123 > /dev/sport0

Hardware Trace:

   0 Target : <0x0000498c> { _dump_stack + 0x0 }

     Source : <0x00005ef6> { _peripheral_request + 0xfe } CALL pcrel

   1 Target : <0x00005ef2> { _peripheral_request + 0xfa }

     Source : <0x00005de0> { _cmp_label + 0x30 } RTS

   2 Target : <0x00005dd8> { _cmp_label + 0x28 }

     Source : <0x00005dd0> { _cmp_label + 0x20 } IF !CC JUMP

   3 Target : <0x00005dca> { _cmp_label + 0x1a }

     Source : <0x00005dd4> { _cmp_label + 0x24 } IF CC JUMP

   4 Target : <0x00005dca> { _cmp_label + 0x1a }

     Source : <0x00005dd4> { _cmp_label + 0x24 } IF CC JUMP

   5 Target : <0x00005dca> { _cmp_label + 0x1a }

     Source : <0x00005dd4> { _cmp_label + 0x24 } IF CC JUMP

   6 Target : <0x00005dca> { _cmp_label + 0x1a }

     Source : <0x00005dd4> { _cmp_label + 0x24 } IF CC JUMP

   7 Target : <0x00005db0> { _cmp_label + 0x0 }

     Source : <0x00005eee> { _peripheral_request + 0xf6 } CALL pcrel

   8 Target : <0x00005ee6> { _peripheral_request + 0xee }

     Source : <0x00005e6a> { _peripheral_request + 0x72 } IF !CC JUMP

   9 Target : <0x00005e1a> { _peripheral_request + 0x22 }

     Source : <0x00005e14> { _peripheral_request + 0x1c } IF !CC JUMP

  10 Target : <0x00005e12> { _peripheral_request + 0x1a }

     Source : <0x00005e06> { _peripheral_request + 0xe } IF !CC JUMP

  11 Target : <0x00005df8> { _peripheral_request + 0x0 }

     Source : <0x00005f98> { _peripheral_request_list + 0x24 } CALL pcrel

  12 Target : <0x00005f96> { _peripheral_request_list + 0x22 }

     Source : <0x00005f86> { _peripheral_request_list + 0x12 } JUMP.S

  13 Target : <0x00005f74> { _peripheral_request_list + 0x0 }

     Source : <0x000ab65a> { _sport_open + 0x14a } CALL pcrel

  14 Target : <0x000ab64a> { _sport_open + 0x13a }

     Source : <0x000ab612> { _sport_open + 0x102 } IF CC JUMP

  15 Target : <0x000ab602> { _sport_open + 0xf2 }

     Source : <0x0002b576> { _request_irq + 0x2a } RTS

Stack info:

SP: [0x00677d38] <0x00677d38> /* kernel dynamic memory */

FP: (0x00677d34)

Memory from 0x00677d30 to 00678000

00677d30: 00677d38 (00000000)[0002b4a0]<00005efa> 0000000f  0000801f  00000000 <0004363a>

00677d50: 0389941c  00677e44 <0002b5cc><00005f9c> 001c03c4  00000000  0063c050  00000000

00677d70: 00000000  00182db0  00000001 <000ab602> 03932e00  00000000 <000ab65e> 03932e00

00677d90: 00000000  03ef31a0  00000000 <0003f962> 00000000  0063c050  00182d80  03932e00

00677db0:<0003f906> 03932e00  00000000  00000005  03ea1000  00000000  00000000  0063bbbc

00677dd0:<0003c098> 008706a0  0063c050  0003f898  00000000  00000022  0392bab0  00000200

00677df0:<00677ea4><0003c22a> 008706a0  038990b8  00000000  00000242  00000022 <00045ea4>

00677e10: 00677e44 <00045e1a> 008706a0  00000000 <00045e4c> 00677e44  9f8fe3ff  c005ce82

00677e30: 0000b9c1  00677e44  30059fa1  00000000  00000000  03ef31a0  0063bbbc  d603ad17

00677e50: 00000006  03ea1005  00000300  00000000  00000000 <0003adc2> 03efc500  001abff8

00677e70: 001e0414  00000241  0000ffff  000000d0  00000001 <0004c518> 00000242  000001b6

00677e90: 008706a0  00000241  00000003  03ef31a0  0063bbbc <00761bc0><0003bf52> ffffff9c

00677eb0: 00000005  001e0414  00000241  00000003  03ea1000  00000001  e3ff325c  b9daa0a6

00677ed0: 00000241  000001b6  00761fa8 <0003bfe4> 0003bfcc  00000005  00000241  ffffe000

00677ef0: 00000001  00000000 <ffa00774> 00000000  000001b6 <ffa00774> 00000000  03950c60

00677f10: 03950c60  001a4440  001e0334  00000001  00000001  00701ffa  00008000  00000000

00677f30: 00000000  00678000  00701ffa  00701ffa <00726626><ffa00ca8> 02002000  007120a9

00677f50: 0070c35b  007120a2  0070c35a  00000000  00000000  00000000  00000000  00000000

00677f70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

00677f90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  007bc004

00677fb0: 007619f0  00761bb0 <00761bc0> 001e03ac  001e0334  001e0414  001e046c  001e041c

00677fd0: 00000005  00000000  0074bc84  00000001  00000001  001e0334  000001b6  00000241

00677ff0: 001e0334  001e0334  00000005  00000006  000001f4

Return addresses in stack:

   frame  1 : <0x0002b4a0> { ___setup_irq + 0xc8 }

    address : <0x00005efa> { _peripheral_request + 0x102 }

    address : <0x0004363a> { _do_lookup + 0x46 }

    address : <0x0002b5cc> { _request_irq + 0x80 }

    address : <0x00005f9c> { _peripheral_request_list + 0x28 }

    address : <0x000ab602> { _sport_open + 0xf2 }

    address : <0x000ab65e> { _sport_open + 0x14e }

    address : <0x0003f962> { _chrdev_open + 0xca }

    address : <0x0003f906> { _chrdev_open + 0x6e }

    address : <0x0003c098> { ___dentry_open + 0xa0 }

    address : <0x00677ea4> /* kernel dynamic memory */

    address : <0x0003c22a> { _nameidata_to_filp + 0x2e }

    address : <0x00045ea4> { _do_filp_open + 0x194 }

    address : <0x00045e1a> { _do_filp_open + 0x10a }

    address : <0x00045e4c> { _do_filp_open + 0x13c }

    address : <0x0003adc2> { _kmem_cache_alloc + 0x6a }

    address : <0x0004c518> { _alloc_fd + 0x58 }

    address : <0x00761bc0> [ sh + 0x61bc0 ]

    address : <0x0003bf52> { _do_sys_open + 0x36 }

    address : <0x0003bfe4> { _sys_open + 0x18 }

    address : <0xffa00774> { _system_call + 0x68 }

    address : <0xffa00774> { _system_call + 0x68 }

    address : <0x00726626> [ sh + 0x265e6 ]

    address : <0xffa00ca8> { _evt_system_call + 0x64 }

    address : <0x00761bc0> [ sh + 0x61bc0 ]

peripheral_request: Peripheral 31 function 0 is already reserved by bfin_mac !

bfin-sportdev: Requesting Peripherals failed

Hardware Trace:

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

     Source : <0x00006892> { _free_dma + 0x72 } CALL pcrel

   1 Target : <0x00006892> { _free_dma + 0x72 }

     Source : <0x0000683e> { _free_dma + 0x1e } IF CC JUMP

   2 Target : <0x00006820> { _free_dma + 0x0 }

     Source : <0x000ab590> { _sport_open + 0x80 } CALL pcrel

   3 Target : <0x000ab58c> { _sport_open + 0x7c }

     Source : <0x000ab5e2> { _sport_open + 0xd2 } JUMP.S

   4 Target : <0x000ab5e2> { _sport_open + 0xd2 }

     Source : <0x0003a832> { _kfree + 0x62 } RTS

   5 Target : <0x0003a7d0> { _kfree + 0x0 }

     Source : <0x0002b838> { _free_irq + 0x78 } JUMP.L

   6 Target : <0x0002b830> { _free_irq + 0x70 }

     Source : <0x0006a83a> { _remove_proc_entry + 0x116 } RTS

   7 Target : <0x0006a834> { _remove_proc_entry + 0x110 }

     Source : <0x0003a832> { _kfree + 0x62 } RTS

   8 Target : <0x0003a7d0> { _kfree + 0x0 }

     Source : <0x0006a716> { _free_proc_entry + 0x46 } JUMP.L

   9 Target : <0x0006a6fe> { _free_proc_entry + 0x2e }

     Source : <0x00085b2a> { _ida_remove + 0xf2 } RTS

  10 Target : <0x00085aac> { _ida_remove + 0x74 }

     Source : <0x00085a76> { _ida_remove + 0x3e } IF !CC JUMP

  11 Target : <0x00085a38> { _ida_remove + 0x0 }

     Source : <0x0006a6fa> { _free_proc_entry + 0x2a } CALL pcrel

  12 Target : <0x0006a6ec> { _free_proc_entry + 0x1c }

     Source : <0x0006a6e2> { _free_proc_entry + 0x12 } IF !CC JUMP

  13 Target : <0x0006a6d0> { _free_proc_entry + 0x0 }

     Source : <0x0006a830> { _remove_proc_entry + 0x10c } CALL pcrel

  14 Target : <0x0006a7fc> { _remove_proc_entry + 0xd8 }

     Source : <0x0006a846> { _remove_proc_entry + 0x122 } JUMP.S

  15 Target : <0x0006a83c> { _remove_proc_entry + 0x118 }

     Source : <0x0006a7f8> { _remove_proc_entry + 0xd4 } IF !CC JUMP

BUG: failure at arch/blackfin/kernel/bfin_dma_5xx.c:180/free_dma()!

Kernel panic - not syncing: BUG!

QuoteReplyEditDelete

 

 

2009-03-25 10:06:05     Re: Kernel panic on access to /dev/sport[01] on BF527

Michael Hennerich (GERMANY)

Message: 71530    >though the messages regarding conflicts with bfin_mac

>and bfin-uart are not present:

 

???

 

It still says:

>peripheral_request: Peripheral 31 function 0 is already reserved by bfin_mac !

 

This means that SPORT0_TFS is requested by the MAC driver as RMII0_MDINT.

 

Did you set: CONFIG_BF527_SPORT0_PORTF or CONFIG_BF527_SPORT0_PORTG?

 

If this is the only pin that conflicts you may remove it from the define P_RMII0 in arch/Blackfin/mach-bf527/include/asm/portmux.h

 

#define P_RMII0 {\

P_MII0_ETxD0, \

P_MII0_ETxD1, \

P_MII0_ETxEN, \

P_MII0_ERxD0, \

P_MII0_ERxD1, \

P_MII0_ERxER, \

P_RMII0_REF_CLK, \

P_RMII0_MDINT, \ /* REMOVE THIS LINE */

P_RMII0_CRS_DV, \

P_MDC, \

P_MDIO, 0}

 

The MAC driver currently doesn't use the PHYINT...

 

-Michael

Outcomes