diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-01-01 13:45:34 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-01-09 01:03:02 -0500 |
commit | 007d88d042d7b71aa2c9fc615aef97888e20ddf3 (patch) | |
tree | a379db67a9ed8c0c118ccf6d394637c9010c9a2c /arch/powerpc/kernel/entry_64.S | |
parent | 673aeb76d07f49f2b07792f813bc2a9fee212ab7 (diff) |
[POWERPC] Fix manual assembly WARN_ON() in enter_rtas().
When we switched over to the generic BUG mechanism we forgot to change
the assembly code which open-codes a WARN_ON() in enter_rtas(), so the
bug table got corrupted.
This patch provides an EMIT_BUG_ENTRY macro for use in assembly code,
and uses it in entry_64.S. Tested with CONFIG_DEBUG_BUGVERBOSE on ppc64
but not without -- I tried to turn it off but it wouldn't go away; I
suspect Aunt Tillie probably needed it.
This version gets __FILE__ and __LINE__ right in the assembly version --
rather than saying include/asm-powerpc/bug.h line 21 every time which is
a little suboptimal.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 1a3d4de197d2..2551c0884afc 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/asm-offsets.h> | 28 | #include <asm/asm-offsets.h> |
29 | #include <asm/cputable.h> | 29 | #include <asm/cputable.h> |
30 | #include <asm/firmware.h> | 30 | #include <asm/firmware.h> |
31 | #include <asm/bug.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * System calls. | 34 | * System calls. |
@@ -634,19 +635,15 @@ _GLOBAL(enter_rtas) | |||
634 | li r0,0 | 635 | li r0,0 |
635 | mtcr r0 | 636 | mtcr r0 |
636 | 637 | ||
638 | #ifdef CONFIG_BUG | ||
637 | /* There is no way it is acceptable to get here with interrupts enabled, | 639 | /* There is no way it is acceptable to get here with interrupts enabled, |
638 | * check it with the asm equivalent of WARN_ON | 640 | * check it with the asm equivalent of WARN_ON |
639 | */ | 641 | */ |
640 | lbz r0,PACASOFTIRQEN(r13) | 642 | lbz r0,PACASOFTIRQEN(r13) |
641 | 1: tdnei r0,0 | 643 | 1: tdnei r0,0 |
642 | .section __bug_table,"a" | 644 | EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,BUGFLAG_WARNING |
643 | .llong 1b,__LINE__ + 0x1000000, 1f, 2f | 645 | #endif |
644 | .previous | 646 | |
645 | .section .rodata,"a" | ||
646 | 1: .asciz __FILE__ | ||
647 | 2: .asciz "enter_rtas" | ||
648 | .previous | ||
649 | |||
650 | /* Hard-disable interrupts */ | 647 | /* Hard-disable interrupts */ |
651 | mfmsr r6 | 648 | mfmsr r6 |
652 | rldicl r7,r6,48,1 | 649 | rldicl r7,r6,48,1 |