Message ID | 20231004165317.1061855-14-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C29E7C4E3 for <linux-mm@archiver.kernel.org>; Wed, 4 Oct 2023 16:53:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 45A6E6B027A; Wed, 4 Oct 2023 12:53:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36CE86B027D; Wed, 4 Oct 2023 12:53:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BFD86B027F; Wed, 4 Oct 2023 12:53:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 05A266B027A for <linux-mm@kvack.org>; Wed, 4 Oct 2023 12:53:30 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CF1D3C0384 for <linux-mm@kvack.org>; Wed, 4 Oct 2023 16:53:29 +0000 (UTC) X-FDA: 81308374938.02.5B78204 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 22BCA4001C for <linux-mm@kvack.org>; Wed, 4 Oct 2023 16:53:27 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=m5I9BXtx; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696438408; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NoYAPE+UO7xNrTZ3UFo3zibiwdFupzttBoXxylMj4Qw=; b=ra/gCUB2VKgqBqcdjise4DjJcM+vXm1TtNZ+QN8o0zvrokFZjnz/ccv/73udmo+lCJm2tA B5DCkiKAk6gcTsK7+yDzE7cklO6ogEieh1EneCRsZR2fPr6yBVbTJ7wopFq+YXumym9rwm kBddFvnHu0sJCX8y5yIJkOFIizLuzSg= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=m5I9BXtx; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696438408; a=rsa-sha256; cv=none; b=SJDtB0P1BLa9BY7+4Hi7bIWg3ndq5dyocy7iAkRjrJ8aZiQIo7lMGZwstCKo2oeAyRvZ0j ONTXQCCfaBCy8xDdGrUO6wHR+vBoCEB03GkW5AV+OTdvbd2PsR1LdHLA8bxNAyooPkmoK9 1do//EwaNnURbUVLTAYLTXvzsHKYGf0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=NoYAPE+UO7xNrTZ3UFo3zibiwdFupzttBoXxylMj4Qw=; b=m5I9BXtxa7U3y+DGVFJFvAMKxg hBD+0YDc+5glcTSqGwZdiU6CHF8GGs8Fwr1IB1Q2wLElzB2gxr6IE3VibFZ3rtjCAnHgyMSEkvmjU COtxOWuztoH0qghXux20Z9rq0nyzLVraO5yLavoMMcks/CORStaKbNRgugrAJSXdkEYWPPt4JRFyR ghB03Xdi8DyFDINsJpQsA0Bku5Pz6tB5JxfpIW8ML04CpMn1Q2Dtbi+zN2rpVwnpXrGBU4/x9CWYK 8hBRdb6Pu+yl6r3m/UR7Sw1fVNiY+4PzLfApV1j+H0pPF0Rmvec00gSHlMcMfNnmhTfeRbn7642xQ NaBY1K5A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qo57g-004SFr-Gi; Wed, 04 Oct 2023 16:53:20 +0000 From: "Matthew Wilcox (Oracle)" <willy@infradead.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, torvalds@linux-foundation.org, npiggin@gmail.com Subject: [PATCH v2 13/17] s390: Implement arch_xor_unlock_is_negative_byte Date: Wed, 4 Oct 2023 17:53:13 +0100 Message-Id: <20231004165317.1061855-14-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231004165317.1061855-1-willy@infradead.org> References: <20231004165317.1061855-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 22BCA4001C X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 947ai8i5wwrma14s3qfzdi7weyose4uu X-HE-Tag: 1696438407-754494 X-HE-Meta: U2FsdGVkX1+dh7lg+NPQe3kQQpVefj0Jvm0YmzE/ZbV4gLuduQpEIHy2cm7rWeucP4VFfa3hYrOCP9DX41hv1IncSaL4bJLS/Vm6fyvT49Ye+UROvO22w2P4z/wxR9Gueqpj2PhQhbTR/A4QVYu9CLjzXcYZrna144IDdeOqmnQml0zEsac0Ucav58ayY4Z94YW0rJa80SNUdX9nH1ErrZaEM0zbr93WFy9itsbS/wOB+ErSx8mBf0mXOtZFdrHIILpqAbf92pcOSoIwwWgkQS5POwAJAMV8XzZUcbSijsqfZlkcDHQMs4KeAtNrvE0KqreQKpr6eQVFJipJ56JOS5xCMjqL5yb4LMplfKM0RmbBSfGCTMsq5yEDngR/IrE1OaOL1qqojcopXoH6FpzDT06KoSnuz4bDZDH3KCfR4JL69NjzpEHishKum0cYRfPX1HUfkPOITBPCqbuUmOAeEiFrzaPaA/qu8um1sNUOHx/LWcKYQ6VNtzA1Bs1Bz8powT3CV4dreUSWr2a/wCQgCJoxvLGGLh3LBUTKCmt4+IPTcKK+KbKzUMFLbf/7ukKM6BC4zpuOjEVsKwdTgHM3wzs9fygi0mq82f+ful/RzqN0nzTj+nyLnMjEysB2zrFmunqyr8ExCCrsKFCR8+nOzzODPNUjycbqlOEOvosL/QNXYk23lh+B9FZ6mYbh//DzUAHFzPd2xJAzZRNa4gUyxq2N+irw/AXLe26gdNB+ta1sLQ8y1ObWDrHf6f1ReFdoI0fvNOcJ7HXA9MTS7ZDYPAvG6SZatOAMH8L2Qae3p/qFLi309i03+PIliYsnnIiOFYI3F1DyvEoBZOFf28vA3h0aHGtVZm2fQX+kN2+B/h8nlrAChJLjZsMMpxBJjStB/KEZa50IokJMC48MbHdjIwproS/2BkNDmEqRy9nNKKVDcIgTz3dp30OOMsDmBeHhwVkxlW17YBb2eg5htAE ELgECH/y A2aXaS7jZMjFUsn1e1B3tmFt3tHRekyGOzeG/FC/+TTdAToMGMNaYFK87vYtIVTIGDCT32dibINTmdgU7/FQKhJYedptiC/J6JP1R5aGHNICMKhga9Z/zHI1ZmWdHjyXjEB1q3ynBNQf5KB26SzD8F8btvKmzoIqgly6D0G9LNnHTEdwL65gYUeAElTLLIyFa1ot7QCU6+WtNJj78D0E1oNDOrw1co0OtxufzSUR2mQGfRc4xLQo0O2KG5adMQSGwcz8RDAtGWxjDM4w= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Add folio_end_read
|
expand
|
diff --git a/arch/s390/include/asm/bitops.h b/arch/s390/include/asm/bitops.h index 2de74fcd0578..c467dffa8c12 100644 --- a/arch/s390/include/asm/bitops.h +++ b/arch/s390/include/asm/bitops.h @@ -201,6 +201,16 @@ static inline void arch___clear_bit_unlock(unsigned long nr, arch___clear_bit(nr, ptr); } +static inline bool arch_xor_unlock_is_negative_byte(unsigned long mask, + volatile unsigned long *ptr) +{ + unsigned long old; + + old = __atomic64_xor_barrier(mask, (long *)ptr); + return old & BIT(7); +} +#define arch_xor_unlock_is_negative_byte arch_xor_unlock_is_negative_byte + #include <asm-generic/bitops/instrumented-atomic.h> #include <asm-generic/bitops/instrumented-non-atomic.h> #include <asm-generic/bitops/instrumented-lock.h>
Inspired by the s390 arch_test_and_clear_bit(), this will surely be more efficient than the generic one defined in filemap.c. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- arch/s390/include/asm/bitops.h | 10 ++++++++++ 1 file changed, 10 insertions(+)