]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
powerpc: Fix regression introduced in r342771
authorcem <cem@FreeBSD.org>
Mon, 7 Jan 2019 19:39:31 +0000 (19:39 +0000)
committercem <cem@FreeBSD.org>
Mon, 7 Jan 2019 19:39:31 +0000 (19:39 +0000)
commiteff6631b384f13e321af5b1141d61d0d0adff108
tree83c3359dd2941bc7ed83cc43ad9e4298c5a6a2d2
parente9f8daf6df277b70d8ce38d60d0f5062b753bc1c
powerpc: Fix regression introduced in r342771

In r342771, I introduced a regression in Power by abusing the platform
smp_topo() method as a shortcut for providing the MI information needed for
the stated sysctls.  The smp_topo() method was already called later by
sched_ule (under the name cpu_topo()), and initializes a static array of
scheduler topology information.  I had skimmed the smp_topo_foo() functions
and assumed they were idempotent; empirically, they are not (or at least,
detect re-initialization and panic).

Do the cleaner thing I should have done in the first place and add a
platform method specifically for core- and thread-count probing.

Reported by: luporl via jhibbits
Reviewed by: luporl
X-MFC-With: r342771
Differential Revision: https://reviews.freebsd.org/D18777
sys/powerpc/include/platform.h
sys/powerpc/powernv/platform_powernv.c
sys/powerpc/powerpc/mp_machdep.c
sys/powerpc/powerpc/platform.c
sys/powerpc/powerpc/platform_if.m
sys/powerpc/ps3/platform_ps3.c
sys/powerpc/pseries/platform_chrp.c