Module Name: src
Committed By: thorpej
Date: Sat Aug 15 16:09:07 UTC 2020
Modified Files:
src/sys/arch/alpha/alpha: ipifuncs.c
Log Message:
Convert some #ifdef DIAGNOSTIC checks to KASSERTs. NFCI.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/alpha/alpha/ipifuncs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/alpha/ipifuncs.c
diff -u src/sys/arch/alpha/alpha/ipifuncs.c:1.50 src/sys/arch/alpha/alpha/ipifuncs.c:1.51
--- src/sys/arch/alpha/alpha/ipifuncs.c:1.50 Sun Dec 1 15:34:44 2019
+++ src/sys/arch/alpha/alpha/ipifuncs.c Sat Aug 15 16:09:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ipifuncs.c,v 1.50 2019/12/01 15:34:44 ad Exp $ */
+/* $NetBSD: ipifuncs.c,v 1.51 2020/08/15 16:09:07 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.50 2019/12/01 15:34:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.51 2020/08/15 16:09:07 thorpej Exp $");
/*
* Interprocessor interrupt handlers.
@@ -159,13 +159,9 @@ void
alpha_send_ipi(u_long cpu_id, u_long ipimask)
{
-#ifdef DIAGNOSTIC
- if (cpu_id >= hwrpb->rpb_pcs_cnt ||
- cpu_info[cpu_id] == NULL)
- panic("alpha_send_ipi: bogus cpu_id");
- if (((1UL << cpu_id) & cpus_running) == 0)
- panic("alpha_send_ipi: CPU %ld not running", cpu_id);
-#endif
+ KASSERT(cpu_id < hwrpb->rpb_pcs_cnt);
+ KASSERT(cpu_info[cpu_id] != NULL);
+ KASSERT(cpus_running & (1UL << cpu_id));
atomic_or_ulong(&cpu_info[cpu_id]->ci_ipis, ipimask);
alpha_pal_wripir(cpu_id);