diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-01-18 12:56:31 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-01-18 12:56:31 +0100 |
commit | 7edb9514bff1552309a51cdea4f3f2afc47fe8c0 (patch) | |
tree | b792d9622df33a70ec238ecb251f47f8fdc49d2e /hw/pci-host/pnv_phb4.c | |
parent | db16c02ea7e399613ea74c32b02fb2737d6937e7 (diff) | |
download | qemu-7edb9514bff1552309a51cdea4f3f2afc47fe8c0.zip qemu-7edb9514bff1552309a51cdea4f3f2afc47fe8c0.tar.gz qemu-7edb9514bff1552309a51cdea4f3f2afc47fe8c0.tar.bz2 |
ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4
The function does not rely on stack for anything it does anymore. This
is also one less instance of 'stack->phb' that we need to worry about.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220113192952.911188-6-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/pci-host/pnv_phb4.c')
-rw-r--r-- | hw/pci-host/pnv_phb4.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index fbc475f..034721f 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -868,10 +868,8 @@ static uint64_t pnv_pec_stk_nest_xscom_read(void *opaque, hwaddr addr, return stack->nest_regs[reg]; } -static void pnv_phb4_update_regions(PnvPhb4PecStack *stack) +static void pnv_phb4_update_regions(PnvPHB4 *phb) { - PnvPHB4 *phb = stack->phb; - /* Unmap first always */ if (memory_region_is_mapped(&phb->mr_regs)) { memory_region_del_subregion(&phb->phbbar, &phb->mr_regs); @@ -930,7 +928,7 @@ static void pnv_pec_stk_update_map(PnvPhb4PecStack *stack) } /* Update PHB */ - pnv_phb4_update_regions(stack); + pnv_phb4_update_regions(phb); /* Handle maps */ if (!memory_region_is_mapped(&stack->mmbar0) && @@ -977,7 +975,7 @@ static void pnv_pec_stk_update_map(PnvPhb4PecStack *stack) } /* Update PHB */ - pnv_phb4_update_regions(stack); + pnv_phb4_update_regions(phb); } static void pnv_pec_stk_nest_xscom_write(void *opaque, hwaddr addr, |