]> www.infradead.org Git - users/willy/pagecache.git/commit
m68k: Implement xor_unlock_is_negative_byte
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 20 Jul 2023 19:35:51 +0000 (15:35 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 4 Oct 2023 01:08:40 +0000 (21:08 -0400)
commitd2be3b3d5bb2214df2f89b0eb442fecdca4217dd
tree88ddbad9a60e599bfc7db17691f38e35751f23eb
parent858088b93d06cbc3b36bb2e2febb958419931f99
m68k: Implement xor_unlock_is_negative_byte

Using EOR to clear the guaranteed-to-be-set lock bit will test the
negative flag just like the x86 implementation.  This should be
more efficient than the generic implementation in filemap.c.  It
would be better if m68k had __GCC_ASM_FLAG_OUTPUTS__.

Coldfire doesn't have a byte-sized EOR, so we test bit 7 after the
EOR, which is a second memory access, but it's slightly better than
the current C code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
arch/m68k/include/asm/bitops.h