[PowerPC64] Fix xive order calculation in qemu TCG
authorBrandon Bergren <bdragon@FreeBSD.org>
Tue, 8 Sep 2020 23:48:49 +0000 (23:48 +0000)
committerBrandon Bergren <bdragon@FreeBSD.org>
Tue, 8 Sep 2020 23:48:49 +0000 (23:48 +0000)
commit69576451458ceac501ddb7ab7d231f6da0256d0a
treee7445882ec8b4b607c597e1cddd2473fed04e4de
parent67a659d2827b340badda0040e4ccfefe2962f003
[PowerPC64] Fix xive order calculation in qemu TCG

When emulating a single thread system for testing reasons, mp_maxid can
be 0. This trips up our math for calculating the order.

Account for this to fix xive attachment when emulating a single-thread
core on qemu powernv (a configuration that doesn't exist in the real world.)

Sponsored by: Tag1 Consulting, Inc.
sys/powerpc/powernv/xive.c