pnv/xive2: Access direct mapped thread contexts from all chips
commit151308677c977dae5fdb5c62f20722ddd25aeef9
authorFrederic Barrat <fbarrat@linux.ibm.com>
Thu, 2 Jun 2022 16:53:10 +0000 (2 18:53 +0200)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 20 Jun 2022 11:38:58 +0000 (20 08:38 -0300)
treefe1178e3cc438bfef5ad0787d5cefc36de42406f
parent8f7d41e0c9cdcb696df564100e77c81ef6a9d026
pnv/xive2: Access direct mapped thread contexts from all chips

When accessing a thread context through the IC BAR, the offset of the
page in the BAR identifies the CPU. From that offset, we can compute
the PIR (processor ID register) of the CPU to do the data structure
lookup. On P10, the current code assumes an access for node 0 when
computing the PIR. Everything is almost in place to allow access for
other nodes though. So this patch reworks how the PIR value is
computed so that we can access all thread contexts through the IC BAR.

The PIR is already correct on P9, so no need to modify anything there.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220602165310.558810-1-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/intc/pnv_xive2.c