Subject: Re: linux-next: PowerPC WARN_ON_ONCE() after merge of the final tree (tip related)

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 16 Apr 2010 11:51:30 +1000

On Thu, 2010-04-15 at 09:32 +0200, Ingo Molnar wrote:
> It trades robustness for slightly better space/code efficiency.
> 
> Such a trap based mechanism exists on x86 as well and we use it for BUG_ON(). 
> We intentionally dont use it to generate warnings and dont override __WARN(), 
> because it would blow up way too often when a warning triggers in some 
> sensitive codepath that cannot take a trap.
> 
> Anyway, the warning obviously has to be fixed - but the boot crash itself is 
> PowerPC's own doing. 

Well, yes and no, as I explained in a separate branch of that thread. We
indeed can't cope with a WARN in that spot because it goes recursive. 

Now the reason we have this double-enable is due afaik to the way I
implemented IRQ trace, because things like syscalls basically
force-enable IRQs on powerpc and I don't necessarily have tracking
informations in the exception return path of what the "old" value was.

I need to double check what the exact scenario here is and whether I can
fix it but it's one of those cases where what lockdep is warning about
isn't actually an error I believe.

Cheers,
Ben.