From patchwork Wed Jun 7 16:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 13270997 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 BA30CC83003 for ; Wed, 7 Jun 2023 16:49:29 +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=WLOoN2Htv1PVG7s1AdMu0/H0wOK4kC+Ao3pfGho8Bnw=; b=LuHofT89CzNCPQ sh7tbgwzbHv1m7NKvMwG15hE/EDgIDptopVeget5F2+57cvyKn7OaXG381iBWN++vpzv3bNo8tQW/ qTC3Eh53azNuLz+v6pFMwHyrJSfJsEH2Vr+bmKnrIsbJQkCXXrgzNXe4rdT+LZ3s5mDLiSwDc/Xlw JwTnoi9Er9VsI3S5HvBb5HxPWrAj015fJmZwJUnuANPddLh30Dm42beYFmj3kWKW3WYNM6XlW1KI4 B3kB983f2LxaROIsDglE4nzF2Y90uRpfCCA+zlp8aZqVqxz79DeGFhAGGHmI7STqjt0F3R5LaZRGQ xfl/0U18tWJBxD2zEJxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6wLE-006bFZ-0S; Wed, 07 Jun 2023 16:49:00 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6wLA-006bDE-1d for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 16:48:58 +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 D9AA1AB6; Wed, 7 Jun 2023 09:49:35 -0700 (PDT) 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 653AE3F71E; Wed, 7 Jun 2023 09:48:49 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: broonie@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, maz@kernel.org, suzuki.poulose@arm.com, will@kernel.org Subject: [PATCH v2 0/4] arm64: cpucap cleanup Date: Wed, 7 Jun 2023 17:48:42 +0100 Message-Id: <20230607164846.3967305-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-20230607_094856_609452_DFDAEFFE X-CRM114-Status: UNSURE ( 9.68 ) 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 Currently arm64 uses inconsistent terminology when handling cpucaps, with different places in the code referring to these as "capabilities", "features", "cpufeatures", "hwcaps", and "cpu_hwcaps" with the latter two easily being confused with the ELF hwcaps. Similarly, the bitmaps used to store the boot and system cpucaps are named "boot_capabilities" and "cpu_hwcaps" respectively. All of this is unnecessarily confusing. This series tries to apply a consistent "cpucap" naming scheme, following the example of "asm/cpucaps.h" where the cpucap values are defined. This clearly separates these from the ELF hwcaps, and makes it easier to understand the code. I've split this out from a larger rework of the cpucap logic, as that larger rework isn't yet ready and I think this stands on its own as a nice cleanup. There should be no functional change as a result of this series. Thanks, Mark. Since v1 [1]: * Fold in Reviewed-by tags * Move mmu_context.h comment change to patch 1 [1] https://lore.kernel.org/linux-arm-kernel/20230601100812.2303944-1-mark.rutland@arm.com/ Mark Rutland (4): arm64: standardise cpucap bitmap names arm64: alternatives: use cpucap naming arm64: cpufeature: use cpucap naming arm64: cpufeature: fold cpus_set_cap() into update_cpu_capabilities() arch/arm64/include/asm/alternative-macros.h | 54 ++++++++++----------- arch/arm64/include/asm/alternative.h | 4 +- arch/arm64/include/asm/cpufeature.h | 24 +++------ arch/arm64/include/asm/irqflags.h | 2 +- arch/arm64/include/asm/lse.h | 2 +- arch/arm64/include/asm/mmu_context.h | 2 +- arch/arm64/kernel/alternative.c | 23 +++++---- arch/arm64/kernel/cpufeature.c | 53 ++++++++++---------- 8 files changed, 77 insertions(+), 87 deletions(-)