[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444986427-12101-4-git-send-email-martink@posteo.de>
Date: Fri, 16 Oct 2015 11:07:05 +0200
From: Martin Kepplinger <martink@...teo.de>
To: mingo@...nel.org, akpm@...ux-foundation.org, linux@...izon.com,
linux@...musvillemoes.dk, maxime.coquelin@...com,
dvlasenk@...hat.com, yury.norov@...il.com,
torvalds@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
Martin Kepplinger <martink@...teo.de>,
Martin Kepplinger <martin.kepplinger@...obroma-systems.com>
Subject: [PATCH 3/5] arch: sh: use sign_extend64() for sign extension
Signed-off-by: Martin Kepplinger <martin.kepplinger@...obroma-systems.com>
---
arch/sh/kernel/traps_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c
index 112ea11..d208c27 100644
--- a/arch/sh/kernel/traps_64.c
+++ b/arch/sh/kernel/traps_64.c
@@ -101,7 +101,7 @@ static int generate_and_check_address(struct pt_regs *regs,
if (displacement_not_indexed) {
__s64 displacement;
displacement = (opcode >> 10) & 0x3ff;
- displacement = ((displacement << 54) >> 54); /* sign extend */
+ displacement = sign_extend64(displacement, 9);
addr = (__u64)((__s64)base_address + (displacement << width_shift));
} else {
__u64 offset;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists