1 /* bitops.S: Sparc64 atomic bit operations.
3 * Copyright (C) 2000, 2007 David S. Miller (davem@davemloft.net)
6 #include <linux/linkage.h>
8 #include <asm/backoff.h>
9 #include <asm/export.h>
13 ENTRY(test_and_set_bit) /* %o0=nr, %o1=addr */
25 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
31 2: BACKOFF_SPIN(%o3, %o4, 1b)
32 ENDPROC(test_and_set_bit)
33 EXPORT_SYMBOL(test_and_set_bit)
35 ENTRY(test_and_clear_bit) /* %o0=nr, %o1=addr */
47 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
53 2: BACKOFF_SPIN(%o3, %o4, 1b)
54 ENDPROC(test_and_clear_bit)
55 EXPORT_SYMBOL(test_and_clear_bit)
57 ENTRY(test_and_change_bit) /* %o0=nr, %o1=addr */
69 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
75 2: BACKOFF_SPIN(%o3, %o4, 1b)
76 ENDPROC(test_and_change_bit)
77 EXPORT_SYMBOL(test_and_change_bit)
79 ENTRY(set_bit) /* %o0=nr, %o1=addr */
91 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
95 2: BACKOFF_SPIN(%o3, %o4, 1b)
97 EXPORT_SYMBOL(set_bit)
99 ENTRY(clear_bit) /* %o0=nr, %o1=addr */
111 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
115 2: BACKOFF_SPIN(%o3, %o4, 1b)
117 EXPORT_SYMBOL(clear_bit)
119 ENTRY(change_bit) /* %o0=nr, %o1=addr */
131 bne,pn %xcc, BACKOFF_LABEL(2f, 1b)
135 2: BACKOFF_SPIN(%o3, %o4, 1b)
137 EXPORT_SYMBOL(change_bit)