Message ID | 20220113192952.911188-6-danielhb413@gmail.com |
---|---|
State | New |
Headers | show |
Series | remove PnvPhb4PecStack from Powernv9 | expand |
On 1/13/22 20:29, Daniel Henrique Barboza wrote: > 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> Thanks, C. > --- > hw/pci-host/pnv_phb4.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c > index fbc475f27a..034721f159 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, >
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index fbc475f27a..034721f159 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,
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> --- hw/pci-host/pnv_phb4.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)