]> git.hungrycats.org Git - linux/commitdiff
ia64: Fix off-by-1 error in imm60 patching. The bug hasn't been observed
authorDavid Mosberger <davidm@tiger.hpl.hp.com>
Fri, 21 Nov 2003 05:25:04 +0000 (21:25 -0800)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Fri, 21 Nov 2003 05:25:04 +0000 (21:25 -0800)
in practice, but it's clearly wrong and just waiting there to
get triggered...

arch/ia64/kernel/patch.c

index ca9b8a3f7dc84508331b2d939a0f098f0dcceee8..ef04f5df01c5096edf7882d0705149999fce75b8 100644 (file)
@@ -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);
 }