Re: [PATCH 4/5] Generic BUG for powerpc

From: Jeremy Fitzhardinge
Date: Wed Oct 04 2006 - 00:31:14 EST


Michael Ellerman wrote:
I posted a patch a few weeks back to use __builtin_trap(), which gives
GCC the hint that it's not going to return.

Ah, interesting. I'd been looking for it, and, yep, completely undocumented. It even generates the right instruction on x86. Unfortunately, your asm sequence isn't correct, since there's no guarantee that the asm and the builtin_trap will be adjacent (though its hard to see what might be interposed in this case, since it would be dead code). If only gcc labels-as-values worked properly...

(http://patchwork.ozlabs.org/linuxppc/patch?id=7047)

Unfortunately this generated some negative feedback from some of our
crackhead ... er wonderful colleagues who want to be able to step over
BUGs in some circumstances.
(http://ozlabs.org/pipermail/linuxppc-dev/2006-September/026161.html)

I think they conceeded that it could be configurable, but I wasn't sure
it was worth the trouble.

Hm, not really. Well, it can be an arch-by-arch decision.

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