[Top] [All Lists]

Re: linux-2.6.20 setjmp/longjmp OR how to contain bus-error for non-exis

Subject: Re: linux-2.6.20 setjmp/longjmp OR how to contain bus-error for non-existing PCI device during PCI device scan?
From: Ralf Baechle <>
Date: Tue, 17 Jul 2007 19:02:47 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.14 (2007-02-12)
On Tue, Jul 17, 2007 at 07:03:34PM +0800, wrote:

>    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.  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.

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


<Prev in Thread] Current Thread [Next in Thread>