RE: linux-2.6.20 setjmp/longjmp OR how to contain bus-error fornon-existing PCI device during PCI device scan?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ralf;
 
>>    I am using linux-2.6.20 on MIPS24KE and I need to know what is the best way to contain bus error during PCI bus >>scan process for non-existing device? I thought of setjmp/longjmp but unfortunately, I have `googled` and `find` the >>whole kernel source tree there is no such support in the kernel for MIPS architecture. Any insight is appreciated.

>Welcome to the kernel, there are no setjmp / longjmp.  You can can try to
>use the functions from <asm/paccess.h> to protect your memory accesses
>against bus error exceptions.  Note this won't work for cases where the
>bus error exceptions is imprecise because then the EPC for the exception
>isn't guranteed to have the proper value. 
 
Is there any general way to find out if the bus error exception is precise?
 
b7000800: <6>Bus Error!

Data bus error, epc == 80035ca4, ra == 8042f2dc

Oops[#1]:

Cpu 0

$ 0 : 00000000 0000000a 0000000e 00000001

$ 4 : 803b575c ffffffff 803fa314 be100c00

$ 8 : 804c0000 001ac70b 0000000b 804cc6e0

$12 : 804c0000 8040470c 00000002 00000000

$16 : b7000800 00000000 803e0000 b7ffffff

$20 : 803da18c 803b0000 00000000 00000000

$24 : 804c0000 0000000c

$28 : 81058000 81059f20 00000000 8042f2dc

Hi : 00000000

Lo : 00000000

epc : 80035ca4 printk+0x4/0x28 Not tainted

ra : 8042f2dc danube_pcibios_init+0x434/0x458

Status: 1100fe03 KERNEL EXL IE

Cause : 0080001c

PrId : 00019641

Modules linked in:

Process swapper (pid: 1, threadinfo=81058000, task=81056868)

Stack : 803fa314 be100c00 80410000 00000103 8042f2c4 8042f21c 00000000 b7000800

803fa314 00000000 80408dbc 80408dc4 80436948 00000000 80430000 00000000

80436b78 00000000 00000000 80002500 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000001 00000000 00000000 00000000 00000000 00000000

...

Call Trace:

[<80035ca4>] printk+0x4/0x28

[<8042f2dc>] danube_pcibios_init+0x434/0x458

[<80002500>] init+0xb0/0x3b0

[<8000f9b0>] kernel_thread_helper+0x10/0x18

 

Code: 1000fe4e 00000000 27bdffe8 <afa5001c> 27a5001c afbf0010 afa60020 0c00d55e afa70024

Kernel panic - not syncing: Attempted to kill init!

> The get_dbe / put_dbe functions
>are used just like get_user / put_user from <linux/uaccess.h> except that
>those are meant to protect against TLB exceptions.

I used get_dbe and it still doesn't solve the problem.

>Or just temporarily disable the bus error in your PCI config space
>accessors.

I will use this method but I need to know how to find out if the bus error exception is precise.

Thanks & Regards,
KH


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux