summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-10-26 13:42:55 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-10-26 13:42:55 +0000
commitd5dc67e08502d113b98506da60b5568ef5a7e451 (patch)
tree5882eb9257f4745f9adf30069cbf26146447e81b /sys/arch/mips64
parent92cca5fe4c73e5aedec7acd75a454661bbde8752 (diff)
Increment `ncpus' to its final value already during autoconfiguration so
that percpu data areas get allocated properly on mips64 platforms. It is too late to set the value during launch of secondary CPUs. ok jasper@ kettenis@ dlg@
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c
index 3c8111d09b9..22287cc539d 100644
--- a/sys/arch/mips64/mips64/cpu.c
+++ b/sys/arch/mips64/mips64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.60 2016/08/16 13:03:58 visa Exp $ */
+/* $OpenBSD: cpu.c,v 1.61 2016/10/26 13:42:54 visa Exp $ */
/*
* Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se)
@@ -102,6 +102,7 @@ cpuattach(struct device *parent, struct device *dev, void *aux)
ci->ci_next = cpu_info_list->ci_next;
cpu_info_list->ci_next = ci;
ci->ci_flags |= CPUF_PRESENT;
+ ncpus++;
}
#endif
ci->ci_self = ci;