From 9c2a4aeb86a467286fee65fb4a056fbd9f78dffd Mon Sep 17 00:00:00 2001 From: David Mosberger Date: Thu, 20 Nov 2003 21:25:04 -0800 Subject: [PATCH] ia64: Fix off-by-1 error in imm60 patching. The bug hasn't been observed in practice, but it's clearly wrong and just waiting there to get triggered... --- arch/ia64/kernel/patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c index ca9b8a3f7dc84..ef04f5df01c50 100644 --- a/arch/ia64/kernel/patch.c +++ b/arch/ia64/kernel/patch.c @@ -77,7 +77,7 @@ void ia64_patch_imm60 (u64 insn_addr, u64 val) { ia64_patch(insn_addr, - 0x011ffffe000, ( ((val & 0x1000000000000000) >> 24) /* bit 60 -> 36 */ + 0x011ffffe000, ( ((val & 0x0800000000000000) >> 23) /* bit 59 -> 36 */ | ((val & 0x00000000000fffff) << 13) /* bit 0 -> 13 */)); ia64_patch(insn_addr - 1, 0x1fffffffffc, val >> 18); } -- 2.53.0