From patchwork Wed May 31 22:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 101610 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3218357vqr; Wed, 31 May 2023 15:32:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qRbcR+XEuc/VZaxZFYzjsyc2VsLhE6iwaCL4guXoPv0B7TKdaHrD+ozib8kNLPVMagknv X-Received: by 2002:a17:902:c411:b0:1a6:7b71:e64b with SMTP id k17-20020a170902c41100b001a67b71e64bmr18542357plk.15.1685572366352; Wed, 31 May 2023 15:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685572366; cv=none; d=google.com; s=arc-20160816; b=XQD298jtpc8EJDiD8c36kCVx1Sz++HkXrxIZI3Pjjf/VznWi2+YxOvEUVpdCsR4exu sZbUtcTsSPgDHF3G0C/TBJL1Z3rwesrOGiJ++eogaQJFP99QbuPnxSvTufdv6mUsaP89 DAS6PyiIvWf74nRSEQXVlo+f3nZqCP6IC/AanW2IsFB8VxjZwFDfWYG6SA6gdY9x4CVZ AA2RHtZTQ9QHmhAh2ixGIpq4Ki/S1C9iMdXDHMiBRRycfePQi+v+x720hodG3L9GRmh6 AWhXrBbFMm6ACUPuQOHw1cd0FxDYOjtgQmqGsqxzpHlBftR/jb+/FAh9bGB7aCwdnoz4 8ZOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=N475Qv8/OwV8b+hkVUDlDliQENptv3wl8TaAvhVjmG4=; b=a+Q4OoTIe1DFAtHn6xm87N2CWf+X8mOcRi2QboBzSiZSyJ+V0aVrtslmKJKt7Xx5P/ U80cSBTp5YadZZsh4480op+jVRVBGl3McMmzUNOHf2e76/xJonQm6hkCWXeUT5Nc6H51 Sf5MbdMllRmoL7pILn+5spi6bG0LESi0+osf7hYy587hom7sSsj9QNlVFJTGMlP66lZf I+kcv/C/8Ea0fM3yIKhuoDRGHHhCqcQ8rzMS10fc6ZowpwGawav77nZLnqGGzORY1pC/ Pb3nu6j7xrqTILgX8NxC/hOI90wq+jG1UBOBDrlY1+HQM9gyEJuZZmpogZ89JuM3f8Bw 6rQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JUmVl0Vi; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="3v/WlxDY"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jj5-20020a170903048500b001ae57456ab4si1215219plb.6.2023.05.31.15.32.34; Wed, 31 May 2023 15:32:46 -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=@linutronix.de header.s=2020 header.b=JUmVl0Vi; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="3v/WlxDY"; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230504AbjEaWON (ORCPT + 99 others); Wed, 31 May 2023 18:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbjEaWOL (ORCPT ); Wed, 31 May 2023 18:14:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21C6D1A1; Wed, 31 May 2023 15:13:52 -0700 (PDT) Date: Wed, 31 May 2023 22:13:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685571216; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N475Qv8/OwV8b+hkVUDlDliQENptv3wl8TaAvhVjmG4=; b=JUmVl0ViVE7nTnrkI4N9W4f7XjuaOIysk3l7fMMrV3P0CUnGBs9krSc0dXEd8+xbJbsKlR VpINFQ9qcEMR9PZMfL+/GJUaspYAtIHe/a2f6YpU/PGDrkWlcLOzvbLau4Jj/6m9xw6g+n 2gICNArUcyrw0k8cQSKybaEnMnJYt853o4KuzzDAn1RDwZd7sVPDTJ4BKzwqOK5ufavHrp 7dCzl5wfFEHRSgiW5/LAUNWMPQ/KJLbUoi9S0oEjw41IaUMxYSKwV3Y7Ky5kFCGJ/LbMaa 6owEmNJ1n3/slxKBc+aZIQTIYFazqGEmSif61BPTbgwsHrQ+ys+WwaPKi3IdWQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685571216; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N475Qv8/OwV8b+hkVUDlDliQENptv3wl8TaAvhVjmG4=; b=3v/WlxDYkja4ouB7s+C3siaSpElh6mEtj5mHtIYwStT8E2QfSKdGRppcUhp8YmSoxQA7NU 8zPrwuvarXQXvoCQ== From: "tip-bot2 for Steve Wahl" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Remove remaining BUG_ON() and BUG() calls Cc: Steve Wahl , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <168557121537.404.10874117815747545344.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767450729087655410?= X-GMAIL-MSGID: =?utf-8?q?1767450729087655410?= The following commit has been merged into the x86/platform branch of tip: Commit-ID: 89827568a82d5856f3c8d329d3c2bc0f47385eb9 Gitweb: https://git.kernel.org/tip/89827568a82d5856f3c8d329d3c2bc0f47385eb9 Author: Steve Wahl AuthorDate: Fri, 19 May 2023 14:07:51 -05:00 Committer: Dave Hansen CommitterDate: Wed, 31 May 2023 09:35:00 -07:00 x86/platform/uv: Remove remaining BUG_ON() and BUG() calls Replace BUG and BUG_ON with WARN_ON_ONCE and carry on as best as we can. Signed-off-by: Steve Wahl Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20230519190752.3297140-8-steve.wahl%40hpe.com --- 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 10d3bdf..1836330 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();