lkml.org 
[lkml]   [2006]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 1/4] Generic BUG handling.
On 29 Sep 2006 10:57:45 +0200
Andi Kleen <ak@muc.de> wrote:

> > Some architectures (powerpc) implement WARN using the same mechanism;
> > if the illegal instruction was the result of a WARN, then report_bug()
> > returns 1; otherwise it returns 0.
>
> In theory we could do that on x86 too (and skipping the instruction),
> the only problem
> is that the only guaranteed to fault opcode is ud2 :/. Ok maybe we could
> reserve some int XXX vector.
>
> % gid WARN_ON | grep -v arch | wc -l
> 299

powerpc sets a bit in the __LINE__ number to indicate that it was a
WARN_ON. That'll work on all architectures.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-29 11:13    [W:0.235 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site