From patchwork Fri Sep 6 17:13:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13794474 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 B485EE6FE34 for ; Fri, 6 Sep 2024 17:17: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KTx9T0QsthgtMWPrZGO+mOSHexmLZhoXS2lkiJJqmPw=; b=mGufitp7h8DFPozfhdjnaBHsoq aI5J27ph27qIPdd3ggOpW4gBBlKAvK7OVtjefnm9TFXkS0P0PJIa+5duG0agCtVx9//hhNwckg5IT ncjunJnyNiWDrqsYT0Nh/G1Hq8t59VZeivTDqQLEwGs5+UyO4vrUQbX3MGr2KohvFE8TVYB9NIKRZ k4DP9MTh6oFwRBuDbp/8fiXfCaqWJ3yN8hQusAryvxv37UpkRQ1+SZN3mxwbKJY/IVsXVWEutyZKM JK8gj8lccZDtgyxbDBTbWpG+TN8Si8WRgoNpCKF3981pgy0Nt57a/8qxvpAOnmaLcZqE6Vi1PzjeZ BIJ1NfoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smcaG-0000000D5Yi-0Dx2; Fri, 06 Sep 2024 17:17:20 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smcYL-0000000D5Ad-3rKo for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 17:15:23 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2d87a0bfaa7so1680964a91.2 for ; Fri, 06 Sep 2024 10:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725642920; x=1726247720; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KTx9T0QsthgtMWPrZGO+mOSHexmLZhoXS2lkiJJqmPw=; b=hQIub9eI0UvlZcui75a0vJzGHUFccdBcWdu1mkG7d3TJJf33fNPwZVZVQR25MmVtD3 HH2lxKQcHiGEk15iuBSJWekTz0OhEmNdXda5BZy7e35mfHB5Tqb4r0NTFmwcSkjPqNsy 2vny1bjtRdpkUl2IXvpg621+sqLCBXjw6rshCJCkcOOkXJSL1gx/GRbkEp+bxUSxul9f 5aU756Q+RDc8KSVZEmq19oA/BbSI4gw2v3QtXOS/SoZJGh1Id9TFcMs2MSP1fokWUqRe E7JmMhdmVfdpwydqbg/AE/EK6FluijwTr80p2jhPyozIxm12LKQNscrNem+rB8XykOAX 03Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725642920; x=1726247720; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KTx9T0QsthgtMWPrZGO+mOSHexmLZhoXS2lkiJJqmPw=; b=vHzYj54v3Msk3z+F9wr88Ops5ePlLr6G0W2+sO+5I333DwcYcxOXs5IlpZBM9+uc+x x6mRoR5J+r//fE7HVsnN4AkTHEhsIsv758MGQogJLSoSMG9xnhOX8BwjM+WR2sTnJ1LX arwUUloxZ3tPQtqqTSC8SmHaNF3Iz6ci+MfkokXBPl8ixfVWvKcqE2cgUNmkjbs48Uc7 wYaf2NQ6WYU+H+Sbjr03E8siucpFW+5XVn1UY6Ue7cW4A4z6ial1htWLF65OJnzU6zyn CEgKC8/obx0VaGbB39+OcfmJ7cqvcblKSe1xF90qOf9i9DgA3O5Nd7Jzfm2xy0Qi7JrO iPKg== X-Forwarded-Encrypted: i=1; AJvYcCW4Q/wZ6ROPyBdgivKFUZUdS0UDT3Z+vT32EDr0Zrq2tUaxpPlNeHaKogJqCSXN7QXL7/ItF4XfH3+4tiE5sN48@lists.infradead.org X-Gm-Message-State: AOJu0Yz53a1a7CR+aJLS6kLyOs087kvSlZVAG08IS1gCW8/awEIWpZCi JSmpAKkM88HMT8gpz0qe912C7ha1Ad9xr9gC8iQs6kPbD+ORxR+5 X-Google-Smtp-Source: AGHT+IHFpxzGKP7uZ+bLuIto3ZkdFlTSlbTArs9pk4dQhGEvEew0w4wkM3mOpXuijDV8JQXfBH9a8g== X-Received: by 2002:a17:90a:348e:b0:2d3:d7f4:8ace with SMTP id 98e67ed59e1d1-2dad4dddd7cmr3729535a91.8.1725642920458; Fri, 06 Sep 2024 10:15:20 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2dadc10fa99sm1841519a91.39.2024.09.06.10.15.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 10:15:20 -0700 (PDT) From: Nick Chan To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: asahi@lists.linux.dev, ~postmarketos/upstreaming@lists.sr.ht, Nick Chan Subject: [PATCH RESEND 1/2] arm64: cputype: Add CPU types for A7-A11, T2 SoCs Date: Sat, 7 Sep 2024 01:13:24 +0800 Message-ID: <20240906171449.324354-2-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906171449.324354-1-towinchenmi@gmail.com> References: <20240906171449.324354-1-towinchenmi@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_101521_968212_1EE12912 X-CRM114-Status: GOOD ( 12.07 ) 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 A10(X), T2 types will be used soon, and the rest are added for documentation purposes. The A9 is made in two different fabs and those have different part numbers, and the TSMC cores are also used in A9X, so it cannot use the usual naming scheme. The A10(X), T2 performance/efficiency core pairs appears as single logical cores to software, so both the performance and efficiency core codenames needs to be included. Signed-off-by: Nick Chan --- arch/arm64/include/asm/cputype.h | 42 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 5a7dfeb8e8eb..f1720158a54f 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -129,18 +129,27 @@ #define HISI_CPU_PART_TSV110 0xD01 -#define APPLE_CPU_PART_M1_ICESTORM 0x022 -#define APPLE_CPU_PART_M1_FIRESTORM 0x023 -#define APPLE_CPU_PART_M1_ICESTORM_PRO 0x024 -#define APPLE_CPU_PART_M1_FIRESTORM_PRO 0x025 -#define APPLE_CPU_PART_M1_ICESTORM_MAX 0x028 -#define APPLE_CPU_PART_M1_FIRESTORM_MAX 0x029 -#define APPLE_CPU_PART_M2_BLIZZARD 0x032 -#define APPLE_CPU_PART_M2_AVALANCHE 0x033 -#define APPLE_CPU_PART_M2_BLIZZARD_PRO 0x034 -#define APPLE_CPU_PART_M2_AVALANCHE_PRO 0x035 -#define APPLE_CPU_PART_M2_BLIZZARD_MAX 0x038 -#define APPLE_CPU_PART_M2_AVALANCHE_MAX 0x039 +#define APPLE_CPU_PART_A7_CYCLONE 0x1 +#define APPLE_CPU_PART_A8_TYPHOON 0x2 +#define APPLE_CPU_PART_A8X_TYPHOON 0x3 +#define APPLE_CPU_PART_SAMSUNG_TWISTER 0x4 /* Used in Samsung A9 */ +#define APPLE_CPU_PART_TSMC_TWISTER 0x5 /* Used in TSMC A9 and A9X */ +#define APPLE_CPU_PART_A10_T2_HURRICANE_ZEPHYR 0x6 +#define APPLE_CPU_PART_A10X_HURRICANE_ZEPHYR 0x7 +#define APPLE_CPU_PART_A11_MONSOON 0x8 +#define APPLE_CPU_PART_A11_MISTRAL 0x9 +#define APPLE_CPU_PART_M1_ICESTORM 0x022 +#define APPLE_CPU_PART_M1_FIRESTORM 0x023 +#define APPLE_CPU_PART_M1_ICESTORM_PRO 0x024 +#define APPLE_CPU_PART_M1_FIRESTORM_PRO 0x025 +#define APPLE_CPU_PART_M1_ICESTORM_MAX 0x028 +#define APPLE_CPU_PART_M1_FIRESTORM_MAX 0x029 +#define APPLE_CPU_PART_M2_BLIZZARD 0x032 +#define APPLE_CPU_PART_M2_AVALANCHE 0x033 +#define APPLE_CPU_PART_M2_BLIZZARD_PRO 0x034 +#define APPLE_CPU_PART_M2_AVALANCHE_PRO 0x035 +#define APPLE_CPU_PART_M2_BLIZZARD_MAX 0x038 +#define APPLE_CPU_PART_M2_AVALANCHE_MAX 0x039 #define AMPERE_CPU_PART_AMPERE1 0xAC3 #define AMPERE_CPU_PART_AMPERE1A 0xAC4 @@ -200,6 +209,15 @@ #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL) #define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX) #define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110) +#define MIDR_APPLE_A7_CYCLONE MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A7_CYCLONE) +#define MIDR_APPLE_A8_TYPHOON MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A8_TYPHOON) +#define MIDR_APPLE_A8X_TYPHOON MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A8X_TYPHOON) +#define MIDR_APPLE_SAMSUNG_TWISTER MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_SAMSUNG_TWISTER) +#define MIDR_APPLE_TSMC_TWISTER MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_TSMC_TWISTER) +#define MIDR_APPLE_A10_T2_HURRICANE_ZEPHYR MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A10_T2_HURRICANE_ZEPHYR) +#define MIDR_APPLE_A10X_HURRICANE_ZEPHYR MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A10X_HURRICANE_ZEPHYR) +#define MIDR_APPLE_A11_MONSOON MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A11_MONSOON) +#define MIDR_APPLE_A11_MISTRAL MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_A11_MISTRAL) #define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM) #define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM) #define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO) From patchwork Fri Sep 6 17:13:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 13794475 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 D768BE6FE33 for ; Fri, 6 Sep 2024 17:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C2Awb8QHiwgK4hQKj8EI8RJlryPJ8iCefANxC9lVPtM=; b=Hh3hTFAxyNULNAfEqgSD3PM46X 4jAPkgcHsbfJRywIuSB/mssInyZ+Ei+Xb/IaSxFyTnKJQXi5+wrMetL84dDHNcb18mAGTYabqCH/M ML2UzzPAqlt9IciGxLGYEhUUNGErZ/wkTJFjHc00Fib3aCLSNrcXBVxQeUpdUpzmgNjRA37OnzgLR ddEB/oioOfOMDy5bxcEKecsdegMzkHXRcNyjsNY3J2dbROkfwEL/6ObB/ue3Y6xIFaXu9xsJI8kmM nJN508ZyTb95KzsXfyhoEAvrgVDTLChYbWrxrcc5sSmQPxXa71D1Uvix7m6s8fTJGowRSyhAZCD1S kCnECKxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smcbD-0000000D5hu-0ts6; Fri, 06 Sep 2024 17:18:19 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smcYT-0000000D5D7-1caO for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 17:15:30 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2d873dc644dso1722014a91.3 for ; Fri, 06 Sep 2024 10:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725642928; x=1726247728; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C2Awb8QHiwgK4hQKj8EI8RJlryPJ8iCefANxC9lVPtM=; b=iGbRZl9DwmRIUgA/ozLwHRMG9EMtC/oTbY7EvvPo11hlgE31e3zfd50N4mowpIdOcq xr06E83928t70inLXfzKm72/HtJ3G19IlrKJrHsA5NoLjbt0KdPgN4QeADVksI0EUU+j W43UhqISzBa5wEYXgG25/ycy2Q7/cIXi+qB95v2mZd9wwCjE6nOdvR2kP2GDF0MaVitD oe3EiKRqcoUWNL9JKRqC74P/DDVEAklcWdnV+FVBqyPIg6qBi98zsO+aokqo3AQwwhh4 c+3hN7EJVoNhXIrNTitPb2NXVrYd7ZgtquaCxRYJlMxzfTezI2KXJD7rhbQ3OzakhkO3 ThFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725642928; x=1726247728; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C2Awb8QHiwgK4hQKj8EI8RJlryPJ8iCefANxC9lVPtM=; b=m+6nUEHvYO721UN5lJXzikSXS9eOoNsUem9jfmkj889e5NhgW8YF0vVJXnihM2DMdZ XPhAwstpl0HLAQsALbZBc9WUqBQAM48SCqef7JSxKUHGxOeG9CWEVehjzYZkoLPVYRFX UQM8wHjuTq7d5bubEbC1gXh96r32aC/DZxP+GQ4N70xN4/8QF7TzhkHm5eARIKW59mTN 2rbDlJAYIe/Hxsbv7qWAHvQIktnpV+Bkw/C31NY7+CyC8bTbavCxV8fbW7tY9T2Y9nak 178p8ThJkn5BIlDTh4Y1l18+RkfE1YEk58T7LXUhfRQx1gI3WoC/c5PSdyOfbwfxz5aX 1g3Q== X-Forwarded-Encrypted: i=1; AJvYcCVXcThQPsXhZsV1olvgSteFngyirpdGGg0a0I/yGNaPFH91LffeIivLA5zf8hedrRq87/muUMLF7r4Ua3mORtbE@lists.infradead.org X-Gm-Message-State: AOJu0YynB3XuFkmaeD9xhExKClOK0UnMqvWigCoBt6z2IbLIUjevoy6Y qpn+gYP2lNj7k28D3mqFrYWwKwgosDeI+IYSR6QVNWJK6S+9YYOD X-Google-Smtp-Source: AGHT+IEitKjL9pf51BQRfyrnIhp+JSQo2gkjFGgr1MpgdrNgRy39LdtoUZno7Bc9XWCc1kIaXZP2HA== X-Received: by 2002:a17:90b:68a:b0:2da:6812:c1bd with SMTP id 98e67ed59e1d1-2dafcf1ac51mr112698a91.15.1725642928140; Fri, 06 Sep 2024 10:15:28 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2dadc10fa99sm1841519a91.39.2024.09.06.10.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 10:15:27 -0700 (PDT) From: Nick Chan To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: asahi@lists.linux.dev, ~postmarketos/upstreaming@lists.sr.ht, Nick Chan Subject: [PATCH RESEND 2/2] arm64: cpufeature: Pretend that Apple A10(X), T2 does not support 32-bit EL0 Date: Sat, 7 Sep 2024 01:13:26 +0800 Message-ID: <20240906171449.324354-4-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906171449.324354-1-towinchenmi@gmail.com> References: <20240906171449.324354-1-towinchenmi@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_101529_436502_3609E8C7 X-CRM114-Status: GOOD ( 14.41 ) 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 The Apple A10(X), T2 consists of logical cores that can switch between P-mode and E-mode based on the frequency. However, only P-mode supported 32-bit EL0. Trying to support 32-bit EL0 on a CPU that can only execute it in certain states is a bad idea. The A10(X), T2 only supports 16KB page size anyway so many AArch32 executables won't run anyways. Pretend that it does not support 32-bit EL0 at all. Signed-off-by: Nick Chan --- arch/arm64/kernel/cpufeature.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 718728a85430..458bcbc4f328 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -3529,6 +3529,29 @@ void __init setup_boot_cpu_features(void) setup_boot_cpu_capabilities(); } +static void __init bad_aarch32_el0_fixup(void) +{ +#ifdef CONFIG_ARCH_APPLE + static const struct midr_range bad_aarch32_el0[] = { + MIDR_ALL_VERSIONS(MIDR_APPLE_A10_T2_HURRICANE_ZEPHYR), + MIDR_ALL_VERSIONS(MIDR_APPLE_A10X_HURRICANE_ZEPHYR), + {} + }; + + if (is_midr_in_range_list(read_cpuid_id(), bad_aarch32_el0)) { + struct arm64_ftr_reg *regp; + + regp = get_arm64_ftr_reg(SYS_ID_AA64PFR0_EL1); + if (!regp) + return; + u64 val = (regp->sys_val & ~ID_AA64PFR0_EL1_EL0_MASK) + | ID_AA64PFR0_EL1_EL0_IMP; + + update_cpu_ftr_reg(regp, val); + } +#endif +} + static void __init setup_system_capabilities(void) { /* @@ -3562,6 +3585,8 @@ static void __init setup_system_capabilities(void) void __init setup_system_features(void) { + bad_aarch32_el0_fixup(); + setup_system_capabilities(); kpti_install_ng_mappings();