From patchwork Mon Aug 26 21:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: D Scott Phillips X-Patchwork-Id: 13778574 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 1B5F2C5321D for ; Mon, 26 Aug 2024 22:09:22 +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:MIME-Version:Content-Type: Content-Transfer-Encoding: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=kPaioYXh5JegFva4DLUN+LPJLoJXuagoY0hT62RNGhI=; b=nbYmg4bY0/nZdtXYZLGku2XaOG y0Wqdoh8ffEP/FkyApKrYHn4YWK1Z5WXJRxjp54lsmZHfkTRntEv/oyXcYMo/pMF9GSDSps8QUgeS t4V4rlqYbASnnTcKu6kRtyEg+dLvHj6CB1OjzISeUhGUesqxqfli3IElqqLLuWEGUvN/QJ7EhNcs9 xjv4mPBW9jub27Y0rrX0Q5YfrHbZxYPponDaLxhTwhVvaXR5D6It/Jnow0gP2IX5+AVjBWmipBKdk HYhD8XTph+KtssiuEHeEk9gZ5vhuOysrCzK7ev87TqBBvG89bPqEJ/tzJ7+knZF60Ck+hLy8k6MyD X6SLVZCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sihtg-00000008wg5-3Am9; Mon, 26 Aug 2024 22:09:12 +0000 Received: from mail-bn8nam04on2071a.outbound.protection.outlook.com ([2a01:111:f403:2408::71a] helo=NAM04-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sihkb-00000008uc2-0keH for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 21:59:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NtD+jv6gUAliJlO3KIkhP1R6/Du1qJIXBuGZSnUiDRq+4CEkWhPDhQGMI2tObnCqWP6SBBiZpWTPCvai40JNOCzGcM3nY/tEgVb1ROa0mwVB74dYcxLr2BG38azHYNM+zUOYiRupJRbU4e/WbfaCSlX/fqdyQZIpshCIVOFY6B8ccAQpWEhuf0eDyfnisOVfpAerq4wgolIUFqzZ9/Flj98wWLhE/BIfRlTre/KrbdZluvHFkF5xyfQ6rA5UCVCRijf4NWx/CacTFsRMgeMP/QQHUmO9CC/yzC8rxLH3n/SpHJzyMuk0qg9a0P2xIDw1hbYS3lgipBIow6D1XL383g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kPaioYXh5JegFva4DLUN+LPJLoJXuagoY0hT62RNGhI=; b=hUt3slcfe5m1cFZQdghQgKt7wUa7yJIDS2Ms7Bm9BwAivY0jcN13boQsXwxn19nVn9367Da112ma1Vz8zQBcnW2EVfjK2Hm6Vh1ywgstpeRLoa7CAlwUkapoybBFm/rxVoWe7F9dKuohTKE8gigt/zy6GDYvWLZLrLYRlknC3d6oDB4q5kNLRdEHVrMPElHlbziqDdQsdo27+0vat9JKT2igxIS6+I4G/imES6QlyOCuKhSXWgjml29plXjWIB+fXDQOh5ss78y4xsulV9fTi1m/2Gz9br7QbYkHiseOsdXyga5engKm3X5cpZikgahp3FFOrc69oBFqaBtvIyNMcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kPaioYXh5JegFva4DLUN+LPJLoJXuagoY0hT62RNGhI=; b=T7/prHdkogW5sO2ak76N30PKFzPXNDvN/ySaQqF9vXLqk4yoDwxEzCFryoeyARdQPOEzhJzAGM7yG2KkDHx63kOg895nEDVN3ttx/uV9MZX8llLPlJMldrqx3WNS3hTNPfGU10eox0+LXfaeCqmDDQGqeF76Tr4QX4ZfOkjhLtI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from LV2PR01MB7792.prod.exchangelabs.com (2603:10b6:408:14f::10) by SJ0PR01MB7480.prod.exchangelabs.com (2603:10b6:a03:3d6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Mon, 26 Aug 2024 21:59:41 +0000 Received: from LV2PR01MB7792.prod.exchangelabs.com ([fe80::2349:ebe6:2948:adb9]) by LV2PR01MB7792.prod.exchangelabs.com ([fe80::2349:ebe6:2948:adb9%6]) with mapi id 15.20.7897.021; Mon, 26 Aug 2024 21:59:41 +0000 From: D Scott Phillips To: Catalin Marinas , Will Deacon , Jonathan Corbet , Mark Rutland , Anshuman Khandual , Oliver Upton , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org Cc: Besar Wicaksono , Easwar Hariharan , Rob Herring , Andre Przywara , linux-kernel@vger.kernel.org, patches@amperecomputing.com Subject: [PATCH] arm64: errata: Enable the AC03_CPU_38 workaround for ampere1a Date: Mon, 26 Aug 2024 14:59:33 -0700 Message-ID: <20240826215933.1263453-1-scott@os.amperecomputing.com> X-Mailer: git-send-email 2.46.0 X-ClientProxiedBy: CP6P284CA0039.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:1ac::9) To LV2PR01MB7792.prod.exchangelabs.com (2603:10b6:408:14f::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR01MB7792:EE_|SJ0PR01MB7480:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a1662bc-ef65-44c4-eeb3-08dcc61a62e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: V6jAA7LFjs0D+5NLCODRttQLUnlXmGHqVMzoQ96diz77ziIxhNzCT/fEA1iXiLrzj4Mh5Vn73+I9+/mfl2yVApCCRTiY+ssa8qfJh1AS2DPGlfvS29rRJa5+3VCau4LSZnwe0yQnuKSm7xNKzA6imD0KmrfIFLTXvYS2kDlvBAcc1VIovc+jF1Z5Wc0OPE0yxT/tBYAmaD+0CwNg6BnanQp3hRG/+YAEUMrvwTvWmgG1BIQpktGY/kfuQOJ/wuZKJ6/uhH3qjn9sGAsdEJiC2knvuyuiNNbq+i265vCw4cRhpUiH1kkytSfsL7AiPgdn3vnbuciFfYWVuL3Z4uQUFIIZ3VB498wP8lMdW5TpTU7+ILzdTY5T44SlG/gtYwNwH2vC9CJuM8IbwJDd5ykLea9l0kjFUlgAOpzjCg4vaJE/iT2uWJgQoCyrDUY4lCVMXmTzxNyPOb3NSCWjqiUTtRC6JcIF3qaQaqZaCAEhxiVCWXaJDdLBRiEkGkvvS0+sHPxfMnu6hnmWMmJfkKN7SFlp/bsrLhq1sDaD4cavbuUdBOhJmcDF0y3PwTt8P4C0OzM4FdP9vVIwEBTt9PyCJXX//e+17ZeKilEjS4Uk409/ZE4WLtRsnmt3WVnAtpmiPql9tgsadeXMaH4Quhn6q3K/ceDmNoZ6V6d7KwRSwqrrkj6i38bBRQG4qlDG7bsjKrLeODlvJ1+NIHKn7OqY6W9qIbfT6MKjGNBnDJf/03fD2yTKeiZXd7rBJMvYhDTOPcr7mWGEXdHnxaGlI1IZMCHLgzCosVKGOMPsP5cMG1OELzxeesLKG8kKr4yFEpUn4CR2ZYSQ+gor5nW/yoftJbre98Ia9lQOpgCjDESR8OCqewDSVk0zwGwa03yKdd5wtEa7ZdtxqI26dwN3EVLBr3Wu1dIFUS35hiZmlAZC2ZduDpmIzej+J34wXq+bWswryEFZmzX7pD/OCwmkMcQ8lAN2hEcZ1pa6eJwcO8ZH1AesEFXpyUrZ4Uh+UAg0GTmGHuzV6GIOkvqBN3v4+pjo3ZU9YOgMB4WeO8RakJy0heA9aU7S0y9jlvJLirbwLag6hlO9sKZmncyhgnhIePtWATo8IKv6EnuIe7U3HY5Qu20CrTrowTw/uZsevGQ3MksMMM65bhjWSam0ndAmiyxT7DSsJeDEtLvIjC6o9oDV6/LaknTlXAJQKL9LRjczyzvygiZB6EbPIKNXqlOd7Xy7qfhpLHpwiQHruyErMOaCdcKCKpU/J0k6vY3uFpbistLt6BGKvd+MqgY8UnNN9jdzYcOsMTIq6ionCXLpxj3J9clUADtQl5HKKJtFRkSTbyuPBUYxplZWdt+ymhOZNuUGYWUtgz5lPscA6OKl831nz1lil+V1jiYuMRWI0p4Z4fRxvbGxlklxlCliTs3LriuFwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR01MB7792.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: e997wI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rnxib7qKFAxD1FKfjLXUwajfZvff7P/RAqOIZbaL3A+C+Xcyyw10UDILoKzl0mX9OVCTOC4jxBT0GbkwZqeV7yQt7VZ9e0nnB9FzkZcFy62H1UIBbpPaY5VFt7j+HKbPyHBF7oiT5q50vVAq9GhPpk/ilnni8NqdEqBwqY3Aw+adJUbX3TxoiioLPVZn/6Vc5hKy1S22AwL3zPJmxuHySGGHS14IgH5Szvb9OLVd5uOVGe7s9oeUyo1Q4QewbeKuXVTmtjNClhi41ncK+r0xLT8kLVvFltSLNV1aZVEYvA5r5wwI1IJI2QIZ1NLZOvNnMzaR0H4/dXYcKa/V1AerCJeMxjJr68UEsVuPucUtWzUaMzKv+SUwPIy613VEyDztdjI97TEiNpnARlmx9JkXjAJAsZBmVR7+1i5+bDRNy6jUvN+THFAoQD+INaFHnYZUwqIR1ndUqMYPDi7q6jUXu2E10q4n4m2T3f/gd4Ifopdalkw6yT9A+D9uBPkVcxNycBIEcyQnUK9oGpfSctEpfAxg1ZqVrVGHrxFrP09Phfn7rE= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a1662bc-ef65-44c4-eeb3-08dcc61a62e7 X-MS-Exchange-CrossTenant-AuthSource: LV2PR01MB7792.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 21:59:41.4332 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0+pX1F7mJApshDyPtNwcSqyCEStt27IV7Ijlh8S0vmlHhJRwKBMYo7Eiba8WPcUNWbUSSk0REj+mnKQRnbkmDKnj8FKlDE92IZXY02uCtbaG1PRtSzblMcF8GUFsshYH X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR01MB7480 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_145949_384964_424D702F X-CRM114-Status: GOOD ( 12.95 ) 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 ampere1a cpu is affected by erratum AC04_CPU_10 which is the same bug as AC03_CPU38. Add ampere1a to the AC03_CPU_38 workaround midr list. Signed-off-by: D Scott Phillips --- Documentation/arch/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 2 +- arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/cpu_errata.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/arch/arm64/silicon-errata.rst b/Documentation/arch/arm64/silicon-errata.rst index 50327c05be8d1..39c52385f11fb 100644 --- a/Documentation/arch/arm64/silicon-errata.rst +++ b/Documentation/arch/arm64/silicon-errata.rst @@ -55,6 +55,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | Ampere | AmpereOne | AC03_CPU_38 | AMPERE_ERRATUM_AC03_CPU_38 | +----------------+-----------------+-----------------+-----------------------------+ +| Ampere | AmpereOne AC04 | AC04_CPU_10 | AMPERE_ERRATUM_AC03_CPU_38 | ++----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A510 | #2457168 | ARM64_ERRATUM_2457168 | +----------------+-----------------+-----------------+-----------------------------+ diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a2f8ff354ca67..c8cba20a4d11b 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -423,7 +423,7 @@ config AMPERE_ERRATUM_AC03_CPU_38 default y help This option adds an alternative code sequence to work around Ampere - erratum AC03_CPU_38 on AmpereOne. + errata AC03_CPU_38 and AC04_CPU_10 on AmpereOne. The affected design reports FEAT_HAFDBS as not implemented in ID_AA64MMFR1_EL1.HAFDBS, but (V)TCR_ELx.{HA,HD} are not RES0 diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 5fd7caea44193..5a7dfeb8e8eb5 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -143,6 +143,7 @@ #define APPLE_CPU_PART_M2_AVALANCHE_MAX 0x039 #define AMPERE_CPU_PART_AMPERE1 0xAC3 +#define AMPERE_CPU_PART_AMPERE1A 0xAC4 #define MICROSOFT_CPU_PART_AZURE_COBALT_100 0xD49 /* Based on r0p0 of ARM Neoverse N2 */ @@ -212,6 +213,7 @@ #define MIDR_APPLE_M2_BLIZZARD_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_BLIZZARD_MAX) #define MIDR_APPLE_M2_AVALANCHE_MAX MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M2_AVALANCHE_MAX) #define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1) +#define MIDR_AMPERE1A MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1A) #define MIDR_MICROSOFT_AZURE_COBALT_100 MIDR_CPU_MODEL(ARM_CPU_IMP_MICROSOFT, MICROSOFT_CPU_PART_AZURE_COBALT_100) /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index f6b6b45073571..748aa536446ae 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -773,6 +773,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .desc = "AmpereOne erratum AC03_CPU_38", .capability = ARM64_WORKAROUND_AMPERE_AC03_CPU_38, ERRATA_MIDR_ALL_VERSIONS(MIDR_AMPERE1), + ERRATA_MIDR_ALL_VERSIONS(MIDR_AMPERE1A), }, #endif {