From patchwork Wed Jul 29 02:56:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mahesh J Salgaonkar X-Patchwork-Id: 1338111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BGdVk4tdlz9sSd for ; Wed, 29 Jul 2020 12:57:02 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BGdVk3wzXzDqxg for ; Wed, 29 Jul 2020 12:57:02 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=mahesh@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BGdVY4F2TzDqrT for ; Wed, 29 Jul 2020 12:56:52 +1000 (AEST) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06T2VseC187022 for ; Tue, 28 Jul 2020 22:56:50 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32j7sy2wfw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Jul 2020 22:56:50 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06T2uh1N067656 for ; Tue, 28 Jul 2020 22:56:50 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 32j7sy2wfh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Jul 2020 22:56:50 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06T2tIAb024064; Wed, 29 Jul 2020 02:56:48 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 32gcy4mg94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Jul 2020 02:56:48 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06T2ujEO21037462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Jul 2020 02:56:45 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C293C11C04A; Wed, 29 Jul 2020 02:56:45 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2BE7611C054; Wed, 29 Jul 2020 02:56:45 +0000 (GMT) Received: from [192.168.122.1] (unknown [9.85.72.15]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 Jul 2020 02:56:44 +0000 (GMT) From: Mahesh Salgaonkar To: skiboot list Date: Wed, 29 Jul 2020 08:26:43 +0530 Message-ID: <159599140359.66951.8000579209303137333.stgit@jupiter> In-Reply-To: <159599130727.66951.17066036151753895792.stgit@jupiter> References: <159599130727.66951.17066036151753895792.stgit@jupiter> User-Agent: StGit/0.21 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-29_01:2020-07-28, 2020-07-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 clxscore=1015 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007290013 Subject: [Skiboot] [PATCH 1/5] opal/errorlog: Allow generation of Serviceable attention events X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasant Hegde Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Mahesh Salgaonkar Add support to mark error log event as Serviceable/Customer attention events. Signed-off-by: Mahesh Salgaonkar --- core/errorlog.c | 5 +++++ core/pel.c | 3 +++ include/errorlog.h | 2 ++ include/pel.h | 1 + 4 files changed, 11 insertions(+) diff --git a/core/errorlog.c b/core/errorlog.c index f64ac3f23..2f7bcce19 100644 --- a/core/errorlog.c +++ b/core/errorlog.c @@ -73,6 +73,11 @@ struct errorlog *opal_elog_create(struct opal_err_info *e_info, uint32_t tag) return buf; } +void log_mark_serviceable(struct errorlog *buf) +{ + buf->service_req = true; +} + /* Add a new user data section to an existing error log */ void log_add_section(struct errorlog *buf, uint32_t tag) { diff --git a/core/pel.c b/core/pel.c index ec13e5590..4b2656346 100644 --- a/core/pel.c +++ b/core/pel.c @@ -160,6 +160,9 @@ static void create_user_header_section(struct errorlog *elog_data, else usrhdr->action_flags = cpu_to_be16(ERRL_ACTION_NONE); + if (elog_data->service_req) + usrhdr->action_flags |= ERRL_ACTION_SERVICE; + *pel_offset += USER_HEADER_SECTION_SIZE; } diff --git a/include/errorlog.h b/include/errorlog.h index a443d3681..74fe8b1fd 100644 --- a/include/errorlog.h +++ b/include/errorlog.h @@ -124,6 +124,7 @@ struct errorlog { uint32_t plid; uint32_t log_size; uint64_t elog_timeout; + bool service_req; char user_data_dump[OPAL_LOG_MAX_DUMP]; struct list_node link; @@ -350,6 +351,7 @@ void log_append_data(struct errorlog *buf, unsigned char *data, uint16_t size); void log_append_msg(struct errorlog *buf, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); void log_commit(struct errorlog *elog); +void log_mark_serviceable(struct errorlog *buf); /* Called by the backend after an error has been logged by the * backend. If the error could not be logged successfully success is diff --git a/include/pel.h b/include/pel.h index a0df7cc3c..252d27e2e 100644 --- a/include/pel.h +++ b/include/pel.h @@ -38,6 +38,7 @@ /* Error log reporting action */ #define ERRL_ACTION_REPORT 0x2000 +#define ERRL_ACTION_SERVICE 0x8000 #define ERRL_ACTION_NONE 0x0000 enum elogSectionId {