From patchwork Thu May 21 19:22:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Grimm X-Patchwork-Id: 1295594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (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 49Sff23wdHz9sSW for ; Fri, 22 May 2020 05:22:50 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (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 49Sff22zclzDqp5 for ; Fri, 22 May 2020 05:22:50 +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=mx0a-001b2d01.pphosted.com; envelope-from=grimm@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 49Sfdh3fkwzDqVH for ; Fri, 22 May 2020 05:22:32 +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 04LIY0LN080795; Thu, 21 May 2020 15:22:22 -0400 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 314ua5urgy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 May 2020 15:22:21 -0400 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 04LJKFM8009865; Thu, 21 May 2020 19:22:21 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04wdc.us.ibm.com with ESMTP id 313wh415be-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 May 2020 19:22:21 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 04LJMJHC27459944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 May 2020 19:22:19 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0107F6E058; Thu, 21 May 2020 19:22:20 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7B83B6E04E; Thu, 21 May 2020 19:22:19 +0000 (GMT) Received: from alain.ibm.com (unknown [9.80.214.168]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Thu, 21 May 2020 19:22:19 +0000 (GMT) From: Ryan Grimm To: skiboot@lists.ozlabs.org Date: Thu, 21 May 2020 15:22:01 -0400 Message-Id: <20200521192201.1855-2-grimm@linux.ibm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200521192201.1855-1-grimm@linux.ibm.com> References: <20200521192201.1855-1-grimm@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-21_11:2020-05-21, 2020-05-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 phishscore=0 cotscore=-2147483648 suspectscore=3 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2005210131 Subject: [Skiboot] [PATCH 1/1] buddy: Fix warnings when undefining BUDDY_DEBUG 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: Ryan Grimm Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" In simulation, hundreds of millions of cycles are chewed up in this code path: PC: 0x0000000030033450 -> <.bitmap_tst_bit>+0x18 LR: 0x000000003003347c -> <.buddy_check_alloc>+0x14 0x0000000031c13b30 -> <_ebss>+0x1803b30 0x000000003003351c -> <.buddy_check_alloc_down>+0x4c 0x00000000300339c4 -> <.buddy_free>+0x7c 0x0000000030033be8 -> <.buddy_create>+0xcc 0x0000000030089bbc -> <.xive_init>+0xf0 0x00000000300157cc -> <.main_cpu_entry>+0x8a0 0x000000003000275c -> +0x1bc Undefining BUDDY_DEBUG saves 30+ minutes of wall clock time, so fix the "warning: unused parameter" messages when compiling. Signed-off-by: Ryan Grimm Acked-by: Cédric Le Goater --- core/buddy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/buddy.c b/core/buddy.c index 1f433dd6..b36e407d 100644 --- a/core/buddy.c +++ b/core/buddy.c @@ -70,8 +70,8 @@ static void buddy_check_alloc_down(struct buddy *b, unsigned int node) } } #else -static inline void buddy_check_alloc(struct buddy *b, unsigned int node) {} -static inline void buddy_check_alloc_down(struct buddy *b, unsigned int node) {} +static inline void buddy_check_alloc(struct buddy *b __unused, unsigned int node __unused) {} +static inline void buddy_check_alloc_down(struct buddy *b __unused, unsigned int node __unused) {} #endif int buddy_alloc(struct buddy *b, unsigned int order)