[SPARC64]: Fix branch signedness bug in all code patching.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 12 Feb 2006 07:28:40 +0000 (23:28 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 20 Mar 2006 09:12:29 +0000 (01:12 -0800)
The bug that hit SUN4V TLB patching exists elsewhere.
Make sure we cure all such cases.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/lib/NGpage.S
arch/sparc64/lib/NGpatch.S
arch/sparc64/lib/U3patch.S

index 0e6152c28b013ffd092ec1de56b6f0b3b0757681..7d7c3bb8dcbfe0e2d87af5e815d3fcf7d9b184e4 100644 (file)
@@ -75,7 +75,8 @@ NGclear_user_page:    /* %o0=dest, %o1=vaddr */
        or      %g2, %lo(OLD), %g2; \
        sub     %g1, %g2, %g1; \
        sethi   %hi(BRANCH_ALWAYS), %g3; \
-       srl     %g1, 2, %g1; \
+       sll     %g1, 11, %g1; \
+       srl     %g1, 11 + 2, %g1; \
        or      %g3, %lo(BRANCH_ALWAYS), %g3; \
        or      %g3, %g1, %g3; \
        stw     %g3, [%g2]; \
index f13ec9e4c8a3e622c939f1a159cd9b2dfca5c48c..3b0674fc336630844be3ab8f0e5e174816e7a4e5 100644 (file)
@@ -12,7 +12,8 @@
        or      %g2, %lo(OLD), %g2; \
        sub     %g1, %g2, %g1; \
        sethi   %hi(BRANCH_ALWAYS), %g3; \
-       srl     %g1, 2, %g1; \
+       sll     %g1, 11, %g1; \
+       srl     %g1, 11 + 2, %g1; \
        or      %g3, %lo(BRANCH_ALWAYS), %g3; \
        or      %g3, %g1, %g3; \
        stw     %g3, [%g2]; \
index e2b6c5e4b95ad02dc0964d2fdc06fcb77e919cb5..ecc302619a6ed387b6d09dda8ae1d32944b97322 100644 (file)
@@ -12,7 +12,8 @@
        or      %g2, %lo(OLD), %g2; \
        sub     %g1, %g2, %g1; \
        sethi   %hi(BRANCH_ALWAYS), %g3; \
-       srl     %g1, 2, %g1; \
+       sll     %g1, 11, %g1; \
+       srl     %g1, 11 + 2, %g1; \
        or      %g3, %lo(BRANCH_ALWAYS), %g3; \
        or      %g3, %g1, %g3; \
        stw     %g3, [%g2]; \
This page took 0.025828 seconds and 5 git commands to generate.