Skip to content

Commit

Permalink
ARM: 7125/1: Add unwinding annotations for 64bit division functions
Browse files Browse the repository at this point in the history
The 64bit division functions never had unwinding annotations
added. This prevents a backtrace from being printed within
the function and if a division by 0 occurs. Add the annotations.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Laura Abbott authored and Russell King committed Oct 17, 2011
1 parent 4bdad98 commit 01885bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/arm/lib/div64.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include <linux/linkage.h>
#include <asm/unwind.h>

#ifdef __ARMEB__
#define xh r0
Expand Down Expand Up @@ -44,6 +45,7 @@
*/

ENTRY(__do_div64)
UNWIND(.fnstart)

@ Test for easy paths first.
subs ip, r4, #1
Expand Down Expand Up @@ -189,7 +191,12 @@ ENTRY(__do_div64)
moveq yh, xh
moveq xh, #0
moveq pc, lr
UNWIND(.fnend)

UNWIND(.fnstart)
UNWIND(.pad #4)
UNWIND(.save {lr})
Ldiv0_64:
@ Division by 0:
str lr, [sp, #-8]!
bl __div0
Expand All @@ -200,4 +207,5 @@ ENTRY(__do_div64)
mov xh, #0
ldr pc, [sp], #8

UNWIND(.fnend)
ENDPROC(__do_div64)

0 comments on commit 01885bc

Please sign in to comment.