Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp206180lqp; Wed, 20 Mar 2024 20:09:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaQ4IAE8R32lRo0R8q10yk50YA14Ry9HHdlvqtuHbWHXUbvZt3xjXBGzG/6srXtr/oFSo0P6yKeVTVELEGlhI5nk2T/3+rjt1jOXnv6A== X-Google-Smtp-Source: AGHT+IEVomzy2Warx0LtZyl6R8kTIyu33pCZWZi9bOy5ckU6JqVh7uaELfr8nVMO3WevEN6rqTbX X-Received: by 2002:a05:6358:a083:b0:17c:2168:d4a0 with SMTP id u3-20020a056358a08300b0017c2168d4a0mr8458391rwn.19.1710990565193; Wed, 20 Mar 2024 20:09:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710990565; cv=pass; d=google.com; s=arc-20160816; b=kkbt59Au3wxfosTwo9Kokkx8fUuy8EkG45i7teu01THse4X3j8vqR2vNEwiAmrl4I0 BEsSOSkScPAcau0TN23zm6TWff4bRcQlP/yc/qjI9Sq23nTeUAhLlme7H/xNE4gxXuDz uYOblhFAZhU6tDCosuPE8G4dlRBKHyADN/LvKEEpu7yXDYPkoUB0B/eBHXLjeFUjGf7O 9Wjaygcr0Dg6hhx8/WYjWjU8Puk5+a8ndWX4DcZLdSMj4TH0veX6YH6RJV2q3vtfpiMa cDqoJ7+jt3DdcjmdXxClTkyZwpeKcc4QKebrdHpVBgZi/qFCZ1kqy6KXQ0taat4MzUam /WWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=anz3MwjVTqaEAr814YVWwtLwOjciPBCCWi+hggJe6sk=; fh=5KRHkOwn47ouy8uPUbpkcSbnzQaGZVkTI4spG3d0Z3U=; b=VCfR1OARku7KNQr5riWzudbv1D/lsivprwXgYPgv24B7X7Im8LVFErJ2VFMivyQmcC bf2W+60NQkehVdcS5L5ufkaFzExT+2AUNGIIThxEzc6PlYZ1J7pzRXseBaW7lDfUhDqL MSlOB+KiJWAtUaZGVACZrkTBVW7e3fp6SV6pHJapnJXQl+uj+jUn3WX7JyIcB5+0Sv0d pv8oEtR27LHJ17YY2snii966sRTFll/Nunc1poqjp5npkyR2ltuqgxe0Fiyo3rfUwxfc LfznTUjiss5o0wKKypNhShxAOlENS6xkeO9WxhEl1FRwdogmLGduFi496NcnL1KNyo3Z 2Uug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=v72j28c+; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-109612-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d7-20020a63d707000000b005c688ef7549si13884313pgg.98.2024.03.20.20.09.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 20:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109612-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=v72j28c+; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-109612-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109612-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B8D8F283209 for ; Thu, 21 Mar 2024 03:09:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C9E079C3; Thu, 21 Mar 2024 03:09:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="v72j28c+" Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 8545628E7; Thu, 21 Mar 2024 03:09:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710990556; cv=none; b=UsgNtos1jk/z/faKwhG1N86FCX0s0if/afOD0prMsBqvngVL0LVKG3K3jz4YCpVLgOwQ/84mI2rP0d9jzLuObaJw+kSBIeC4NJ5Tn1qjNg6J8Pghl54NLnAz7/yG0zMibBC8F6nsVM2YGBlkRJlR4zxQYXPrfxCaVlcWE8JfyEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710990556; c=relaxed/simple; bh=mzfiid32YSbmqYcxux49boWhPKNOTxWoErBl3AzifI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k6d6GN3k+bpXl6PKFg60MQBNZQ/RZwWN3X5SLHdYqvY8Y33hTr0+eW6yVMeVqeYXn+pHxHaEku5KTfrCNk7m6oxIB2JkI0U3hK4or0cAAsqCLnt4I1Jzn/npLn1YNxGqgRqIIsUzM2SNiHS+G0L+tuzKBeVf5QCA9TGgm3uIf00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=v72j28c+; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1710990550; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=anz3MwjVTqaEAr814YVWwtLwOjciPBCCWi+hggJe6sk=; b=v72j28c+SLVntuQ1mxreusoisXGja4xK3fHtJeth4NWhkc39flgyKltukHzLsIXB31S7ZsIQHblvta/lrmvuImTfFykh3au0fN8UZngsuivkl2fclXXsgD7P918b6ISTMqWeJ62drOR5Itv0/9O0YnvGKpTnyfEadSuj1gXeGlw= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=tianruidong@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0W2zEwDe_1710989607; Received: from localhost(mailfrom:tianruidong@linux.alibaba.com fp:SMTPD_---0W2zEwDe_1710989607) by smtp.aliyun-inc.com; Thu, 21 Mar 2024 10:53:28 +0800 From: Ruidong Tian To: catalin.marinas@arm.com, will@kernel.org, lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com, xueshuai@linux.alibaba.com, baolin.wang@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, rafael@kernel.org, lenb@kernel.org, tony.luck@intel.com, bp@alien8.de, linux-edac@vger.kernel.org Cc: tianruidond@linux.alibaba.com, Tyler Baicar , Ruidong Tian Subject: [PATCH v2 2/2] trace, ras: add ARM RAS extension trace event Date: Thu, 21 Mar 2024 10:53:17 +0800 Message-Id: <20240321025317.114621-3-tianruidong@linux.alibaba.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20240321025317.114621-1-tianruidong@linux.alibaba.com> References: <20240321025317.114621-1-tianruidong@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Tyler Baicar Add a trace event for hardware errors reported by the ARMv8 RAS extension registers. Signed-off-by: Tyler Baicar Signed-off-by: Ruidong Tian --- drivers/acpi/arm64/aest.c | 5 ++++ include/ras/ras_event.h | 55 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/drivers/acpi/arm64/aest.c b/drivers/acpi/arm64/aest.c index ab17aa5f5997..0cfe7fb9d4b9 100644 --- a/drivers/acpi/arm64/aest.c +++ b/drivers/acpi/arm64/aest.c @@ -15,6 +15,8 @@ #include #include +#include + #undef pr_fmt #define pr_fmt(fmt) "ACPI AEST: " fmt @@ -153,6 +155,9 @@ static void aest_print(struct aest_node_llist *lnode) pr_err("%s ERR%uMISC2: 0x%llx\n", pfx_seq, index, regs->err_misc[2]); pr_err("%s ERR%uMISC3: 0x%llx\n", pfx_seq, index, regs->err_misc[3]); } + + trace_arm_ras_ext_event(lnode->type, lnode->id0, lnode->id1, index, + lnode->regs); } static void aest_handle_memory_failure(struct aest_node_llist *lnode) diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h index cbd3ddd7c33d..6003cab65ae4 100644 --- a/include/ras/ras_event.h +++ b/include/ras/ras_event.h @@ -338,6 +338,61 @@ TRACE_EVENT(aer_event, "Not available") ); +/* + * ARM RAS Extension Events Report + * + * This event is generated when an error reported by the ARM RAS extension + * hardware is detected. + */ + +#ifdef CONFIG_ARM64_RAS_EXTN +#include +TRACE_EVENT(arm_ras_ext_event, + + TP_PROTO(u8 type, u32 id0, u32 id1, u32 index, struct ras_ext_regs *regs), + + TP_ARGS(type, id0, id1, index, regs), + + TP_STRUCT__entry( + __field(u8, type) + __field(u32, id0) + __field(u32, id1) + __field(u32, index) + __field(u64, err_fr) + __field(u64, err_ctlr) + __field(u64, err_status) + __field(u64, err_addr) + __field(u64, err_misc0) + __field(u64, err_misc1) + __field(u64, err_misc2) + __field(u64, err_misc3) + ), + + TP_fast_assign( + __entry->type = type; + __entry->id0 = id0; + __entry->id1 = id1; + __entry->index = index; + __entry->err_fr = regs->err_fr; + __entry->err_ctlr = regs->err_ctlr; + __entry->err_status = regs->err_status; + __entry->err_addr = regs->err_addr; + __entry->err_misc0 = regs->err_misc[0]; + __entry->err_misc1 = regs->err_misc[1]; + __entry->err_misc2 = regs->err_misc[2]; + __entry->err_misc3 = regs->err_misc[3]; + ), + + TP_printk("type: %d; id0: %d; id1: %d; index: %d; ERR_FR: %llx; ERR_CTLR: %llx; " + "ERR_STATUS: %llx; ERR_ADDR: %llx; ERR_MISC0: %llx; ERR_MISC1: %llx; " + "ERR_MISC2: %llx; ERR_MISC3: %llx", + __entry->type, __entry->id0, __entry->id1, __entry->index, __entry->err_fr, + __entry->err_ctlr, __entry->err_status, __entry->err_addr, + __entry->err_misc0, __entry->err_misc1, __entry->err_misc2, + __entry->err_misc3) +); +#endif + /* * memory-failure recovery action result event * -- 2.33.1