From patchwork Thu Jun 1 10:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 13263326 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 DBBAFC7EE2A for ; Thu, 1 Jun 2023 10:08:46 +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=AAF1eQHDks3YsUWQHy+2bIutzWVbuKCgTDI1IPC4JJY=; b=2lkKDj5P/c/wJ0 myjdYQN62UQ8zGnl1BOrWAuHE3XryzomJUGawSdM+plN8bcod7XsVt9yZfoVJBA4pd0thAdVCUrZw jDzg7zvVt/7bHSTaGMV6HnAcm1CDPbhI/grdjBxEuv/iwnFvcXBv/JkKYexpg/yT0Z3G8N4+NaHJn 2gnw3QZm0TqSdEUUiYUDWQHjeGJyZFXG5k2rAm7D1IfZuJgYUtBBWcdA06+hrSiOk+lnIZ4hpEh+e QCuAF5BOJuPEuBQ7vjzBAQY1aKFu8kwiVQfUk5QWkKg3RQI667p6PRqRNF93sbRi3KPINws+I7rIL +Krj2qz1qWqucjJ3CJsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4fEH-002qTt-1W; Thu, 01 Jun 2023 10:08:25 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4fEE-002qSw-1I for linux-arm-kernel@lists.infradead.org; Thu, 01 Jun 2023 10:08:23 +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 93C10169C; Thu, 1 Jun 2023 03:09:05 -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 377F23F663; Thu, 1 Jun 2023 03:08:19 -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 0/4] arm64: cpucap cleanup Date: Thu, 1 Jun 2023 11:08:08 +0100 Message-Id: <20230601100812.2303944-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-20230601_030822_484555_DC3B07B0 X-CRM114-Status: UNSURE ( 9.32 ) 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. 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(-) Reviewed-by: Suzuki K Poulose