From patchwork Thu Feb 25 13:57:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 12104159 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 4F09DC433E6 for ; Thu, 25 Feb 2021 13:58:36 +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 E8C1564F0E for ; Thu, 25 Feb 2021 13:58:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8C1564F0E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DTprG+SmbFDb7cxwVsw7YLVzrcdMizUNTbXeUz1qQqE=; b=BsJh56LqrTpBMAzEzBvIVrGWo pRPhEF4YCK7OABypIkxGJIYd9tNbeiIl7uBoow3uu2qqUoWcGVFaAALGIHVuxmwSmxyQ6PJ/D4KUk 7y1iF1t4olMtluiGzHYk7FYPtn2AvjXoP1f5NUKzPS9vNLr2tWTDAxHri575a7mYv+ZyEPhHXN25U ZNyM7IzSwiG+MSXc+q4rJ4U3amJQH5lpG5dEDOtLFIA9NzL36k22U57XI5o2AkugTgs9sAuOiyWBA e7mWMKyftTvHqN+e8eRoM2gfUKEPUB2EJCbiZn1SMoguW6Xbc7w2SJB1DCedVY0D5JNZ+mIrtgXFD 0NU2fHAkA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFH8l-0005GU-EX; Thu, 25 Feb 2021 13:57:15 +0000 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFH8e-0005F2-6f for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2021 13:57:08 +0000 Received: by mail-qk1-x736.google.com with SMTP id z190so5624127qka.9 for ; Thu, 25 Feb 2021 05:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YjQQYAvCYurZK7ldaR7wdMuQlhqNk26sh+booS2Ah34=; b=uRMIB6gDJkTYgjbHVu7BAzdGGm1PFtEAm1zu98MInx0ilMKOd79he4zUJKLVyn5GUB tlZMhqNfr5G/ILE0mA8nnhJq9AmzfJXAmQi4oBS5dxezyZR1l5Xn1oyEoao/cjg5BqrO sP+AsEjwmcT4MM333CaI0Cf5xGOa8PyZX7ueyudp64ptucBQtz7m3rPqFL8aN42MDGmo b7tIRoRtY7HBLDg8S7aXUBME8kjVgCe5DTZeoXRDRcl9MM4D7Bh7GxY2WMcjazIOmGDo nPO9CWDk4Zt5sOSjW3zTaEUgj5g5ihUB387FcuwKTBil76LwLkgVWpX4iK0iu/V+bppa 78EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YjQQYAvCYurZK7ldaR7wdMuQlhqNk26sh+booS2Ah34=; b=hRt2DV7DVYIzwTufQq53DdpDYkXkbRlTN6VvhTSbPRr2W/fWu4H+QNHVdnUlCDsMiK 6ZceFZuBnlBTPbtGa52dIOTxvuSMe67IgaNd3jgtW+vHV7CNkkxr6EKgk3Km2U2qMKp2 p9BsWxelXMe/R4ulV0cfcN2xReOULBeYY+e17DeFZcJfo4pFZhT5V458qMWmoVV+PGUM /HZUxv9ZBVNY7FEbnnMbNYh3gMrxR3hboMlbZ8ZM8SU1cVHqxTsFleYBLAPrbrn0O5NB XYJeSdpLEdXPFO5wCOS3EkbVYuYYBcM7QrF1Bz93H/GQw1Y+55WEipvk1Nslg1pgTDNb RqOA== X-Gm-Message-State: AOAM531KrFfJ+wHwTdNI+wXmdmZL/ZlKuiUgHgrShifUWbpeUmHY2N36 pee0nhl+UfLorzQ2BQRFc/M= X-Google-Smtp-Source: ABdhPJx+PKOZos9XXN2E6Yo01qJv1TAuCbOtRjCLWy1ChLGZFh7LIPlXALSkc5a6ENsIBlQSRnoD1Q== X-Received: by 2002:a05:620a:166e:: with SMTP id d14mr2846844qko.82.1614261426421; Thu, 25 Feb 2021 05:57:06 -0800 (PST) Received: from localhost (d27-96-190-162.evv.wideopenwest.com. [96.27.162.190]) by smtp.gmail.com with ESMTPSA id z1sm3522908qtu.83.2021.02.25.05.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 05:57:06 -0800 (PST) From: Yury Norov To: Will Deacon , Catalin Marinas , Thomas Bogendoerfer , Alexander Lobakin , Alexey Klimov , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH 2/2] MIPS: enable GENERIC_FIND_FIRST_BIT Date: Thu, 25 Feb 2021 05:57:00 -0800 Message-Id: <20210225135700.1381396-3-yury.norov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210225135700.1381396-1-yury.norov@gmail.com> References: <20210225135700.1381396-1-yury.norov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_085708_270759_368FAD22 X-CRM114-Status: GOOD ( 12.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: Yury Norov Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alexander Lobakin MIPS doesn't have architecture-optimized bitsearching functions, like find_{first,next}_bit() etc. 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