Page MenuHomeFreeBSD

powerpc: Fix regression introduced in r342771

Authored by cem on Jan 7 2019, 6:45 PM.



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
X-MFC-With: r342771

Test Plan

Tinderbox ppc kernel compiled, but I do not have PPC equipment to test with.
Hoping for help from luporl or jhibbits or anyone :-).

(luporl@, I'd encourage you to change your Phabricator identity to 'luporl' to
match your committer address to make it easier to tag you in reviews :-))

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

cem created this revision.Jan 7 2019, 6:45 PM

Tested on my POWER8 machine.

(cem@, I started working on changing my Phabricator identity to 'luporl', thanks for the tip :))

This revision is now accepted and ready to land.Jan 7 2019, 7:30 PM
cem added a comment.Jan 7 2019, 7:34 PM

Thanks for the quick review and test!

This revision was automatically updated to reflect the committed changes.