From patchwork Mon Feb 26 20:15:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Ferguson X-Patchwork-Id: 206907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2319666dyb; Mon, 26 Feb 2024 12:35:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUNtci7Gk2ZLz2EtqWFVjjADNLhV44CkOiUmWbL5/uVkldS7ICOeEJZJN9N0wqeWZXQ1+zfN0NtxsCL0WEd41sRQPZwQw== X-Google-Smtp-Source: AGHT+IG4x+qzwPAr8XrQGPC1tl80u6g90dvo1UH4L214DixFnvceXK2yqkj3dFjS3HH3c5kSru/K X-Received: by 2002:a05:6a20:c916:b0:1a1:b38:be61 with SMTP id gx22-20020a056a20c91600b001a10b38be61mr242583pzb.51.1708979706684; Mon, 26 Feb 2024 12:35:06 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id t7-20020a635347000000b005cfd72d0bc7si4221700pgl.246.2024.02.26.12.35.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 12:35:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=BSeMmiLo; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-82284-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 162BCB24815 for ; Mon, 26 Feb 2024 20:17:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CF1E13174E; Mon, 26 Feb 2024 20:16:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="BSeMmiLo" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2094.outbound.protection.outlook.com [40.107.94.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D71ED130E3D; Mon, 26 Feb 2024 20:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.94 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708978586; cv=fail; b=ZA47tCkERQy1O2XqNbKK98fqK7994fzes4dg0IFyCcb9nM8O8rN56ei8fTLSN/r3Vyu9GOPcirG2eGa5Tj6k1cBD6rdKwld5eomh7qn+L6O933K4ZdZ/l6U1lVd9MCI6tO1ICJgPZIgClNQbmPUObdWdBViMu7m/0GUgqX2Jgp0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708978586; c=relaxed/simple; bh=L0+xsFTSdr/2PufmiCH7/xGFA9frNWI65iy3TDO5fR0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mgeDIdzQcY++BSghx2E+0LjzfcJjD2zyYFDcGJS0wF4MXYVvymdodgPSL5CFWxygLRrQBO0CZ6CLdoQ0dPtN22tHsiLZs+hxlMSt2ssADyGLOQe+CHsjZ4ZY0JWvHMdu3S93BT1XXt4a13RKsCllBWwrAivQQrAYc3qANHylUKk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=BSeMmiLo; arc=fail smtp.client-ip=40.107.94.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LefeWpRTDcaCe6J/iRqjeFKILIy6eCP/SSzNf//dF803ghUpkl76mGVT2dPsHumW3BuNQ66GeKZbKJiVXQczVvYvQZ5gO/sMRQY+/sNdkvrJOqHVI0AD1cFG5v/yrppd1TB/nrn512kqkEe0eG/3k5C39QZ1Hklr3P1Tzy3P65ZWzXni86ceYtqFVKRPAy0lIxqBlyd2O0G/wSVtOtD9A176cN7EYcLwFvWmtExk4165Y3Arl8pqQaJ5ChuDmfFW0KGUiEZBC0Vw6VOBRKZGRsBNZj8rDT9cWl4fweJ3pjahl2U6lDnDstiAkXC+l+ovk4CbBZyvLJ2td2dZysGYBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=bQXYvBbRM9gqHDLwox+XNxSA3Br7oAknoKyZaCrG3Es=; b=ktSxAEzk2ttoGk85kJ4RKXIje9SEkdW+n90Du+ozGqKHCCju3L1dgN/E5gMtLnSHMCGvV59Ua0Rvs4zuGysAJxKA6e/l4uQ4aoGneU8lQ59DzZJE6Dleg1/gnc0WaVAXo0AjHFt1p/LULyLauQrf9kr5h2bGFKP1fsuJQbWXgsa7/owUOMAfG6iLQwIvCfBktmx0W6QV3OebdNPHL//H7sjUlg+sLF2W3qTUOgseos6IaZHS/Z23HIdvVxjGZ3bgX5u1PuTsowvkKInCwxEygtpQJK+MExrbvHa8uSA0IWaP2ToaMNosXNiNu1HE/kgp+i+B7PZe4rF2cN4OlF3bzA== 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=bQXYvBbRM9gqHDLwox+XNxSA3Br7oAknoKyZaCrG3Es=; b=BSeMmiLoc/EEUZhsCk4PY7Afs9rUUPeLDqfBBNgoMrFIj+M/lMN47oOdaXdQ1LtEOz/4IAnMjoUjlfY9D2HxQwzTSLVnxItkGfyg346O01nyhrAbNzUJAke4eO4Z2jGaS6Nx4F2Nmypg71ftHBsh3gdXYPWJSrTenec6AgMvcdU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from CO1PR01MB7370.prod.exchangelabs.com (2603:10b6:303:159::16) by CO1PR01MB6629.prod.exchangelabs.com (2603:10b6:303:d6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Mon, 26 Feb 2024 20:16:18 +0000 Received: from CO1PR01MB7370.prod.exchangelabs.com ([fe80::28bb:f135:bd95:a21d]) by CO1PR01MB7370.prod.exchangelabs.com ([fe80::28bb:f135:bd95:a21d%7]) with mapi id 15.20.7316.034; Mon, 26 Feb 2024 20:16:18 +0000 From: Daniel Ferguson Date: Mon, 26 Feb 2024 12:15:19 -0800 Subject: [PATCH v4 1/2] RAS: ACPI: APEI: add conditional compilation to ARM specific error reporting routines. Message-Id: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-1-08e0f168fec1@os.amperecomputing.com> References: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-0-08e0f168fec1@os.amperecomputing.com> In-Reply-To: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-0-08e0f168fec1@os.amperecomputing.com> To: "Rafael J. Wysocki" , Len Brown , James Morse , Tony Luck , Borislav Petkov Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, Daniel Ferguson X-Mailer: b4 0.13.0 X-ClientProxiedBy: PH0PR07CA0038.namprd07.prod.outlook.com (2603:10b6:510:e::13) To CO1PR01MB7370.prod.exchangelabs.com (2603:10b6:303:159::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR01MB7370:EE_|CO1PR01MB6629:EE_ X-MS-Office365-Filtering-Correlation-Id: 34814eb1-6519-4c82-5777-08dc3707ca90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: snZfID1ms8CefAxcOjmMkLUTtzlR5szQfX2a2DjW/kydBGwHhMFdK+n2Tggf5eeyJgSAaC7xO6xzVyXDmJeL6mqen+4Gk57jTZ09enowO7RKjB8QNPbJETJUFKcF650aw186UuC39SKAFcW+rqfm5yQQNiWozxFe3wNc+eAqCgO91FnS5U/GYPcSWrxCedAqFUo/kwMJAzP9G/AQfLDl+Mb/w3LnTX34m73sJXezRSI+SC/h5bh22nOSuXav8+peouc87JAXSGLeGvhg1vR9U0cC78+Yn0ygntN9Z5jASvGHiaQvx2gtLs8f35ZeJMUuzNFnq6gE09KiXn1eDOaQGRlJ9fDqvJLh0ZAGKX9CCJdPZmgaIxRV0YkMKaTPLIw6TANPERNnwiUGFf637PMm46PiOhIUFKXnOf+MDTJkAT3fA9DLMASjW+aZEvot5gnlXcbNyQXZhG9pCNdIJzlUjh7jKoXed1hFT6qXUnwqopG5xnBnncmw8EmZURuYKkzEwQI4Lz4V5bAJfPaWqxZsDUey3LsLdUFcWxbWe95+eVWjTLmbKwjCKmLm8kI7LnubIb0OFXKTDMZJ1YjbLmExS4cwOC1lzZAFmJmgd5b/o+dBuPx1RydmkKJqHVTBbvcQKHj6TT0LtJlGxJuKzm2P8l8UIR0elhCzpmWTc6ttRHowojYUZ6TZ65ORwBNllcdDX4lp7Tf5BjhRbBXqmOFryQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR01MB7370.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Slu8hANSv3hIHN4CJEoU5Qs6xLoU?= =?utf-8?q?y/0GEWTXljAs196l54PwUbJsaSm0b7APv++++1JZJWCETUVRD5pYnJYjOkR14I/Up?= =?utf-8?q?4HgewMLTenkk9OvxUjnNc7Cv8WIVDgXb3YN2PLRYXKpwGzvaFJfe+ME0EM40DUDDX?= =?utf-8?q?K3g1BCjgV8wcNNfZbeg+90FBECI0xtZerQX7tnzJwNpquRGj94HMV32HaORPnBAbB?= =?utf-8?q?oI5bwwmnOgqgQzrNOCfKW65X5hvUVqi2GZ4vzMEfIKfNyVr8PycwT07NsJco412Nx?= =?utf-8?q?kXGgcpSyQ0jS18Xo9aoMJ1P4QSzxLMEHFazBRZ0ntuyg5uYjg/GPfbtLq7NfTJf5n?= =?utf-8?q?ZCYk36MZrbzO0aDPyuWDv3qcu143Kd0xd6sGbPcD5zjY5UMqy4X00XS5qLUfY2iot?= =?utf-8?q?qxoKogBhGIpRz5+W5NrK6utJ6ZpR3zxmtgmFqvkpIWPGLUxQlYwGkBsP+Rk0uFZfk?= =?utf-8?q?8BHm2nakr4TEc9P9I3PDJvuuxK7Q89ExVHKKoBc7N6p1kGp8U4cq9e5j7Pdcd3LPw?= =?utf-8?q?zbNlf4x24syIRg5rO7csV/caJ7f3qG4Ri3gaHtxOLdC850Q7lkwtvJe6U0vQX14bW?= =?utf-8?q?0F4fez1+yv7guabf6tEbLMGL4gGzEEfuT6TTgoCNmGVQDzXMOzTZr+G8oikWvGvDC?= =?utf-8?q?doVezj2Yeo2PlmMNwg5R/GwSP4i9TlDPo8jO/RrsaZoYZCapwygQ5FX1DdLjRyX+L?= =?utf-8?q?rSb4MSU0ZVtvUSPHmjkcHJmXsUt7ctms9UjEEgZ/1i/PNnfpKlJ6uMtpZTMLZuGT2?= =?utf-8?q?B7Ix/iriYAY1UonE0smoDlkvFdLorv4kSSGYisLsmaqa/O6Mx2N5RMK7OW9f7DPze?= =?utf-8?q?/A00z4WkRcqNy+B532Y4jJggcgLb1B4d+JNZP2ielnsEgOTiREYab8S7BZQAkst+X?= =?utf-8?q?ZDKM2FriRQauznmG44k7hH8LaIkmAmnJyJoJIJpnJPPToZfLS07OpeFuVdhv2EJ8n?= =?utf-8?q?3rkRyXyExnaZxkFJuY4rQRf0z5KylcmyiQ3XaLrdVYa7Cw8+WBAWtv7SAGNHpkZFD?= =?utf-8?q?rll/poQg6C9xgoMjTgmlJh4ogmDp4I3+q2vNrcrvDBTmHXLimKqX6Z9InTA0Fnl4s?= =?utf-8?q?fnEOk9zevArmLC8Tpogc1Fd82yDYV3t8qssHnK1yDZititlMOZnW5zihAbMfoxQZ5?= =?utf-8?q?eek7PS8Njmouv0ymFi8CvGGk8YJv6jbTDV2ffyDbmPySxwho/IzckcvMp8OiLwF1k?= =?utf-8?q?f7LV81FW/tfNS8TmCdCqpl/UpRaMC8ddYRe7zHMIaRbn5iA3qCiUbH7N47FhsAIDf?= =?utf-8?q?V8kMaUa4jW9EzmbM8liRS24p91o8Ubsu0BrlYFeZPfeODt0jnn42aNA6v1/Z/7I9J?= =?utf-8?q?ekKIM2oZz8ndm030DcId2A0+XF12XUaj3+sqsAHT9mI0XkK3crrH0/QQqG3Eztc1F?= =?utf-8?q?LwL6NmuClatGoJe0WB9kKIxqIwF2Co4LouvG2v1M2QyDtg1gjkYRvq8pfx6WLhxim?= =?utf-8?q?hNm2kdc0dgpQgzAhkdkXsheqJ6q/JGAJyaf3tLtivDqzhnd3RHkLdQ00p8ysapAKK?= =?utf-8?q?nm6ZA4Qs8b7cUIoPGi8RfaSd9Wb7uVSAoNkUL1oztjOsXxZIMg8vTUY=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34814eb1-6519-4c82-5777-08dc3707ca90 X-MS-Exchange-CrossTenant-AuthSource: CO1PR01MB7370.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 20:16:18.3048 (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: j3lZcrY1Tir+/PGq4TPpXEqq6Rgga8KWB0qL9NdG1Gei0BSauQ1qtsFV04J2DG8qnNbWJpwb7DMIujd3eQO+yyVQCpg0vMFn+L7BceaZgB71qLzHjkGC7Tz32Ml+4fYT X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6629 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791995104778632933 X-GMAIL-MSGID: 1791995104778632933 Conditional compilation directives were added in some places to prevent the unnecessary inclusion of ARM specific RAS error handling routines in non-ARM platforms. Signed-off-by: Daniel Ferguson --- drivers/acpi/apei/ghes.c | 4 ++++ drivers/ras/ras.c | 2 ++ include/linux/ras.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index fe825a432c5b..5980f70ca0e4 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -526,6 +526,7 @@ static bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, return false; } +#if defined(CONFIG_ARM) || defined (CONFIG_ARM64) static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata, int sev, bool sync) { @@ -571,6 +572,7 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata, return queued; } +#endif /* * PCIe AER errors need to be sent to the AER driver for reporting and @@ -751,9 +753,11 @@ static bool ghes_do_proc(struct ghes *ghes, } else if (guid_equal(sec_type, &CPER_SEC_PCIE)) { ghes_handle_aer(gdata); +#if defined(CONFIG_ARM) || defined (CONFIG_ARM64) } else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) { queued = ghes_handle_arm_hw_error(gdata, sev, sync); +#endif } else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) { struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata); diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c index 95540ea8dd9d..355c0d78bd50 100644 --- a/drivers/ras/ras.c +++ b/drivers/ras/ras.c @@ -21,10 +21,12 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len); } +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) void log_arm_hw_error(struct cper_sec_proc_arm *err) { trace_arm_event(err); } +#endif static int __init ras_init(void) { diff --git a/include/linux/ras.h b/include/linux/ras.h index 1f4048bf2674..bded04044d33 100644 --- a/include/linux/ras.h +++ b/include/linux/ras.h @@ -24,15 +24,19 @@ int __init parse_cec_param(char *str); void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, const char *fru_text, const u8 sev, const u8 *err, const u32 len); +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) void log_arm_hw_error(struct cper_sec_proc_arm *err); +#endif #else static inline void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, const char *fru_text, const u8 sev, const u8 *err, const u32 len) { return; } +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) static inline void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; } #endif +#endif #endif /* __RAS_H__ */ From patchwork Mon Feb 26 20:15:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Ferguson X-Patchwork-Id: 206908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2319778dyb; Mon, 26 Feb 2024 12:35:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVzlbVNaKWvQzlgIsUOxkE/u85/Zvvasuda55oNXdANn6ljIk6sNN9MH2mVIVnd+olEg3PvXZeK7jU77LHRUi2pE0R4hQ== X-Google-Smtp-Source: AGHT+IHugXFCsbWh4bmuuVbV6EsPwnR6H9sl5qdYYMewoHPYvuHSSCjlYaMFVSXpJIgwlCExygcm X-Received: by 2002:a05:6e02:522:b0:363:bb5a:3329 with SMTP id h2-20020a056e02052200b00363bb5a3329mr8961607ils.1.1708979722111; Mon, 26 Feb 2024 12:35:22 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a9-20020a634d09000000b005dc6d16be5csi4178355pgb.439.2024.02.26.12.35.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 12:35:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82285-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=Q+7MLUsS; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-82285-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82285-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B3A7B24E28 for ; Mon, 26 Feb 2024 20:17:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F28B313173A; Mon, 26 Feb 2024 20:16:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="Q+7MLUsS" Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2094.outbound.protection.outlook.com [40.107.94.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BCCD130E3E; Mon, 26 Feb 2024 20:16:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.94 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708978589; cv=fail; b=qrroN635ETx6yhYtSf7z2Zi/IoMpXLSwXLQBdjE+dvZaXd1RYMncqeEVWDvDJwB5b3Zp57lDZD3cu2JE+R3hdpoT7IoG8DNr4UPrkrDEbTbA2dfucAMGJ7WZNZVxuEsesStBEW95UCbSIsAU/FATy2IWtSyRDdNSGiRU8OAlD/A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708978589; c=relaxed/simple; bh=O4tT15hQZqEmnMO1qud9rxu2FlM8XIIrLhInZ2/CdNA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Y113PR2MhLWrUc+8o9yEUrqBQWVHch7E0IXrGkytgCfYKBxg7dhSosXuYi4WSW9TEfibLU/wOe6Mn3orr6w1zicAltkgUEtczWqAZk2PXzCkSrfIGuqBfS+jOs95WQk0yfEkVDUypc7cRSgJafypvD+gkvTJ+UL+XKsPPIpjmw8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=Q+7MLUsS; arc=fail smtp.client-ip=40.107.94.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ag6QbwUun3iXibzl+udcXz9qT0QO8FKxRRfnGXfIXM6n1FOmECbQliAa2F7d2BoVS3QOyQj3QCihh2vNfu+8hCiOoKpbKpQ/5/ibqqP3PpZyiBSkRvvGyYXHrK+axeaBBShO5MVewti1pV0gKrEisk2xzQExCecsrTpC+bWcff4clvvWljzvjqMikrNtM+nFrsqWMNVzW9yAjL0gN2V/dlZtYO11Y9UrOH+0U37ztmTdklFUAKKc12TCrTegag9fjr/yEw0RVH5arFSvmOpkS/8UKNJSPA3/vjjaMjBPxnrv9/88pKGSU9OuUoshdtEyxtd99FuxnNi/ARAdKfyWpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=c+TaA0r2xgJJz7zagwym1yatxqvMpiIus63+CrSkTTQ=; b=jX0eHcIsYo8CdMz0BBbYCzc7APPgds8FkZpcuuLVyikhhapZP1psZ0KRIbs9gtLSyvAGWD8K6ZWP9eHpO7I2210eON77C+VW4kvQgw6w2lTh7xiLolCx4PheZuqSs8/kOCVXYLf4ivWVjAwS3N8VHNrHrqkvRjosfR+uJLFV3AzadHlE/19C5PrLqCDpXfWdkRT4rup3I1Pw+PoUR07n63I/drvYLt6pYrvCs+d+rBH1XI8gVrJUtAQ5kDcCnuFOTcE/A2FLpHbl1aZv6JVMq17J+8BOnT1HWH++Z1FQ4/fKX+uPo1vP+JWaGTtxr4ZhwLFM78tW1yEnHpYk3RQCLw== 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=c+TaA0r2xgJJz7zagwym1yatxqvMpiIus63+CrSkTTQ=; b=Q+7MLUsS544UxGJQUxGeJ/MEya+1NAiEPLQg7x1K/Af5dvz5DY04R5Z28tVE7G1RFB1+iuDeHLdAmJXLxth+N5yEbE7ZESkpXUmHLTe8qMJTYebNgXMS2P6HgNijr1mp++gQOtOlpU6Gbci+Eo6nVzr9ux+SE6GdbKW/xlCCyHQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from CO1PR01MB7370.prod.exchangelabs.com (2603:10b6:303:159::16) by CO1PR01MB6629.prod.exchangelabs.com (2603:10b6:303:d6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Mon, 26 Feb 2024 20:16:21 +0000 Received: from CO1PR01MB7370.prod.exchangelabs.com ([fe80::28bb:f135:bd95:a21d]) by CO1PR01MB7370.prod.exchangelabs.com ([fe80::28bb:f135:bd95:a21d%7]) with mapi id 15.20.7316.034; Mon, 26 Feb 2024 20:16:21 +0000 From: Daniel Ferguson Date: Mon, 26 Feb 2024 12:15:20 -0800 Subject: [PATCH v4 2/2] RAS: Report ARM processor information to userspace Message-Id: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-2-08e0f168fec1@os.amperecomputing.com> References: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-0-08e0f168fec1@os.amperecomputing.com> In-Reply-To: <20240226-b4-arm-ras-error-vendor-info-v4-rc3-v4-0-08e0f168fec1@os.amperecomputing.com> To: "Rafael J. Wysocki" , Len Brown , James Morse , Tony Luck , Borislav Petkov Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, Daniel Ferguson , Shengwei Luo , Jason Tian X-Mailer: b4 0.13.0 X-ClientProxiedBy: PH7PR17CA0037.namprd17.prod.outlook.com (2603:10b6:510:323::28) To CO1PR01MB7370.prod.exchangelabs.com (2603:10b6:303:159::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR01MB7370:EE_|CO1PR01MB6629:EE_ X-MS-Office365-Filtering-Correlation-Id: 5075147d-3440-4181-8cc4-08dc3707cc82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9sfwCsDgmRVMQFocvpc36v0xKNmzF/01OaaXPIQShMIAcwHsabojdKlDvgtP+llVAY/PKiDnPXSqrAj2tGdMcRiYboKjQMYgS1ZDkhjVION6JmLQqDgQW9rCuwyQMPQJ7r2qIj7MneOuIyxLGBz2FisHbSFjEICZIy5TwbmV4h8WY2Eik1ilEK04Cf5oC+7F7OYQgE8V/Rod/iMIlTbvxJbpVQyIXuOkxaFsYDdyYuTkd+40fPbIO/qW82pCv8hHAEL2g7xspa23z+Tut+MwfPYMw32xwi2KRuXKccWuttXGk2tPQTXR6fVEBQQ/vOw8N7/A9z6vcqaVEEJMp2LRoyZncLi8dSSWUJP7DXkjgD01mXyiAvckUB+nz6HisT3mtdiQmWUnZjm3xkBeP4kzmxH22JoCwTekJk8rSWkj9Ub3IK2jly8urjDNclfJM5L6acUSqVI/x2fQpDHcohT25S/I2gWiZZtAKphICgzEJhT+oICw6M2SYe7j4qgGFIAxbHkt4ieQ/6YfNyRmvW1gOmZQp6/z/ZjhR6Ufa7Wev4kaSsuV5esOStxWyKNMCtSeBXRskG5vPlk448HY0OI/QMGgTvG4gOY/9a8X0KhwEQ5Yng7aVqvy1YlnmLVNLraIy/tvD6knRzRjy8HrZgrApjPk+ODdLv8G2Nrwmjh5Q1Ue6V0r4qU4xgvILWPdaLsvPpvId+s8fDDrJj4XbP9WWBbD28ci7GJKe8sL9ohUTbY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR01MB7370.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ALz3Lov2ntyFRj12UOqhf7Evw7MC?= =?utf-8?q?Csx040jPUoCWm9YUSr2wc7Q0SXgs3p1GygxJ19p3BKe58j4f6vnI+eGsK0jjPKGLc?= =?utf-8?q?0QV6tpMmwoBjG8A2wuiR1GT8PFo1y8VvwZucnLWCJFLqFN/XjsT/7cnUIzUegomjt?= =?utf-8?q?jJyd2bkyXD2bO6GD9ozob8rRoD5sLm/AUW9ucWjRkFnFH8F2qlQcsfmb74r2fQOBF?= =?utf-8?q?/8YiDR7JvmvJwk3NqKke/q6djVbciYnyc4dmrutn80ZtU2/viH43Ajgy27nIpvgW8?= =?utf-8?q?DR3tByuyXooN79WOEdIZCBPsxJ/aMXQa3tCIZtXgMLwn2rJw2w17xTizrciTvz2iV?= =?utf-8?q?vJH8UhBVx3gZY8Pi+RVUxZ3+q9ZkJmnDSDGF+nNFCk4FMFduWpJoecvZPTP7iW3o2?= =?utf-8?q?lNTMWvub/u5xGSJ1gk6fDyWSkYGKtdDnOf6No33q0AJEElg4UP0+AAqtnlYMHxZqQ?= =?utf-8?q?00Lf1XRBdpCgc8Gf/YkV2Wi3ZQgNx5KICdwP+vWRXbkXH1fW6sxHd/7GD8OaC3rk+?= =?utf-8?q?K/1yw0bsLDH+IAvVA1h6gWlsUvKg0qzTD69H4054YDPVUSGJ/1bS32IMXupIofNi/?= =?utf-8?q?gHdRzWF2Fcpg9K5TbCKt+UBHv1eAl1y5Od87q5lVPyCv7T9wt0AzUq5zyBvaqfEhh?= =?utf-8?q?FnlyBkU/X+ZysJCj47GQ2gYusc1YU6+hQ5VioWNu/4a9eZa5RxygwnM4zper9BPuG?= =?utf-8?q?EhFC3rxYSVKuQijv58n1RhwY0AT8eOMBP5+ZbgiCaONVGn+j/ld8jtfbsAeM84Tmi?= =?utf-8?q?dSRDs9d228WlL7two26KC4GQfZRdq0eZf70SlErpEZfFuXSM5eDJDSrM69T6aYN/6?= =?utf-8?q?1WO0lMnBqTpRW+EcbPW70d+u1y0vB2x7acolQLyje6eXDJIaRCN4/pgml/zj34sbQ?= =?utf-8?q?cyiBo+5krRMwkRYHAQUtZ0kMWTkspZWdWylc2Elzt1n13lVH+mLpbHKJqavucj3eO?= =?utf-8?q?OMfziIUOZn7nkUFbeeElX1cbW5xJbKUjxq4IznODJfK1+DMWkaKIugPQslKyiTEca?= =?utf-8?q?Ms+x2TQvfl9RK9Zc4shBA20JX3R4lIvO/vbMlBC7sehmZo4+IyKS+KId0RxxVny9C?= =?utf-8?q?669//eJhMuPuwY55cWBzOCC4cyGaFA3D8vLJXpaB8VPf5QK2MeabEnJkmZ7Al6zyg?= =?utf-8?q?EM5bxCJeMA9dxa7o0+70nCxZp2SjI0Dm69wq1yAK+KmYhwSGlIvtmbLPBL1+YJFeV?= =?utf-8?q?KDNHpotbg6kayUIO54VWUX5kyjlEcqbOqsuwXDsHlR6QV2pP2WY+Ktcjxs9e6ZXL0?= =?utf-8?q?rRFV+XmdaeNaz2yXbbpTqj8fV+KCE/xfUUk2kMha/zlJKkjhSagwTrcM+OyInjtSL?= =?utf-8?q?7kyxg3Jo1Zz0gcyR6gfGvZclLQed02ers8LvJIfG3KFWlGrEEq9/RTcqdIYvAMZii?= =?utf-8?q?Zkg4iAb6RUlJ6IevG9QYYXAyYiFZu2oVzRGkORUhoQvbNhtbCV+Yjz9L4wSCkbxPf?= =?utf-8?q?TMK41Qq30u4Wub/05kFymu0Wx+wSTcWagqKn5eCGWKvqQda+5D/pdiXoryMKs62bS?= =?utf-8?q?XtVfz3mPc6HdSl4FtUhpjXqX2d5MXyoWq2mkyX+eaIQmS8YRX4/0A+0=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5075147d-3440-4181-8cc4-08dc3707cc82 X-MS-Exchange-CrossTenant-AuthSource: CO1PR01MB7370.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 20:16:21.7571 (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: aMniQCPlEmmnCTUWZyxf51GoZ1teLv/u7U+9NgmFN3Eqw63zBiTezscVZtuJ7vkS2QuUXbFZxOIaa71Zw1w5GnScuOpcrZnez0edcndq9TSRRlvcluyND1sLyGovO87a X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6629 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791995120915527587 X-GMAIL-MSGID: 1791995120915527587 From: Shengwei Luo The original arm_event trace code only traces out ARM processor error information data. It's not enough for user to take appropriate action. According to UEFI_2_9 specification chapter N2.4.4, the ARM processor error section includes several ARM processor error information, several ARM processor context information and several vendor specific error information structures. In addition to these info, there are error severity and cpu logical index about the event. Report all of these information to userspace via perf i/f. So that the user can do cpu core isolation according to error severity and other info. Signed-off-by: Shengwei Luo Signed-off-by: Jason Tian Signed-off-by: Daniel Ferguson --- drivers/acpi/apei/ghes.c | 3 +-- drivers/ras/ras.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- include/linux/ras.h | 15 +++++++++++++-- include/ras/ras_event.h | 48 +++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 11 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 5980f70ca0e4..8265d85801aa 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -536,9 +536,8 @@ static bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata, int sec_sev, i; char *p; - log_arm_hw_error(err); - sec_sev = ghes_severity(gdata->error_severity); + log_arm_hw_error(err, sec_sev); if (sev != GHES_SEV_RECOVERABLE || sec_sev != GHES_SEV_RECOVERABLE) return false; diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c index 355c0d78bd50..cfeedd66c607 100644 --- a/drivers/ras/ras.c +++ b/drivers/ras/ras.c @@ -22,9 +22,51 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, } #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) -void log_arm_hw_error(struct cper_sec_proc_arm *err) +void log_arm_hw_error(struct cper_sec_proc_arm *err, const u8 sev) { - trace_arm_event(err); + u32 pei_len; + u32 ctx_len = 0; + s32 vsei_len; + u8 *pei_err; + u8 *ctx_err; + u8 *ven_err_data; + struct cper_arm_err_info *err_info; + struct cper_arm_ctx_info *ctx_info; + int n, sz; + int cpu; + + pei_len = sizeof(struct cper_arm_err_info) * err->err_info_num; + pei_err = (u8 *)err + sizeof(struct cper_sec_proc_arm); + + err_info = (struct cper_arm_err_info *)(err + 1); + ctx_info = (struct cper_arm_ctx_info *)(err_info + err->err_info_num); + ctx_err = (u8 *)ctx_info; + for (n = 0; n < err->context_info_num; n++) { + sz = sizeof(struct cper_arm_ctx_info) + ctx_info->size; + ctx_info = (struct cper_arm_ctx_info *)((long)ctx_info + sz); + ctx_len += sz; + } + + vsei_len = err->section_length - (sizeof(struct cper_sec_proc_arm) + + pei_len + ctx_len); + if (vsei_len < 0) { + pr_warn(FW_BUG + "section length: %d\n", err->section_length); + pr_warn(FW_BUG + "section length is too small\n"); + pr_warn(FW_BUG + "firmware-generated error record is incorrect\n"); + vsei_len = 0; + } + ven_err_data = (u8 *)ctx_info; + + cpu = GET_LOGICAL_INDEX(err->mpidr); + /* when return value is invalid, set cpu index to -1 */ + if (cpu < 0) + cpu = -1; + + trace_arm_event(err, pei_err, pei_len, ctx_err, ctx_len, + ven_err_data, (u32)vsei_len, sev, cpu); } #endif diff --git a/include/linux/ras.h b/include/linux/ras.h index bded04044d33..fbb74ecde984 100644 --- a/include/linux/ras.h +++ b/include/linux/ras.h @@ -25,7 +25,7 @@ void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id, const char *fru_text, const u8 sev, const u8 *err, const u32 len); #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) -void log_arm_hw_error(struct cper_sec_proc_arm *err); +void log_arm_hw_error(struct cper_sec_proc_arm *err, const u8 sev); #endif #else static inline void @@ -35,8 +35,19 @@ log_non_standard_event(const guid_t *sec_type, { return; } #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) static inline void -log_arm_hw_error(struct cper_sec_proc_arm *err) { return; } +log_arm_hw_error(struct cper_sec_proc_arm *err, const u8 sev) { return; } #endif #endif +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) +#include +/* + * Include ARM specific SMP header which provides a function mapping mpidr to + * cpu logical index. + */ +#define GET_LOGICAL_INDEX(mpidr) get_logical_index(mpidr & MPIDR_HWID_BITMASK) +#else +#define GET_LOGICAL_INDEX(mpidr) -EINVAL +#endif /* CONFIG_ARM || CONFIG_ARM64 */ + #endif /* __RAS_H__ */ diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h index cbd3ddd7c33d..0dac67d1cad4 100644 --- a/include/ras/ras_event.h +++ b/include/ras/ras_event.h @@ -168,11 +168,24 @@ TRACE_EVENT(mc_event, * This event is generated when hardware detects an ARM processor error * has occurred. UEFI 2.6 spec section N.2.4.4. */ +#define APEIL "ARM Processor Err Info data len" +#define APEID "ARM Processor Err Info raw data" +#define APECIL "ARM Processor Err Context Info data len" +#define APECID "ARM Processor Err Context Info raw data" +#define VSEIL "Vendor Specific Err Info data len" +#define VSEID "Vendor Specific Err Info raw data" TRACE_EVENT(arm_event, - TP_PROTO(const struct cper_sec_proc_arm *proc), + TP_PROTO(const struct cper_sec_proc_arm *proc, const u8 *pei_err, + const u32 pei_len, + const u8 *ctx_err, + const u32 ctx_len, + const u8 *oem, + const u32 oem_len, + u8 sev, + int cpu), - TP_ARGS(proc), + TP_ARGS(proc, pei_err, pei_len, ctx_err, ctx_len, oem, oem_len, sev, cpu), TP_STRUCT__entry( __field(u64, mpidr) @@ -180,6 +193,14 @@ TRACE_EVENT(arm_event, __field(u32, running_state) __field(u32, psci_state) __field(u8, affinity) + __field(u32, pei_len) + __dynamic_array(u8, buf, pei_len) + __field(u32, ctx_len) + __dynamic_array(u8, buf1, ctx_len) + __field(u32, oem_len) + __dynamic_array(u8, buf2, oem_len) + __field(u8, sev) + __field(int, cpu) ), TP_fast_assign( @@ -199,12 +220,29 @@ TRACE_EVENT(arm_event, __entry->running_state = ~0; __entry->psci_state = ~0; } + __entry->pei_len = pei_len; + memcpy(__get_dynamic_array(buf), pei_err, pei_len); + __entry->ctx_len = ctx_len; + memcpy(__get_dynamic_array(buf1), ctx_err, ctx_len); + __entry->oem_len = oem_len; + memcpy(__get_dynamic_array(buf2), oem, oem_len); + __entry->sev = sev; + __entry->cpu = cpu; ), - TP_printk("affinity level: %d; MPIDR: %016llx; MIDR: %016llx; " - "running state: %d; PSCI state: %d", + TP_printk("cpu: %d; error: %d; affinity level: %d; MPIDR: %016llx; MIDR: %016llx; " + "running state: %d; PSCI state: %d; " + "%s: %d; %s: %s; %s: %d; %s: %s; %s: %d; %s: %s", + __entry->cpu, + __entry->sev, __entry->affinity, __entry->mpidr, __entry->midr, - __entry->running_state, __entry->psci_state) + __entry->running_state, __entry->psci_state, + APEIL, __entry->pei_len, APEID, + __print_hex(__get_dynamic_array(buf), __entry->pei_len), + APECIL, __entry->ctx_len, APECID, + __print_hex(__get_dynamic_array(buf1), __entry->ctx_len), + VSEIL, __entry->oem_len, VSEID, + __print_hex(__get_dynamic_array(buf2), __entry->oem_len)) ); /*