[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/34] ppc/pnv: turn pnv_phb4_update_regions() into static
From: |
Cédric Le Goater |
Subject: |
[PULL 33/34] ppc/pnv: turn pnv_phb4_update_regions() into static |
Date: |
Wed, 12 Jan 2022 12:55:50 +0100 |
From: Daniel Henrique Barboza <danielhb413@gmail.com>
Its only callers are inside pnv_phb4.c.
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220111131027.599784-6-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
include/hw/pci-host/pnv_phb4.h | 1 -
hw/pci-host/pnv_phb4.c | 52 +++++++++++++++++-----------------
2 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 82f054cf218a..4b7ce8a7239f 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -131,7 +131,6 @@ struct PnvPHB4 {
};
void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon);
-void pnv_phb4_update_regions(PnvPhb4PecStack *stack);
int pnv_phb4_pec_get_phb_id(PnvPhb4PecState *pec, int stack_index);
extern const MemoryRegionOps pnv_phb4_xscom_ops;
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index ffa1453eee26..be29174f13c5 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -868,6 +868,32 @@ 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)
+{
+ PnvPHB4 *phb = stack->phb;
+
+ /* Unmap first always */
+ if (memory_region_is_mapped(&phb->mr_regs)) {
+ memory_region_del_subregion(&stack->phbbar, &phb->mr_regs);
+ }
+ if (memory_region_is_mapped(&phb->xsrc.esb_mmio)) {
+ memory_region_del_subregion(&stack->intbar, &phb->xsrc.esb_mmio);
+ }
+
+ /* Map registers if enabled */
+ if (memory_region_is_mapped(&stack->phbbar)) {
+ memory_region_add_subregion(&stack->phbbar, 0, &phb->mr_regs);
+ }
+
+ /* Map ESB if enabled */
+ if (memory_region_is_mapped(&stack->intbar)) {
+ memory_region_add_subregion(&stack->intbar, 0, &phb->xsrc.esb_mmio);
+ }
+
+ /* Check/update m32 */
+ pnv_phb4_check_all_mbt(phb);
+}
+
static void pnv_pec_stk_update_map(PnvPhb4PecStack *stack)
{
PnvPhb4PecState *pec = stack->pec;
@@ -1796,32 +1822,6 @@ static void pnv_phb4_register_types(void)
type_init(pnv_phb4_register_types);
-void pnv_phb4_update_regions(PnvPhb4PecStack *stack)
-{
- PnvPHB4 *phb = stack->phb;
-
- /* Unmap first always */
- if (memory_region_is_mapped(&phb->mr_regs)) {
- memory_region_del_subregion(&stack->phbbar, &phb->mr_regs);
- }
- if (memory_region_is_mapped(&phb->xsrc.esb_mmio)) {
- memory_region_del_subregion(&stack->intbar, &phb->xsrc.esb_mmio);
- }
-
- /* Map registers if enabled */
- if (memory_region_is_mapped(&stack->phbbar)) {
- memory_region_add_subregion(&stack->phbbar, 0, &phb->mr_regs);
- }
-
- /* Map ESB if enabled */
- if (memory_region_is_mapped(&stack->intbar)) {
- memory_region_add_subregion(&stack->intbar, 0, &phb->xsrc.esb_mmio);
- }
-
- /* Check/update m32 */
- pnv_phb4_check_all_mbt(phb);
-}
-
void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon)
{
uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >> 3];
--
2.31.1
- [PULL 23/34] ppc/pnv: Complete user created PHB3 devices, (continued)
- [PULL 23/34] ppc/pnv: Complete user created PHB3 devices, Cédric Le Goater, 2022/01/12
- [PULL 27/34] pnv_phb4_pec.c: move pnv_pec_phb_offset() to pnv_phb4.c, Cédric Le Goater, 2022/01/12
- [PULL 12/34] target/ppc: Add MSR_ILE support to ppc_interrupts_little_endian, Cédric Le Goater, 2022/01/12
- [PULL 11/34] target/ppc: Add HV support to ppc_interrupts_little_endian, Cédric Le Goater, 2022/01/12
- [PULL 21/34] ppc/pnv: Introduce support for user created PHB3 devices, Cédric Le Goater, 2022/01/12
- [PULL 32/34] ppc/pnv: Introduce user creatable pnv-phb4 devices, Cédric Le Goater, 2022/01/12
- [PULL 29/34] ppc/pnv: set phb4 properties in stk_realize(), Cédric Le Goater, 2022/01/12
- [PULL 26/34] pnv_phb4.c: change TYPE_PNV_PHB4_ROOT_BUS name, Cédric Le Goater, 2022/01/12
- [PULL 22/34] ppc/pnv: Reparent user created PHB3 devices to the PnvChip, Cédric Le Goater, 2022/01/12
- [PULL 19/34] pnv_phb4.c: make pnv-phb4-root-port user creatable, Cédric Le Goater, 2022/01/12
- [PULL 33/34] ppc/pnv: turn pnv_phb4_update_regions() into static,
Cédric Le Goater <=
- [PULL 28/34] pnv_phb4_pec: use pnv_phb4_pec_get_phb_id() in pnv_pec_dt_xscom(), Cédric Le Goater, 2022/01/12
- [PULL 34/34] ppc/pnv: use stack->pci_regs[] in pnv_pec_stk_pci_xscom_write(), Cédric Le Goater, 2022/01/12
- [PULL 31/34] ppc/pnv: turn 'phb' into a pointer in struct PnvPhb4PecStack, Cédric Le Goater, 2022/01/12
- [PULL 08/34] target/ppc: powerpc_excp: Extract software TLB logging into a function, Cédric Le Goater, 2022/01/12
- [PULL 06/34] MAINTAINERS: Improve the PowerPC machines section, Cédric Le Goater, 2022/01/12
- Re: [PULL 00/34] ppc queue, Peter Maydell, 2022/01/13