ppc/pnv: Move timebase state into PnvCore
authorNicholas Piggin <npiggin@gmail.com>
Fri, 24 May 2024 11:58:18 +0000 (21:58 +1000)
committerNicholas Piggin <npiggin@gmail.com>
Thu, 25 Jul 2024 23:21:06 +0000 (09:21 +1000)
commit0ca94b2f11223d41258e6a7a046e5ccde831de46
tree11d1d73e720853b018ac7dbe0566246957f1488c
parent060e61436794d13ede9a1d0eb2b1d0cf3b7cfcfd
ppc/pnv: Move timebase state into PnvCore

The timebase state machine is per per-core state and can be driven
by any thread in the core. It is currently implemented as a hack
where the state is in a CPU structure and only thread 0's state is
accessed by the chiptod, which limits programming the timebase
side of the state machine to thread 0 of a core.

Move the state out into PnvCore and share it among all threads.

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
hw/ppc/pnv_chiptod.c
include/hw/ppc/pnv_core.h
target/ppc/cpu.h
target/ppc/timebase_helper.c