From patchwork Wed Oct 7 12:08:53 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: 1377974 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 4C5tSN5Vt3z9sSG for ; Wed, 7 Oct 2020 23:09:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=I3bIF+5Q; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C5tSN3bVhzDqPk for ; Wed, 7 Oct 2020 23:09:56 +1100 (AEDT) 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.156.1; helo=mx0a-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 Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=I3bIF+5Q; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 4C5tRN1Zt0zDqNb for ; Wed, 7 Oct 2020 23:09:04 +1100 (AEDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 097C1vTT152112 for ; Wed, 7 Oct 2020 08:09:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=PyR5Ezdf1G5Kt0mL7gsHDhbc6cUFZNx09bDB2jOh98A=; b=I3bIF+5QQEe0AWdv4oGVQWw3BALlTun/cLVe5vskHLd0ykOpjfUwD+mnAFps0eUJzJEA fAZ05qStd8+zfxf34xAiD6fZVc1P15b2oP574g6SEIGOOD6QeH8CHSBJjCMOTehPCGXm Uiw0zyKs/LzAKILk8Cg0lRhuBG15o7h3YRi0yQVb7PbQIy0K7Jy8p4arFQsj+UhQLdkB P2xLjyyYF/HIxYTgEcCyaFUiUlsDIhhDPotuwjdt4VKRF8lS+Gypa+AbZe3qK9wx9cCK xgCqWHTTRG2qeHvhJJuAXCLC9+LEzJRsO4bhkUEp+XLaG2F5lajpbsOeOWCatqdw6SAN Ew== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 341c5g2udh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Oct 2020 08:09:01 -0400 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 097C3CeM158791 for ; Wed, 7 Oct 2020 08:09:01 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 341c5g2ucm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Oct 2020 08:09:01 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 097C7NKU012477; Wed, 7 Oct 2020 12:08:58 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma01fra.de.ibm.com with ESMTP id 33xgx7t7d0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Oct 2020 12:08:58 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 097C8tXJ15597858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Oct 2020 12:08:55 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80EFBA4062; Wed, 7 Oct 2020 12:08:55 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E050FA405B; Wed, 7 Oct 2020 12:08:54 +0000 (GMT) Received: from [192.168.0.63] (unknown [9.199.48.78]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 7 Oct 2020 12:08:54 +0000 (GMT) From: Mahesh Salgaonkar To: skiboot list Date: Wed, 07 Oct 2020 17:38:53 +0530 Message-ID: <160207253385.2097386.16314913870437323219.stgit@jupiter> In-Reply-To: <160207247879.2097386.9393389763183654717.stgit@jupiter> References: <160207247879.2097386.9393389763183654717.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-10-07_08:2020-10-06, 2020-10-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010070079 Subject: [Skiboot] [PATCH v2 01/10] 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 {