Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6525814rwl; Tue, 4 Apr 2023 14:18:19 -0700 (PDT) X-Google-Smtp-Source: AKy350Y5tJcFlctgBdaBfEpwKbqVlC9NhRknLkZRT9/WTVyH0/u4THpg7o7XoUbSnjrxmsEikSKq X-Received: by 2002:a17:90b:1d83:b0:234:b8cb:512b with SMTP id pf3-20020a17090b1d8300b00234b8cb512bmr4058282pjb.30.1680643099233; Tue, 04 Apr 2023 14:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680643099; cv=none; d=google.com; s=arc-20160816; b=jogwgqXR68CrSEHrDa3zsFY/4gmCFYbG3vzXRVvBupABWU52xqukQPIcl8vSlAI2qb nDVbJVNEgj0ZEwanE5lZiOXKUqScE6MtyD2yl5x/SSBjjCWOw7YBjv9jdeCk8b2EfIke YVm4unvriEyPhoXMzul7mhLhS7I1nU+7kZnVE5LeBY9E1JBoVQiNiHHbEcBtuqSf9OUu rEOERHnty9e3oAxNFaraL6O8F+jWb+4ZMn+sRYGcEvsxK1idcp0y7lRkDrfXNSXdWRlV XPLHXmy/6nMTFvJawugAATZ3EvPcnIIEx+h+jUDelIp+kgtdn5tJ+O/f1r35Fr7chYIE FQLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UMdJ6dPRWg9qYBO+924mw4Sp9YYoC2nRG2nYkjyua60=; b=lVGsxzRY1iENjyv/+PZhXpG9pIWA0XauI00Y4ZBOZSI6OOF+KlGux0BxsyQQ5mYp4u e88L5yiX3VYxmRS8Q7XUuAtnkyErpPLB5XoIounx6GXoDlrIW0b6R5NzkXcQSivhoxbF YB1Rb7AZelKWL2tyed8BpYOcyHrcCFF3PI8pW6rzV1dKYXqWfKnwf7Iwn/8lf9STiY/s arwv1zk4uuQXLO6tErVYLZ3r5D7b/FJE7Maob2qimwbcPLUqG9NeGy5MQbCLuWzGJQBh KUTnSvMCli+Ka3TNz679HAkjISRoJ3/farZsXVwiGtkaR47KT1+7Cqs/du9dKpwJXIfo 9CzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=XSbu14P2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a6552c7000000b0050fa6fbde46si11318565pgp.492.2023.04.04.14.18.07; Tue, 04 Apr 2023 14:18:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=XSbu14P2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hpe.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbjDDVPf (ORCPT + 99 others); Tue, 4 Apr 2023 17:15:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236433AbjDDVPM (ORCPT ); Tue, 4 Apr 2023 17:15:12 -0400 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F14271C for ; Tue, 4 Apr 2023 14:15:08 -0700 (PDT) Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 334KJb18015829; Tue, 4 Apr 2023 21:14:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pps0720; bh=UMdJ6dPRWg9qYBO+924mw4Sp9YYoC2nRG2nYkjyua60=; b=XSbu14P2xG43u797qh0amJxqTX8sjjBUvHNjC2XRvgdAF95ozsMDjM0s8loSVINchcOE 1yG+l+IIPQRUljfhzyboBOmdBp2AIIcRBibk34SEhsqUIwbwMlfaQsSwYRZw/NpsibcQ PoAGnawKC3FEe1ZdxjHMnTrSmWBbR/fsqrKBMcj6DQWkRBThxK/Tei/6yrsVjF2NV6xy EvkolNle675QNp+eilcF/akNlJmGwLjSBhJA9w6OdRmgmnaJ3rqg2YbMiQA3MuTZ9pbX 3YaUP4X9kCHUOcIYsOV+AsP6GrjulMTUIVV08bQxKv8Zr8kjCad4FHiFf+JvRK47S/MC 3A== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3prtu48b4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 21:14:35 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14878.it.hpe.com (Postfix) with ESMTPS id B1DC913068; Tue, 4 Apr 2023 21:14:34 +0000 (UTC) Received: from dog.eag.rdlabs.hpecorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id 879FE80D086; Tue, 4 Apr 2023 21:14:34 +0000 (UTC) Received: by dog.eag.rdlabs.hpecorp.net (Postfix, from userid 200934) id 0CFB93031304C; Tue, 4 Apr 2023 16:14:32 -0500 (CDT) From: Steve Wahl To: Steve Wahl , Dimitri Sivanich , Russ Anderson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH v5 7/8] x86/platform/uv: Remove remaining BUG_ON() and BUG() calls Date: Tue, 4 Apr 2023 16:14:30 -0500 Message-Id: <20230404211431.776248-8-steve.wahl@hpe.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20230404211431.776248-1-steve.wahl@hpe.com> References: <20230404211431.776248-1-steve.wahl@hpe.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: qSTL_c6uv6A9z1-DxC6FKpt0nqkcKY_k X-Proofpoint-ORIG-GUID: qSTL_c6uv6A9z1-DxC6FKpt0nqkcKY_k X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-04_12,2023-04-04_05,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040193 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace BUG and BUG_ON with WARN_ON_ONCE and carry on as best as we can. Signed-off-by: Steve Wahl --- arch/x86/kernel/apic/x2apic_uv_x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 10d3bdf874a0..1836330ff7b3 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -617,7 +617,8 @@ static __init void build_uv_gr_table(void) bytes = _gr_table_len * sizeof(struct uv_gam_range_s); grt = kzalloc(bytes, GFP_KERNEL); - BUG_ON(!grt); + if (WARN_ON_ONCE(!grt)) + return; _gr_table = grt; for (; gre->type != UV_GAM_RANGE_TYPE_UNUSED; gre++) { @@ -1548,7 +1549,8 @@ static void __init build_socket_tables(void) return; } pr_err("UV: Error: UVsystab address translations not available!\n"); - BUG(); + WARN_ON_ONCE(!gre); + return; } numn = num_possible_nodes(); -- 2.26.2