Module Name:    src
Committed By:   andvar
Date:           Tue Dec  5 19:19:26 UTC 2023

Modified Files:
        src/sys/arch/sbmips/sbmips: cpu.c machdep.c sb1250_icu.c

Log Message:
use kcpuset_isset() and pass second (NULL) argument to mips_fixup_exceptions()
to fix build for GENERIC(64).MP kernel configs.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sbmips/sbmips/cpu.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sbmips/sbmips/machdep.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sbmips/sbmips/sb1250_icu.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/sbmips/sbmips/cpu.c
diff -u src/sys/arch/sbmips/sbmips/cpu.c:1.23 src/sys/arch/sbmips/sbmips/cpu.c:1.24
--- src/sys/arch/sbmips/sbmips/cpu.c:1.23	Thu Jul 21 17:02:15 2016
+++ src/sys/arch/sbmips/sbmips/cpu.c	Tue Dec  5 19:19:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $ */
+/* $NetBSD: cpu.c,v 1.24 2023/12/05 19:19:26 andvar Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.24 2023/12/05 19:19:26 andvar Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -150,13 +150,12 @@ cpu_attach(device_t parent, device_t sel
 			aprint_error(": CFE call to start failed: %d\n",
 			    status);
 		}
-		const u_long cpu_mask = 1L << cpu_index(ci);
 		for (size_t i = 0; i < 10000; i++) {
-			if (cpus_hatched & cpu_mask)
+			if (kcpuset_isset(cpus_hatched, cpu_index(ci)))
 				 break;
 			DELAY(100);
 		}
-		if ((cpus_hatched & cpu_mask) == 0) {
+		if (!kcpuset_isset(cpus_hatched, cpu_index(ci))) {
 			aprint_error(": failed to hatch!\n");
 			return;
 		}

Index: src/sys/arch/sbmips/sbmips/machdep.c
diff -u src/sys/arch/sbmips/sbmips/machdep.c:1.55 src/sys/arch/sbmips/sbmips/machdep.c:1.56
--- src/sys/arch/sbmips/sbmips/machdep.c:1.55	Mon Nov  6 03:47:48 2017
+++ src/sys/arch/sbmips/sbmips/machdep.c	Tue Dec  5 19:19:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.55 2017/11/06 03:47:48 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.56 2023/12/05 19:19:26 andvar Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2017/11/06 03:47:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2023/12/05 19:19:26 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -319,7 +319,7 @@ mach_init(long fwhandle, long magic, lon
 	}
 
 #ifdef MULTIPROCESSOR
-	mips_fixup_exceptions(mips_fixup_zero_relative);
+	mips_fixup_exceptions(mips_fixup_zero_relative, NULL);
 #endif
 }
 

Index: src/sys/arch/sbmips/sbmips/sb1250_icu.c
diff -u src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.14 src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.15
--- src/sys/arch/sbmips/sbmips/sb1250_icu.c:1.14	Thu Jul 21 17:02:15 2016
+++ src/sys/arch/sbmips/sbmips/sb1250_icu.c	Tue Dec  5 19:19:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $ */
+/* $NetBSD: sb1250_icu.c,v 1.15 2023/12/05 19:19:26 andvar Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.15 2023/12/05 19:19:26 andvar Exp $");
 
 #define	__INTR_PRIVATE
 
@@ -179,7 +179,7 @@ sb1250_lsw_send_ipi(struct cpu_info *ci,
 	struct cpu_softc * const cpu = ci->ci_softc;
 	const uint64_t mbox_mask = 1LLU << tag;
 
-	if (cpus_running & (1 << cpu_index(ci)))
+	if (kcpuset_isset(cpus_running, cpu_index(ci)))
 		WRITE_REG(cpu->sb1cpu_imr_base + R_IMR_MAILBOX_SET_CPU, mbox_mask);
 
 	return 0;

Reply via email to