From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 716A1C352BE for ; Thu, 16 Apr 2020 22:01:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 33F9F21973 for ; Thu, 16 Apr 2020 22:01:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kIGmesSp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33F9F21973 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D4D198E00E9; Thu, 16 Apr 2020 18:01:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFF288E00E5; Thu, 16 Apr 2020 18:01:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9052A8E00E9; Thu, 16 Apr 2020 18:01:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 5AB658E00E7 for ; Thu, 16 Apr 2020 18:01:36 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1CCBE68AA for ; Thu, 16 Apr 2020 22:01:36 +0000 (UTC) X-FDA: 76715090592.10.hall60_4823f80206938 X-HE-Tag: hall60_4823f80206938 X-Filterd-Recvd-Size: 2625 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Apr 2020 22:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=ArfZIurbM8JaXJmqZohQOWK/UMIw9ILuX6tVrh6icrg=; b=kIGmesSpryM9Gupd0//31sgp58 xHNdfkDMxkgqONOTxWh2P+v5JIoVRDNx44bUsAicRFOYnk2lYnSnHOjkgbemjUDJpP+1VwQMzAg4x hM8eld2sskFHHvkWaJ0tlA5pr8LadjifG8E7YiyLTbvSr5WpwmKFYBzDXS9pCZHECEJMxSmBhvoew 2IaIqffSaA8JcejH3goaoQuox36ldy+wXHBvjgFwBFcvbw+BqFAIkm7MFN21NVopR6AR10Yu8KYW6 bWJGCucPg/bNE0poFt2IUNvzJl9ehTUWLM3rA8kbrhhdM7gBo7sszsr6HgbbwrJ9EUVDd8g4HO3x1 aWzHs7uA==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPCZg-0003UN-Gg; Thu, 16 Apr 2020 22:01:32 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH v3 04/11] mips: Add clear_bit_unlock_is_negative_byte implementation Date: Thu, 16 Apr 2020 15:01:23 -0700 Message-Id: <20200416220130.13343-5-willy@infradead.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200416220130.13343-1-willy@infradead.org> References: <20200416220130.13343-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: From: "Matthew Wilcox (Oracle)" This is the generic implementation. I can't figure out an optimised implementation for mips. Signed-off-by: Matthew Wilcox (Oracle) Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org --- arch/mips/include/asm/bitops.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitop= s.h index a74769940fbd..23e9d36c2ffc 100644 --- a/arch/mips/include/asm/bitops.h +++ b/arch/mips/include/asm/bitops.h @@ -147,6 +147,13 @@ static inline void clear_bit_unlock(unsigned long nr= , volatile unsigned long *ad clear_bit(nr, addr); } =20 +static inline bool clear_bit_unlock_is_negative_byte(unsigned int nr, + volatile unsigned long *p) +{ + clear_bit_unlock(nr, p); + return test_bit(7, p); +} + /* * change_bit - Toggle a bit in memory * @nr: Bit to change --=20 2.25.1