mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
ppc/pnv: Improve pervasive topology calculation for big-core
Big (SMT8) cores have a complicated function to map the core, thread ID to pervasive topology (PIR). Fix this for power8, power9, and power10. Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Caleb Schlossin <calebs@linux.vnet.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
0b8893236e
commit
9940412ae4
5 changed files with 57 additions and 28 deletions
|
@ -49,9 +49,6 @@ void helper_spr_core_write_generic(CPUPPCState *env, uint32_t sprn,
|
|||
CPUState *cs = env_cpu(env);
|
||||
CPUState *ccs;
|
||||
uint32_t nr_threads = cs->nr_threads;
|
||||
uint32_t core_id = env->spr[SPR_PIR] & ~(nr_threads - 1);
|
||||
|
||||
assert(core_id == env->spr[SPR_PIR] - env->spr[SPR_TIR]);
|
||||
|
||||
if (nr_threads == 1) {
|
||||
env->spr[sprn] = val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue