Skip to content

Commit

Permalink
Revert previous until I can diagnose a failure reported by gson.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorpej committed Mar 5, 2024
1 parent bfb11cb commit 7dff59c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
11 changes: 3 additions & 8 deletions sys/kern/init_main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: init_main.c,v 1.548 2024/03/05 14:39:29 thorpej Exp $ */
/* $NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $ */

/*-
* Copyright (c) 2008, 2009, 2019, 2023 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -97,7 +97,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.548 2024/03/05 14:39:29 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $");

#include "opt_cnmagic.h"
#include "opt_ddb.h"
Expand Down Expand Up @@ -275,21 +275,16 @@ main(void)
#ifdef DIAGNOSTIC
/*
* Verify that CPU_INFO_FOREACH() knows about the boot CPU
* and only the boot CPU at this point. The boot CPU should
* also be marked PRIMARY.
* and only the boot CPU at this point.
*/
int cpucount = 0;
for (CPU_INFO_FOREACH(cii, ci)) {
KASSERT(ci == curcpu());
cpucount++;
}
KASSERT(cpucount == 1);
KASSERT(CPU_IS_PRIMARY(curcpu()));
#endif

/* Stash a pointer to the boot CPU for quick reference wheen needed. */
boot_cpu = curcpu();

l = &lwp0;
#ifndef LWP0_CPU_INFO
l->l_cpu = curcpu();
Expand Down
7 changes: 2 additions & 5 deletions sys/kern/subr_cpu.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: subr_cpu.c,v 1.21 2024/03/05 14:39:29 thorpej Exp $ */
/* $NetBSD: subr_cpu.c,v 1.22 2024/03/05 20:59:41 thorpej Exp $ */

/*-
* Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019, 2020
Expand Down Expand Up @@ -61,7 +61,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.21 2024/03/05 14:39:29 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.22 2024/03/05 20:59:41 thorpej Exp $");

#include <sys/param.h>
#include <sys/atomic.h>
Expand All @@ -86,9 +86,6 @@ int64_t cpu_counts[CPU_COUNT_MAX];
/* An array of CPUs. There are ncpu entries. */
struct cpu_info **cpu_infos __read_mostly;

/* A pointer to the boot CPU, for quick reference when needed. */
struct cpu_info *boot_cpu __read_mostly;

/* Note: set on mi_cpu_attach() and idle_loop(). */
kcpuset_t * kcpuset_attached __read_mostly = NULL;
kcpuset_t * kcpuset_running __read_mostly = NULL;
Expand Down
3 changes: 1 addition & 2 deletions sys/sys/cpu.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.53 2024/03/05 14:39:29 thorpej Exp $ */
/* $NetBSD: cpu.h,v 1.54 2024/03/05 20:59:41 thorpej Exp $ */

/*-
* Copyright (c) 2007 YAMAMOTO Takashi,
Expand Down Expand Up @@ -100,7 +100,6 @@ void cpu_topology_init(void);
extern kmutex_t cpu_lock;
extern u_int maxcpus;
extern struct cpu_info **cpu_infos;
extern struct cpu_info *boot_cpu;
extern kcpuset_t *kcpuset_attached;
extern kcpuset_t *kcpuset_running;

Expand Down

0 comments on commit 7dff59c

Please sign in to comment.