From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, tytso@mit.edu,
tsbogend@alpha.franken.de, svens@linux.ibm.com,
richard.henderson@linaro.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, npiggin@gmail.com, mpe@ellerman.id.au,
mattst88@gmail.com, ink@jurassic.park.msu.ru, hca@linux.ibm.com,
gor@linux.ibm.com, geert@linux-m68k.org,
christophe.leroy@csgroup.eu, borntraeger@linux.ibm.com,
aou@eecs.berkeley.edu, agordeev@linux.ibm.com,
adilger.kernel@dilger.ca, willy@infradead.org,
akpm@linux-foundation.org
Subject: [merged mm-stable] mm-delete-checks-for-xor_unlock_is_negative_byte.patch removed from -mm tree
Date: Wed, 18 Oct 2023 14:35:47 -0700 [thread overview]
Message-ID: <20231018213547.DF25FC433CA@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm: delete checks for xor_unlock_is_negative_byte()
has been removed from the -mm tree. Its filename was
mm-delete-checks-for-xor_unlock_is_negative_byte.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: mm: delete checks for xor_unlock_is_negative_byte()
Date: Wed, 4 Oct 2023 17:53:14 +0100
Architectures which don't define their own use the one in
asm-generic/bitops/lock.h. Get rid of all the ifdefs around "maybe we
don't have it".
Link: https://lkml.kernel.org/r/20231004165317.1061855-15-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/alpha/include/asm/bitops.h | 1
arch/m68k/include/asm/bitops.h | 1
arch/mips/include/asm/bitops.h | 1
arch/riscv/include/asm/bitops.h | 1
include/asm-generic/bitops/instrumented-lock.h | 5 --
include/asm-generic/bitops/lock.h | 1
kernel/kcsan/kcsan_test.c | 3 -
kernel/kcsan/selftest.c | 3 -
mm/filemap.c | 30 ---------------
mm/kasan/kasan_test.c | 3 -
10 files changed, 1 insertion(+), 48 deletions(-)
--- a/arch/alpha/include/asm/bitops.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/arch/alpha/include/asm/bitops.h
@@ -305,7 +305,6 @@ static inline bool xor_unlock_is_negativ
return (old & BIT(7)) != 0;
}
-#define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
--- a/arch/m68k/include/asm/bitops.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/arch/m68k/include/asm/bitops.h
@@ -339,7 +339,6 @@ static inline bool xor_unlock_is_negativ
return result;
#endif
}
-#define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
/*
* The true 68020 and more advanced processors support the "bfffo"
--- a/arch/mips/include/asm/bitops.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/arch/mips/include/asm/bitops.h
@@ -301,7 +301,6 @@ static inline bool xor_unlock_is_negativ
return res;
}
-#define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
#undef __bit_op
#undef __test_bit_op
--- a/arch/riscv/include/asm/bitops.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/arch/riscv/include/asm/bitops.h
@@ -202,7 +202,6 @@ static inline bool xor_unlock_is_negativ
: "memory");
return (res & BIT(7)) != 0;
}
-#define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
#undef __test_and_op_bit
#undef __op_bit
--- a/include/asm-generic/bitops/instrumented-lock.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/include/asm-generic/bitops/instrumented-lock.h
@@ -58,7 +58,6 @@ static inline bool test_and_set_bit_lock
return arch_test_and_set_bit_lock(nr, addr);
}
-#if defined(arch_xor_unlock_is_negative_byte)
/**
* xor_unlock_is_negative_byte - XOR a single byte in memory and test if
* it is negative, for unlock.
@@ -80,8 +79,4 @@ static inline bool xor_unlock_is_negativ
instrument_atomic_write(addr, sizeof(long));
return arch_xor_unlock_is_negative_byte(mask, addr);
}
-/* Let everybody know we have it. */
-#define xor_unlock_is_negative_byte xor_unlock_is_negative_byte
-#endif
-
#endif /* _ASM_GENERIC_BITOPS_INSTRUMENTED_LOCK_H */
--- a/include/asm-generic/bitops/lock.h~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/include/asm-generic/bitops/lock.h
@@ -75,7 +75,6 @@ static inline bool arch_xor_unlock_is_ne
old = raw_atomic_long_fetch_xor_release(mask, (atomic_long_t *)p);
return !!(old & BIT(7));
}
-#define arch_xor_unlock_is_negative_byte arch_xor_unlock_is_negative_byte
#endif
#include <asm-generic/bitops/instrumented-lock.h>
--- a/kernel/kcsan/kcsan_test.c~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/kernel/kcsan/kcsan_test.c
@@ -699,12 +699,9 @@ static void test_barrier_nothreads(struc
KCSAN_EXPECT_RW_BARRIER(spin_unlock(&test_spinlock), true);
KCSAN_EXPECT_RW_BARRIER(mutex_lock(&test_mutex), false);
KCSAN_EXPECT_RW_BARRIER(mutex_unlock(&test_mutex), true);
-
-#ifdef xor_unlock_is_negative_byte
KCSAN_EXPECT_READ_BARRIER(xor_unlock_is_negative_byte(1, &test_var), true);
KCSAN_EXPECT_WRITE_BARRIER(xor_unlock_is_negative_byte(1, &test_var), true);
KCSAN_EXPECT_RW_BARRIER(xor_unlock_is_negative_byte(1, &test_var), true);
-#endif
kcsan_nestable_atomic_end();
}
--- a/kernel/kcsan/selftest.c~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/kernel/kcsan/selftest.c
@@ -227,12 +227,9 @@ static bool __init test_barrier(void)
KCSAN_CHECK_RW_BARRIER(arch_spin_unlock(&arch_spinlock));
spin_lock(&test_spinlock);
KCSAN_CHECK_RW_BARRIER(spin_unlock(&test_spinlock));
-
-#ifdef xor_unlock_is_negative_byte
KCSAN_CHECK_RW_BARRIER(xor_unlock_is_negative_byte(1, &test_var));
KCSAN_CHECK_READ_BARRIER(xor_unlock_is_negative_byte(1, &test_var));
KCSAN_CHECK_WRITE_BARRIER(xor_unlock_is_negative_byte(1, &test_var));
-#endif
kcsan_nestable_atomic_end();
return ret;
--- a/mm/filemap.c~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/mm/filemap.c
@@ -1482,34 +1482,6 @@ void folio_add_wait_queue(struct folio *
}
EXPORT_SYMBOL_GPL(folio_add_wait_queue);
-#ifdef xor_unlock_is_negative_byte
-#define clear_bit_unlock_is_negative_byte(nr, p) \
- xor_unlock_is_negative_byte(1 << nr, p)
-#endif
-
-#ifndef clear_bit_unlock_is_negative_byte
-
-/*
- * PG_waiters is the high bit in the same byte as PG_lock.
- *
- * On x86 (and on many other architectures), we can clear PG_lock and
- * test the sign bit at the same time. But if the architecture does
- * not support that special operation, we just do this all by hand
- * instead.
- *
- * The read of PG_waiters has to be after (or concurrently with) PG_locked
- * being cleared, but a memory barrier should be unnecessary since it is
- * in the same byte as PG_locked.
- */
-static inline bool clear_bit_unlock_is_negative_byte(long nr, volatile void *mem)
-{
- clear_bit_unlock(nr, mem);
- /* smp_mb__after_atomic(); */
- return test_bit(PG_waiters, mem);
-}
-
-#endif
-
/**
* folio_unlock - Unlock a locked folio.
* @folio: The folio.
@@ -1525,7 +1497,7 @@ void folio_unlock(struct folio *folio)
BUILD_BUG_ON(PG_waiters != 7);
BUILD_BUG_ON(PG_locked > 7);
VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio);
- if (clear_bit_unlock_is_negative_byte(PG_locked, folio_flags(folio, 0)))
+ if (xor_unlock_is_negative_byte(1 << PG_locked, folio_flags(folio, 0)))
folio_wake_bit(folio, PG_locked);
}
EXPORT_SYMBOL(folio_unlock);
--- a/mm/kasan/kasan_test.c~mm-delete-checks-for-xor_unlock_is_negative_byte
+++ a/mm/kasan/kasan_test.c
@@ -1098,12 +1098,9 @@ static void kasan_bitops_test_and_modify
KUNIT_EXPECT_KASAN_FAIL(test, test_and_change_bit(nr, addr));
KUNIT_EXPECT_KASAN_FAIL(test, __test_and_change_bit(nr, addr));
KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result = test_bit(nr, addr));
-
-#if defined(xor_unlock_is_negative_byte)
if (nr < 7)
KUNIT_EXPECT_KASAN_FAIL(test, kasan_int_result =
xor_unlock_is_negative_byte(1 << nr, addr));
-#endif
}
static void kasan_bitops_generic(struct kunit *test)
_
Patches currently in -mm which might be from willy@infradead.org are
buffer-make-folio_create_empty_buffers-return-a-buffer_head.patch
mpage-convert-map_buffer_to_folio-to-folio_create_empty_buffers.patch
ext4-convert-to-folio_create_empty_buffers.patch
buffer-add-get_nth_bh.patch
gfs2-convert-inode-unstuffing-to-use-a-folio.patch
gfs2-convert-gfs2_getbuf-to-folios.patch
gfs2-convert-gfs2_getjdatabuf-to-use-a-folio.patch
gfs2-convert-gfs2_write_buf_to_page-to-use-a-folio.patch
nilfs2-convert-nilfs_mdt_freeze_buffer-to-use-a-folio.patch
nilfs2-convert-nilfs_grab_buffer-to-use-a-folio.patch
nilfs2-convert-nilfs_copy_page-to-nilfs_copy_folio.patch
nilfs2-convert-nilfs_mdt_forget_block-to-use-a-folio.patch
nilfs2-convert-nilfs_mdt_get_frozen_buffer-to-use-a-folio.patch
nilfs2-remove-nilfs_page_get_nth_block.patch
nilfs2-convert-nilfs_lookup_dirty_data_buffers-to-use-folio_create_empty_buffers.patch
ntfs-convert-ntfs_read_block-to-use-a-folio.patch
ntfs-convert-ntfs_writepage-to-use-a-folio.patch
ntfs-convert-ntfs_prepare_pages_for_non_resident_write-to-folios.patch
ntfs3-convert-ntfs_zero_range-to-use-a-folio.patch
ocfs2-convert-ocfs2_map_page_blocks-to-use-a-folio.patch
reiserfs-convert-writepage-to-use-a-folio.patch
ufs-add-ufs_get_locked_folio-and-ufs_put_locked_folio.patch
ufs-use-ufs_get_locked_folio-in-ufs_alloc_lastblock.patch
ufs-convert-ufs_change_blocknr-to-use-folios.patch
ufs-remove-ufs_get_locked_page.patch
buffer-remove-folio_create_empty_buffers.patch
reply other threads:[~2023-10-18 21:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231018213547.DF25FC433CA@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=adilger.kernel@dilger.ca \
--cc=agordeev@linux.ibm.com \
--cc=aou@eecs.berkeley.edu \
--cc=borntraeger@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=geert@linux-m68k.org \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=mm-commits@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=richard.henderson@linaro.org \
--cc=svens@linux.ibm.com \
--cc=tsbogend@alpha.franken.de \
--cc=tytso@mit.edu \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.