Skip to content

Commit

Permalink
[SPARC64]: Fix branch signedness bug in all code patching.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent 1a7a242 commit 6241e5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion arch/sparc64/lib/NGpage.S
Original file line number Diff line number Diff line change
Expand Up @@ -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]; \
Expand Down
3 changes: 2 additions & 1 deletion arch/sparc64/lib/NGpatch.S
Original file line number Diff line number Diff line change
Expand Up @@ -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]; \
Expand Down
3 changes: 2 additions & 1 deletion arch/sparc64/lib/U3patch.S
Original file line number Diff line number Diff line change
Expand Up @@ -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]; \
Expand Down

0 comments on commit 6241e5c

Please sign in to comment.