aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/lib/bitops.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-11 23:33:22 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-11 23:33:22 -0400
commit8695c37d06721c581385725eb80ba4e6d6bdf73f (patch)
tree072f37f58590aea8ca880b6175d127809edd4cec /arch/sparc/lib/bitops.S
parentb55e81b9f8cf0256bcfc548360aef642630c2919 (diff)
sparc: Convert some assembler over to linakge.h's ENTRY/ENDPROC
Use those, instead of doing it all by hand. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/lib/bitops.S')
-rw-r--r--arch/sparc/lib/bitops.S37
1 files changed, 13 insertions, 24 deletions
diff --git a/arch/sparc/lib/bitops.S b/arch/sparc/lib/bitops.S
index 3dc61d5537c0..36f72cc0e67e 100644
--- a/arch/sparc/lib/bitops.S
+++ b/arch/sparc/lib/bitops.S
@@ -3,14 +3,13 @@
3 * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#include <linux/linkage.h>
6#include <asm/asi.h> 7#include <asm/asi.h>
7#include <asm/backoff.h> 8#include <asm/backoff.h>
8 9
9 .text 10 .text
10 11
11 .globl test_and_set_bit 12ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */
12 .type test_and_set_bit,#function
13test_and_set_bit: /* %o0=nr, %o1=addr */
14 BACKOFF_SETUP(%o3) 13 BACKOFF_SETUP(%o3)
15 srlx %o0, 6, %g1 14 srlx %o0, 6, %g1
16 mov 1, %o2 15 mov 1, %o2
@@ -29,11 +28,9 @@ test_and_set_bit: /* %o0=nr, %o1=addr */
29 retl 28 retl
30 nop 29 nop
312: BACKOFF_SPIN(%o3, %o4, 1b) 302: BACKOFF_SPIN(%o3, %o4, 1b)
32 .size test_and_set_bit, .-test_and_set_bit 31ENDPROC(test_and_set_bit)
33 32
34 .globl test_and_clear_bit 33ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */
35 .type test_and_clear_bit,#function
36test_and_clear_bit: /* %o0=nr, %o1=addr */
37 BACKOFF_SETUP(%o3) 34 BACKOFF_SETUP(%o3)
38 srlx %o0, 6, %g1 35 srlx %o0, 6, %g1
39 mov 1, %o2 36 mov 1, %o2
@@ -52,11 +49,9 @@ test_and_clear_bit: /* %o0=nr, %o1=addr */
52 retl 49 retl
53 nop 50 nop
542: BACKOFF_SPIN(%o3, %o4, 1b) 512: BACKOFF_SPIN(%o3, %o4, 1b)
55 .size test_and_clear_bit, .-test_and_clear_bit 52ENDPROC(test_and_clear_bit)
56 53
57 .globl test_and_change_bit 54ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */
58 .type test_and_change_bit,#function
59test_and_change_bit: /* %o0=nr, %o1=addr */
60 BACKOFF_SETUP(%o3) 55 BACKOFF_SETUP(%o3)
61 srlx %o0, 6, %g1 56 srlx %o0, 6, %g1
62 mov 1, %o2 57 mov 1, %o2
@@ -75,11 +70,9 @@ test_and_change_bit: /* %o0=nr, %o1=addr */
75 retl 70 retl
76 nop 71 nop
772: BACKOFF_SPIN(%o3, %o4, 1b) 722: BACKOFF_SPIN(%o3, %o4, 1b)
78 .size test_and_change_bit, .-test_and_change_bit 73ENDPROC(test_and_change_bit)
79 74
80 .globl set_bit 75ENTRY(set_bit) /* %o0=nr, %o1=addr */
81 .type set_bit,#function
82set_bit: /* %o0=nr, %o1=addr */
83 BACKOFF_SETUP(%o3) 76 BACKOFF_SETUP(%o3)
84 srlx %o0, 6, %g1 77 srlx %o0, 6, %g1
85 mov 1, %o2 78 mov 1, %o2
@@ -96,11 +89,9 @@ set_bit: /* %o0=nr, %o1=addr */
96 retl 89 retl
97 nop 90 nop
982: BACKOFF_SPIN(%o3, %o4, 1b) 912: BACKOFF_SPIN(%o3, %o4, 1b)
99 .size set_bit, .-set_bit 92ENDPROC(set_bit)
100 93
101 .globl clear_bit 94ENTRY(clear_bit) /* %o0=nr, %o1=addr */
102 .type clear_bit,#function
103clear_bit: /* %o0=nr, %o1=addr */
104 BACKOFF_SETUP(%o3) 95 BACKOFF_SETUP(%o3)
105 srlx %o0, 6, %g1 96 srlx %o0, 6, %g1
106 mov 1, %o2 97 mov 1, %o2
@@ -117,11 +108,9 @@ clear_bit: /* %o0=nr, %o1=addr */
117 retl 108 retl
118 nop 109 nop
1192: BACKOFF_SPIN(%o3, %o4, 1b) 1102: BACKOFF_SPIN(%o3, %o4, 1b)
120 .size clear_bit, .-clear_bit 111ENDPROC(clear_bit)
121 112
122 .globl change_bit 113ENTRY(change_bit) /* %o0=nr, %o1=addr */
123 .type change_bit,#function
124change_bit: /* %o0=nr, %o1=addr */
125 BACKOFF_SETUP(%o3) 114 BACKOFF_SETUP(%o3)
126 srlx %o0, 6, %g1 115 srlx %o0, 6, %g1
127 mov 1, %o2 116 mov 1, %o2
@@ -138,4 +127,4 @@ change_bit: /* %o0=nr, %o1=addr */
138 retl 127 retl
139 nop 128 nop
1402: BACKOFF_SPIN(%o3, %o4, 1b) 1292: BACKOFF_SPIN(%o3, %o4, 1b)
141 .size change_bit, .-change_bit 130ENDPROC(change_bit)