summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wahl <steve.wahl@hpe.com>2023-05-19 14:07:51 -0500
committerDave Hansen <dave.hansen@linux.intel.com>2023-05-31 09:35:00 -0700
commit89827568a82d5856f3c8d329d3c2bc0f47385eb9 (patch)
tree1d0844a3b311d6fcb403a83fdbf605b1daa8f83f
parent8a50c58519271dd24ba760bb282875f6ad66ee71 (diff)
downloadlinux-stable-89827568a82d5856f3c8d329d3c2bc0f47385eb9.tar.gz
linux-stable-89827568a82d5856f3c8d329d3c2bc0f47385eb9.tar.bz2
linux-stable-89827568a82d5856f3c8d329d3c2bc0f47385eb9.zip
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 <steve.wahl@hpe.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Link: https://lore.kernel.org/all/20230519190752.3297140-8-steve.wahl%40hpe.com
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c6
1 files 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();