fix WARN() for PPC
PATCH 1/1 fix WARN() for PPC
From: Arjan van de Ven <[email protected]>
Date: Mon, 20 Oct 2008 14:41:03 -0700
Subject: [PATCH] fix WARN() for PPC
powerpc doesn't use the generic WARN_ON infrastructure. The newly introduced WARN() as a result didn't print the message, this patch adds the printk for this specific case.
--- include/asm-generic/bug.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-generic/bug.h +1 -1
@@ -41,7 +41,7 @@ extern void warn_slowpath(const char *file, const int line,#define __WARN () warn_on_slowpath(__FILE__, __LINE__) #define __WARN_printf(arg...) warn_slowpath(__FILE__, __LINE__, arg)#else -#define __WARN_printf(arg...) __WARN() +#define __WARN_printf(arg...) do { printk(arg); __WARN(); } while (0)#endif #ifndef WARN_ON
Signature · 8 lines
1.5.5.1 -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Quoted 8 lines · Arjan van de Ven
From: Arjan van de Ven <[email protected]>
Date: Mon, 20 Oct 2008 14:41:03 -0700
Subject: [PATCH] fixWARN()for PPCpowerpc doesn't use the generic
WARN_ONinfrastructure. The newly introducedWARN()as a result didn't print the message, this patch adds the printk for this specific case.Signed-off-by Arjan van de Ven <[email protected]>
Thanks, will apply.
Cheers,
Ben.
Quoted 5 lines · Arjan van de Ven
From: Arjan van de Ven <[email protected]>
Date: Mon, 20 Oct 2008 14:41:03 -0700
Subject: [PATCH] fixWARN()for PPCpowerpc doesn't use the generic
WARN_ONinfrastructure.
Hm, why's that now? The generic infrastructure was taken from powerpc, and I thought I'd converted it...
J
Quoted 10 lines · On Wed, 22 Oct 2008 13:23:21 -0700 Jeremy Fitzhardinge <[email protected]> wrote:
Quoted 5 lines · Arjan van de Ven
From: Arjan van de Ven <[email protected]>
Date: Mon, 20 Oct 2008 14:41:03 -0700
Subject: [PATCH] fixWARN()for PPCpowerpc doesn't use the generic
WARN_ONinfrastructure.Hm, why's that now? The generic infrastructure was taken from powerpc, and I thought I'd converted it...
it uses a BUG like trap rather than the normal WARN_ON() being a function call to lib/bug.c
Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Quoted 9 lines · Jeremy Fitzhardinge
Quoted 5 lines · Arjan van de Ven
From: Arjan van de Ven <[email protected]>
Date: Mon, 20 Oct 2008 14:41:03 -0700
Subject: [PATCH] fixWARN()for PPCpowerpc doesn't use the generic
WARN_ONinfrastructure.Hm, why's that now? The generic infrastructure was taken from powerpc, and I thought I'd converted it...
The definition of "generic" changed midway. When you did the "generic" infrastructure, it was written to use traps for both WARN and BUG. But then somebody didn't like that and added new "generic" infrastructure (the one Arjan is talking about) which doesn't use traps for WARN but rather an unlikely() and an actual function call etc. Then Arjan improved the latter "generic" infrastructure without regard for the original one.
johannes