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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 43845C433E6 for ; Fri, 26 Feb 2021 01:24:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED46264F17 for ; Fri, 26 Feb 2021 01:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbhBZBXs (ORCPT ); Thu, 25 Feb 2021 20:23:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:53086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230014AbhBZBX2 (ORCPT ); Thu, 25 Feb 2021 20:23:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D4D1064F45; Fri, 26 Feb 2021 01:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614302551; bh=HKX2d7C6FRZHn9ETku+sUdTRgdroLQqoA0etpo+dwBA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=U2sO2J6JF1MUgIXAcq1Lz72GXALx0CQ7HznOPsGNzc8F/fcyG1vlioVlozXnUMr/Q 6YIpfndzcyK7FYdLUoo2oxvjN2wARU6j7vTDskczmnHvuRNZi9uwV1o8KNFF3m4DT/ blrXpgU16LTWFbQzHeGDVnE2HOl+P9dbMywYJkFWcfB24346o6KJDUQjfgtLveXd6I 98f4oMeBFoFXtHz6v0tDon1WP9E0T25B4Ym02TanpmTdhVMnalCJCfimXbRgybheEw UeApeuE0O+UGmjPzdJDGSjOjOP4Ib5z6TGEjMmggDkTVL2iDRxdjP2KTDNYqwi8Q/U TG5ovIb5a0PFg== Received: by mail-il1-f178.google.com with SMTP id h18so6688146ils.2; Thu, 25 Feb 2021 17:22:30 -0800 (PST) X-Gm-Message-State: AOAM531oDQpNzZyGqMf0DMpedTEAD825HDrOC0s2uQdphMTiAygavgVr iSPMMwemldPIpsKvqcb2+6oehZCFqFuWrYyfm3s= X-Google-Smtp-Source: ABdhPJzmjvZUK1uhuLLRpihzIDVcjVsCrrMQL6doJSqMkdQAKO9NRuDr+okow6Wiq/33s5CdTZSi6Z85sME0Iqpvygw= X-Received: by 2002:a92:6907:: with SMTP id e7mr435462ilc.134.1614302550029; Thu, 25 Feb 2021 17:22:30 -0800 (PST) MIME-Version: 1.0 References: <20210225135700.1381396-1-yury.norov@gmail.com> <20210225135700.1381396-3-yury.norov@gmail.com> In-Reply-To: <20210225135700.1381396-3-yury.norov@gmail.com> From: Huacai Chen Date: Fri, 26 Feb 2021 09:22:18 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] MIPS: enable GENERIC_FIND_FIRST_BIT To: Yury Norov Cc: Will Deacon , Catalin Marinas , Thomas Bogendoerfer , Alexander Lobakin , Alexey Klimov , linux-arm-kernel , LKML , linux-arch@vger.kernel.org, "open list:MIPS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yury, On Thu, Feb 25, 2021 at 9:59 PM Yury Norov wrote: > > From: Alexander Lobakin > > MIPS doesn't have architecture-optimized bitsearching functions, > like find_{first,next}_bit() etc. Emm, I think MIPS can use clo/clz to optimize bitsearching functions. Huacai > It's absolutely harmless to enable GENERIC_FIND_FIRST_BIT as this > functionality is not new at all and well-tested. It provides more > optimized code and saves some .text memory (32 R2): > > add/remove: 4/1 grow/shrink: 1/53 up/down: 216/-372 (-156) > > Users of for_each_set_bit() like hotpath gic_handle_shared_int() > will also benefit from this. > > Suggested-by: Yury Norov > Signed-off-by: Alexander Lobakin > Signed-off-by: Yury Norov > --- > arch/mips/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index d89efba3d8a4..164bdd715d4b 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -26,6 +26,7 @@ config MIPS > select GENERIC_ATOMIC64 if !64BIT > select GENERIC_CMOS_UPDATE > select GENERIC_CPU_AUTOPROBE > + select GENERIC_FIND_FIRST_BIT > select GENERIC_GETTIMEOFDAY > select GENERIC_IOMAP > select GENERIC_IRQ_PROBE > -- > 2.25.1 > 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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 AD266C433E0 for ; Fri, 26 Feb 2021 01:23:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58A2364EE4 for ; Fri, 26 Feb 2021 01:23:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58A2364EE4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Qf0kXhAGj0uCEYQ6mIpPxiK/H4ptuIR/aNn2r3ampu8=; b=i1wvOsRnE/erGc2Nq7eGFmM4o o03AgtlTOKBGegJksGSFHSbjPSEF6vVcFYOvbfeFQ1gEnVb1m+kIInIifyMiqa/Da9Zg1+FeY+ZIN I/KClJc+Z3dsaF6+izqleMPCf+HymYqS3phgZzy/4ExC/VgY67PEO/ZrdvHvvFxMZLnI3PFx0fonR wQ21O5Big4cdxwdOdljChsz5SeuIt9+oPB6GTPgctqLgn7ugXZVu/LOz2Gk08ZUcAHhcTwFRnuuT5 SNCywsX8lr09hBU4/8iBdYDvaAGBkr+iPn0iaLPZiAFpHKmzfqDrWF6J52aQuc6g9NaAfNm9W9rCv +LKsXhPdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFRpy-00031y-N7; Fri, 26 Feb 2021 01:22:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFRpw-00031F-Hv for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2021 01:22:33 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA1FB64F48 for ; Fri, 26 Feb 2021 01:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614302551; bh=HKX2d7C6FRZHn9ETku+sUdTRgdroLQqoA0etpo+dwBA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=U2sO2J6JF1MUgIXAcq1Lz72GXALx0CQ7HznOPsGNzc8F/fcyG1vlioVlozXnUMr/Q 6YIpfndzcyK7FYdLUoo2oxvjN2wARU6j7vTDskczmnHvuRNZi9uwV1o8KNFF3m4DT/ blrXpgU16LTWFbQzHeGDVnE2HOl+P9dbMywYJkFWcfB24346o6KJDUQjfgtLveXd6I 98f4oMeBFoFXtHz6v0tDon1WP9E0T25B4Ym02TanpmTdhVMnalCJCfimXbRgybheEw UeApeuE0O+UGmjPzdJDGSjOjOP4Ib5z6TGEjMmggDkTVL2iDRxdjP2KTDNYqwi8Q/U TG5ovIb5a0PFg== Received: by mail-il1-f171.google.com with SMTP id d5so6704213iln.6 for ; Thu, 25 Feb 2021 17:22:30 -0800 (PST) X-Gm-Message-State: AOAM533ZY+AJHn+ASLPDVKjbdQPbvt4Ze6+mkraN437R3nkvQPZ38/WH 6cHMwIYGwMpmjGr597nIFT0xh/Pc3dgWgN64ylI= X-Google-Smtp-Source: ABdhPJzmjvZUK1uhuLLRpihzIDVcjVsCrrMQL6doJSqMkdQAKO9NRuDr+okow6Wiq/33s5CdTZSi6Z85sME0Iqpvygw= X-Received: by 2002:a92:6907:: with SMTP id e7mr435462ilc.134.1614302550029; Thu, 25 Feb 2021 17:22:30 -0800 (PST) MIME-Version: 1.0 References: <20210225135700.1381396-1-yury.norov@gmail.com> <20210225135700.1381396-3-yury.norov@gmail.com> In-Reply-To: <20210225135700.1381396-3-yury.norov@gmail.com> From: Huacai Chen Date: Fri, 26 Feb 2021 09:22:18 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] MIPS: enable GENERIC_FIND_FIRST_BIT To: Yury Norov X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_202232_681574_C9DD10A2 X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Thomas Bogendoerfer , Alexander Lobakin , Catalin Marinas , LKML , "open list:MIPS" , Alexey Klimov , Will Deacon , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Yury, On Thu, Feb 25, 2021 at 9:59 PM Yury Norov wrote: > > From: Alexander Lobakin > > MIPS doesn't have architecture-optimized bitsearching functions, > like find_{first,next}_bit() etc. Emm, I think MIPS can use clo/clz to optimize bitsearching functions. Huacai > It's absolutely harmless to enable GENERIC_FIND_FIRST_BIT as this > functionality is not new at all and well-tested. It provides more > optimized code and saves some .text memory (32 R2): > > add/remove: 4/1 grow/shrink: 1/53 up/down: 216/-372 (-156) > > Users of for_each_set_bit() like hotpath gic_handle_shared_int() > will also benefit from this. > > Suggested-by: Yury Norov > Signed-off-by: Alexander Lobakin > Signed-off-by: Yury Norov > --- > arch/mips/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index d89efba3d8a4..164bdd715d4b 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -26,6 +26,7 @@ config MIPS > select GENERIC_ATOMIC64 if !64BIT > select GENERIC_CMOS_UPDATE > select GENERIC_CPU_AUTOPROBE > + select GENERIC_FIND_FIRST_BIT > select GENERIC_GETTIMEOFDAY > select GENERIC_IOMAP > select GENERIC_IRQ_PROBE > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel