1 #if __LINUX_ARM_ARCH__ >= 6
4 and r3
, r0
, #7 @ Get bit offset
5 add r1
, r1
, r0
, lsr
#3 @ Get byte offset
15 .macro testop
, instr
, store
16 and r3
, r0
, #7 @ Get bit offset
18 add r1
, r1
, r0
, lsr
#3 @ Get byte offset
19 mov r3
, r2
, lsl r3 @ create mask
21 ands r0
, r2
, r3 @ save old value of bit
22 \instr r2
, r2
, r3 @ toggle bit
35 save_and_disable_irqs ip
, r2
36 ldrb r2
, [r1
, r0
, lsr
#3]
38 strb r2
, [r1
, r0
, lsr
#3]
44 * testop - implement a test_and_xxx_bit operation.
45 * @instr: operational instruction
46 * @store: store instruction
48 * Note: we can trivially conditionalise the store instruction
49 * to avoid dirting the data cache.
51 .macro testop
, instr
, store
52 add r1
, r1
, r0
, lsr
#3
55 save_and_disable_irqs ip
, r2
58 \instr r2
, r2
, r0
, lsl r3