From: Tommy Reynolds <reynolds@redhat.com>
To: "Ingo Oeser" <ingo.oeser@informatik.tu-chemnitz.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can BUG() also be used "safely" in interrupts?
Date: Fri, 17 May 2002 09:27:40 -0500 [thread overview]
Message-ID: <20020517092740.62b4d60b.reynolds@redhat.com> (raw)
In-Reply-To: <20020517090139.G635@nightmaster.csn.tu-chemnitz.de>
Uttered "Ingo Oeser" <ingo.oeser@informatik.tu-chemnitz.de>, spoke thus:
> I have a routine to be used in an ISR or BH, where I like to use
> BUG(), to flag real bugs the caller produces, if he uses it with
> wrong arguments (namely: check for asserted interrupts according
> to a mask and flag an BUG(), if the mask is bogus).
>
> So can BUG() be used in an ISR or BH?
BUG() is overkill here, since it breaks all existing spin locks trying to get
the error message printed by the kernel. Instead, why not just:
printk( KERN_WARN "spurious interrupt from my device\n" );
like everyone else does? Keep in mind that if you are sharing an interrupt
vector, each and every interrupt handler gets called for each and every
interrupt, so having the device driver check that the device to which it is
attached is really generating an interrupt is simple good form.
next prev parent reply other threads:[~2002-05-17 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-17 7:01 Ingo Oeser
2002-05-17 14:27 ` Tommy Reynolds [this message]
2002-05-18 18:58 ` Ingo Oeser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020517092740.62b4d60b.reynolds@redhat.com \
--to=reynolds@redhat.com \
--cc=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®