diff options
Diffstat (limited to 'arch/sparc/lib/bitops.S')
| -rw-r--r-- | arch/sparc/lib/bitops.S | 37 |
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 | 12 | ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */ |
| 12 | .type test_and_set_bit,#function | ||
| 13 | test_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 |
| 31 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 30 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 32 | .size test_and_set_bit, .-test_and_set_bit | 31 | ENDPROC(test_and_set_bit) |
| 33 | 32 | ||
| 34 | .globl test_and_clear_bit | 33 | ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */ |
| 35 | .type test_and_clear_bit,#function | ||
| 36 | test_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 |
| 54 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 51 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 55 | .size test_and_clear_bit, .-test_and_clear_bit | 52 | ENDPROC(test_and_clear_bit) |
| 56 | 53 | ||
| 57 | .globl test_and_change_bit | 54 | ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */ |
| 58 | .type test_and_change_bit,#function | ||
| 59 | test_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 |
| 77 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 72 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 78 | .size test_and_change_bit, .-test_and_change_bit | 73 | ENDPROC(test_and_change_bit) |
| 79 | 74 | ||
| 80 | .globl set_bit | 75 | ENTRY(set_bit) /* %o0=nr, %o1=addr */ |
| 81 | .type set_bit,#function | ||
| 82 | set_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 |
| 98 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 91 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 99 | .size set_bit, .-set_bit | 92 | ENDPROC(set_bit) |
| 100 | 93 | ||
| 101 | .globl clear_bit | 94 | ENTRY(clear_bit) /* %o0=nr, %o1=addr */ |
| 102 | .type clear_bit,#function | ||
| 103 | clear_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 |
| 119 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 110 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 120 | .size clear_bit, .-clear_bit | 111 | ENDPROC(clear_bit) |
| 121 | 112 | ||
| 122 | .globl change_bit | 113 | ENTRY(change_bit) /* %o0=nr, %o1=addr */ |
| 123 | .type change_bit,#function | ||
| 124 | change_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 |
| 140 | 2: BACKOFF_SPIN(%o3, %o4, 1b) | 129 | 2: BACKOFF_SPIN(%o3, %o4, 1b) |
| 141 | .size change_bit, .-change_bit | 130 | ENDPROC(change_bit) |
