1 #include <linux/config.h>
3 #if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_MPCORE)
6 and r3, r0, #7 @ Get bit offset
7 add r1, r1, r0, lsr #3 @ Get byte offset
17 .macro testop, instr, store
18 and r3, r0, #7 @ Get bit offset
20 add r1, r1, r0, lsr #3 @ Get byte offset
21 mov r3, r2, lsl r3 @ create mask
23 ands r0, r2, r3 @ save old value of bit
24 \instr r2, r2, r3 @ toggle bit
37 save_and_disable_irqs ip, r2
38 ldrb r2, [r1, r0, lsr #3]
40 strb r2, [r1, r0, lsr #3]
46 * testop - implement a test_and_xxx_bit operation.
47 * @instr: operational instruction
48 * @store: store instruction
50 * Note: we can trivially conditionalise the store instruction
51 * to avoid dirting the data cache.
53 .macro testop, instr, store
54 add r1, r1, r0, lsr #3
57 save_and_disable_irqs ip, r2
60 \instr r2, r2, r0, lsl r3