From patchwork Mon Nov 14 13:59:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 13042413 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 4359EC4332F for ; Mon, 14 Nov 2022 14:00:51 +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=aD/UZIZzotYAEjcoGa01i7YUwDivXRhthWd1kwuJiLY=; b=U/+JbjObkLPURi QiH8p75wG37yDMiI6rFINiAxNxp3LQ/1TZxwsYTJL1OSCvR7ckxZ4SrvFSN8zJQbGU6lhcxHA+A9C rJ2fZ5Zg5g6URNiADuXk2q4BN7Po5pd9X9RXASDMa99BZq4DuxATnLSkzyCdzUDH01TLzI0hWauBh 1ATGS+HS91HQHUa3/C912DFVAc8s0g2TD6LWptJfGivFJdUx5xlJkYI0DfKJzAv1AR48pnbZmpzlw u5jWo1XofGwyhWt7Ml67kgUuyGCv6Dxj4eXJaR67cS6V7LjoTu+ALe0vKed9GlmD7m3Q+2QTwxKHL 44JLKrX/+dDxJsqotPMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouZzz-001USx-IA; Mon, 14 Nov 2022 13:59:43 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouZzv-001UQ4-Ai for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2022 13:59:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BB2623A; Mon, 14 Nov 2022 05:59:40 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 076093F73D; Mon, 14 Nov 2022 05:59:32 -0800 (PST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, joey.gouly@arm.com, mark.rutland@arm.com, will@kernel.org Subject: [PATCH 0/4] arm64: insn: cleanups Date: Mon, 14 Nov 2022 13:59:24 +0000 Message-Id: <20221114135928.3000571-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221114_055939_431490_0DB7315A X-CRM114-Status: UNSURE ( 8.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series makes some minor cleanups to the insn code. Largely this changes a number of trivial functions to be __always_inline, making them safe to use in noinstr code, and permitting the compiler to better optimize sequences of aarch64_insn_is_*() checks. I've split this out from a larger set of changes I was planning to send this cycle (refactoring the bulk of the insn code) as that's not quite complete and I'm still writing tests for the larger changes those come with. The changes in this series are all relatively trivial, and should result in no functional change, so I'm hoping they're good-to-go as-is. Thanks, Mark. Mark Rutland (4): arm64: insn: remove aarch64_insn_gen_prefetch() arm64: insn: always inline predicates arm64: insn: simplify insn group identification arm64: insn: always inline hint generation arch/arm64/include/asm/insn.h | 156 ++++++++++++++++------- arch/arm64/kernel/probes/decode-insn.c | 2 +- arch/arm64/lib/insn.c | 165 ------------------------- 3 files changed, 110 insertions(+), 213 deletions(-) Reviewed-by: Joey Gouly