]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/sh/kernel/cpu/sh5/unwind.c: use sign_extend64() for sign extension
authorMartin Kepplinger <martink@posteo.de>
Wed, 21 Oct 2015 22:03:51 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:51 +0000 (09:03 +1100)
Signed-off-by: Martin Kepplinger <martin.kepplinger@theobroma-system
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: George Spelvin <linux@horizon.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/sh/kernel/cpu/sh5/unwind.c

index 10aed41757fc8247f9e1c271623907b31192607b..3a4fed406fc615b27d48088c2f35396b788dd779 100644 (file)
@@ -159,7 +159,7 @@ static int lookup_prev_stack_frame(unsigned long fp, unsigned long pc,
 
                        /* Sign extend */
                        regcache[dest] =
-                               ((((s64)(u64)op >> 10) & 0xffff) << 54) >> 54;
+                               sign_extend64((((u64)op >> 10) & 0xffff), 9);
                        break;
                case (0xd0 >> 2): /* addi */
                case (0xd4 >> 2): /* addi.l */