aboutsummaryrefslogtreecommitdiff
path: root/meson
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2022-01-12 11:28:27 +0100
committerCédric Le Goater <clg@kaod.org>2022-01-12 11:28:27 +0100
commit3d2adf1713b298206f831b78c00218a4e6e3ddad (patch)
treee57021fd19f23f5f0b3449173b454f8dceb4361e /meson
parentb580713a962ecb4b5aa928975799b8c9e970c880 (diff)
downloadqemu-3d2adf1713b298206f831b78c00218a4e6e3ddad.zip
qemu-3d2adf1713b298206f831b78c00218a4e6e3ddad.tar.gz
qemu-3d2adf1713b298206f831b78c00218a4e6e3ddad.tar.bz2
ppc/pnv: move PHB4 XSCOM init to phb4_realize()
The 'stack->phb_regs_mr' PHB4 passthrough XSCOM initialization relies on 'stack->phb' being not NULL. Moving 'stack->phb_regs_mr' region_init() and add_subregion() to phb4_realize() time is a natural thing to do since it's strictly PHB related. The remaining XSCOM initialization is also related to 'stack->phb' but in a different manner. For instance, 'stack->nest_regs_mr' MemoryRegionOps, 'pnv_pec_stk_nest_xscom_ops', uses pnv_pec_stk_nest_xscom_write() as a write callback. When trying to write the PEC_NEST_STK_BAR_EN reg, pnv_pec_stk_update_map() is called. Inside this function, pnv_phb4_update_regions() is called twice. This function uses 'stack->phb' to manipulate memory regions of the phb. This is not a problem now but, when enabling user creatable phb4s, a stack that doesn't have an associated phb (i.e. stack->phb = NULL) it will cause a SIGINT during boot in pnv_phb4_update_regions(). All this can be avoided if all XSCOM realize is moved to phb4_realize(), when we have certainty about the existence of 'stack->phb'. A lot of code was moved from pnv_phb4_pec.c to pnv_phb4.c due to static constant and variables being used but the cleaner logic is worth the trouble. Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220111131027.599784-3-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'meson')
0 files changed, 0 insertions, 0 deletions