From 4e8b6b4a06e9b8bd64928b39a5a6cfe0fabaf9f0 Mon Sep 17 00:00:00 2001 From: tijl Date: Sun, 8 Nov 2015 14:26:50 +0000 Subject: Since r289279 bufinit() uses mp_ncpus, but some architectures set this variable during mp_start() which is too late. Move this to mp_setmaxid() where other architectures set it and move x86 assertions to MI code. Reviewed by: kib (x86 part) --- sys/arm/mv/armadaxp/armadaxp_mp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/arm/mv/armadaxp') diff --git a/sys/arm/mv/armadaxp/armadaxp_mp.c b/sys/arm/mv/armadaxp/armadaxp_mp.c index 1fa4d53..6685204 100644 --- a/sys/arm/mv/armadaxp/armadaxp_mp.c +++ b/sys/arm/mv/armadaxp/armadaxp_mp.c @@ -82,15 +82,14 @@ void platform_mp_setmaxid(void) { - mp_maxid = 3; + mp_ncpus = platform_get_ncpus(); + mp_maxid = mp_ncpus - 1; } int platform_mp_probe(void) { - mp_ncpus = platform_get_ncpus(); - return (mp_ncpus > 1); } -- cgit v1.1