From patchwork Thu Nov 29 04:28:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005047 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354cZ6pvgz9s47 for ; Thu, 29 Nov 2018 15:42:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354cZ5PHczDr3Z for ; Thu, 29 Nov 2018 15:42:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-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 4354K80nSnzDr3B for ; Thu, 29 Nov 2018 15:28:43 +1100 (AEDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4Oa4l017061 for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p24kksbyc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:40 -0000 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:38 -0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sbxr27394292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:37 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78D61BE054 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41DB9BE04F for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id B4D184EC5FF; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:29 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0016-0000-0000-0000095C8DFA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583712; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0017-0000-0000-00004139EC5A Message-Id: <20181129042833.27376-5-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 4/8] opal_trace_entry: Move ifdef around to shut up static analysis 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: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Again, this makes things look slightly different so I don't keep seeing the static analysis warning. Signed-off-by: Stewart Smith --- core/opal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/opal.c b/core/opal.c index 3a8ea30b79f0..ba30c309ca58 100644 --- a/core/opal.c +++ b/core/opal.c @@ -93,9 +93,9 @@ long opal_bad_token(uint64_t token) return OPAL_PARAMETER; } +#ifdef OPAL_TRACE_ENTRY static void opal_trace_entry(struct stack_frame *eframe __unused) { -#ifdef OPAL_TRACE_ENTRY union trace t; unsigned nargs, i; @@ -111,8 +111,8 @@ static void opal_trace_entry(struct stack_frame *eframe __unused) t.opal.r3_to_11[i] = cpu_to_be64(eframe->gpr[3+i]); trace_add(&t, TRACE_OPAL, offsetof(struct trace_opal, r3_to_11[nargs])); -#endif } +#endif /* * opal_quiesce_state is used as a lock. Don't use an actual lock to avoid @@ -138,7 +138,9 @@ int64_t opal_entry_check(struct stack_frame *eframe) abort(); } +#ifdef OPAL_TRACE_ENTRY opal_trace_entry(eframe); +#endif if (!opal_check_token(token)) return opal_bad_token(token);