Skip to content

Commit 51a752c

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
powerpc: implement arch_xor_unlock_is_negative_byte on 32-bit
Simply remove the ifdef. The assembly is identical to that in the non-optimised case of test_and_clear_bits() on PPC32, and it's not clear to me how the PPC32 optimisation works, nor whether it would work for arch_xor_unlock_is_negative_byte(). If that optimisation would work, someone can implement it later, but this is more efficient than the implementation in filemap.c. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Cc: Albert Ou <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: "Theodore Ts'o" <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Vasily Gorbik <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8da36b2 commit 51a752c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/powerpc/include/asm/bitops.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ static inline int arch_test_and_change_bit(unsigned long nr,
233233
return test_and_change_bits(BIT_MASK(nr), addr + BIT_WORD(nr)) != 0;
234234
}
235235

236-
#ifdef CONFIG_PPC64
237236
static inline bool arch_xor_unlock_is_negative_byte(unsigned long mask,
238237
volatile unsigned long *p)
239238
{
@@ -251,11 +250,8 @@ static inline bool arch_xor_unlock_is_negative_byte(unsigned long mask,
251250

252251
return (old & BIT_MASK(7)) != 0;
253252
}
254-
255253
#define arch_xor_unlock_is_negative_byte arch_xor_unlock_is_negative_byte
256254

257-
#endif /* CONFIG_PPC64 */
258-
259255
#include <asm-generic/bitops/non-atomic.h>
260256

261257
static inline void arch___clear_bit_unlock(int nr, volatile unsigned long *addr)

0 commit comments

Comments
 (0)