From patchwork Thu Oct 24 10:19:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 13848718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A12ACFA457 for ; Thu, 24 Oct 2024 10:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5JeKHGL3U+AnsxsHEtpR5MbWb9/JbtvDoucb378GX/4=; b=Jn92psosN7oYEF drhhEd4X5yMwgl4TMOYObvsYoTEg0E4eaUWcDIGbQNBPtkC9K5N6H3Elq5N9RRV4EtjtvIqHfMlRA /rkgMC7kI4W91qTZ/LvDHYGnsw8f/41EoTSC3b22KU5WA4RVjKh0wc2tuIUpnZFw35Sythb6oA8+6 jSpvZw5hmwxAH3urgxL4xVuq5nnbLT7GUSI7ub25wGl0NjJTpyafXF8CewwZ2YzBUcxI+TbHPojYM 6tbLgv1xnR39LadaCtuArtTiLPRDs22qV1JxifEvr8kF5FKQcs02VvVqNLyvrPZAk+giQoDBgft9o lpzH6Ih+R9FZR8FCWM5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3uxT-000000002rj-3CxP; Thu, 24 Oct 2024 10:20:47 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3uwh-000000002el-42a6 for linux-riscv@lists.infradead.org; Thu, 24 Oct 2024 10:20:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id F32B6A4531E; Thu, 24 Oct 2024 10:19:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55805C4CEC7; Thu, 24 Oct 2024 10:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729765198; bh=1eOymLXp8Il5GG8XBWYJ5u7O1358IpUBrRLlLzVG6p0=; h=From:To:Cc:Subject:Date:From; b=OchkCHrkdOP4TCE7IstWNbHLx7hok7P32qyw6l54Eq7OCuqbqYe2N1iuqHTAxvviy LVQJqiSIWLinZ0bO7EiF3SlczA6fbf3UG8W46t4hxGVYtJKBgNo2N8No/+qa5JV+Z9 FKZSz/UuXrBgpWLrOheUR0wlO18QB1PJa/LMc/TMxSVovw5noSPiIOJqeOfxnJ2TeA NB0TajSgTE4QMjGzbPz/DSaYJr1ECtsyRLuMubUhiq/PVUX7IHZ1J5mDMkfin0bjSB qF0sqgpL+4C6qu0bzKwenKB4xzehTFee3ti36QCSazbpjW4jZtKGlvvOuHdWlR1bwr xMR/z6ijIIXaQ== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , xiao.w.wang@intel.com, Andrew Jones , pulehui@huawei.com, Charlie Jenkins , Paul Walmsley , Palmer Dabbelt , linux-kernel@vger.kernel.org, Samuel Holland , Pu Lehui , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= Subject: [PATCH v4 0/2] RISC-V: clarify what some RISCV_ISA* config options do & redo Zbb toolchain dependency Date: Thu, 24 Oct 2024 11:19:39 +0100 Message-ID: <20241024-aspire-rectify-9982da6943e5@spud> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2294; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=cQHZLXl0Lem86H8PfivnwWB967sopbzxoPR7jwhqlyo=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDOlS8vaSm3muyWy+r7A4Y2WLnfXsf42ni84encV7PSX7B Vv2fYaMjlIWBjEOBlkxRZbE230tUuv/uOxw7nkLM4eVCWQIAxenAExEeTcjw2LbyeJmR9wkz6W8 S/fhCDju+/TsFpGvs0/HLb+yc21axQyGf2oPJ3veY9ERllqm8iB4VXCf1k6FKamLma8cin+1vTt GmQ0A X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241024_032000_159594_91681204 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley Since one depends on the other, albeit trivially, here's a v4 of the Zbb toolchain dep removal alongside the rewording of Kconfig options I'd sent out before the merge window. I think I like this implementation better than v1, but I couldn't think of a good name for a "public" version of __ALTERNATIVE(), so I used it here directly. Unfortunately "ALTERNATIVE_2_CFG" already exists and I couldn't think of a good way to name an alternative macro that allows for several config options that didn't make the distinction sufficiently clear.. Yell if you have better suggestions than I did. I am a wee bit "worried" that this makes the Kconfig option confusing as it isn't immediately obvious if someone is or is not going to get the toolchain based optimisations. Cheers, Conor. v4: - rebase since it's been a few months - change some wording Alex wasn't fond of in patch 1 - remove a left over CONFIG_RISCV_ISA_ZBB_ALT from the v1 implementation in patch 2 CC: xiao.w.wang@intel.com CC: Andrew Jones CC: pulehui@huawei.com CC: Charlie Jenkins CC: Paul Walmsley CC: Palmer Dabbelt CC: Conor Dooley CC: linux-riscv@lists.infradead.org CC: linux-kernel@vger.kernel.org CC: Samuel Holland CC: Pu Lehui CC: Björn Töpel CC: Andrew Jones CC: Paul Walmsley CC: Palmer Dabbelt CC: linux-riscv@lists.infradead.org Conor Dooley (2): RISC-V: clarify what some RISCV_ISA* config options do RISC-V: separate Zbb optimisations requiring and not requiring toolchain support arch/riscv/Kconfig | 38 ++++++++++++++------------- arch/riscv/include/asm/arch_hweight.h | 6 ++--- arch/riscv/include/asm/bitops.h | 4 +-- arch/riscv/include/asm/checksum.h | 3 +-- arch/riscv/lib/csum.c | 21 +++------------ arch/riscv/lib/strcmp.S | 5 ++-- arch/riscv/lib/strlen.S | 5 ++-- arch/riscv/lib/strncmp.S | 5 ++-- 8 files changed, 38 insertions(+), 49 deletions(-)