PCI-related cleanup for ppc/powernv
cover PCI-related cleanup for ppc/powernv
Pretty simple PCI-related cleanup for powernv
Frederic Barrat (4):
ppc/pnv/pci: Cleanup PnvPHBPecState structure ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID ppc/pnv/pci: Update PHB5 version register ppc/pnv/pci: Fix PHB xscom registers memory region name
hw/pci-host/pnv_phb4.c | 2 +- include/hw/pci-host/pnv_phb4.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.1
PATCH 1/4 ppc/pnv/pci: Cleanup PnvPHBPecState structure
Remove unused structure member 'system_memory'.
--- include/hw/pci-host/pnv_phb4.h | 2 -- 1 file changed, 2 deletions(-)
include/hw/pci-host/pnv_phb4.h +0 -2
@@ -173,8 +173,6 @@ struct PnvPhb4PecState {uint32_t index;uint32_t chip_id; -MemoryRegion *system_memory; -/* Nest registers, excuding per-stack */ #define PHB4_PEC_NEST_REGS_COUNT 0xfuint64_t nest_regs[PHB4_PEC_NEST_REGS_COUNT ];
Signature · 1 line
2.39.1
Re: [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure
Quoted 3 lines · Frederic Barrat
Remove unused structure member '
system_memory'.Signed-off-by Frederic Barrat <[email protected]>
Thanks,
C.
Quoted 17 lines
--- include/hw/pci-host/pnv_phb4.h | 2 -- 1 file changed, 2 deletions(-)include/hw/pci-host/pnv_phb4.h +0
-2@@ -173,8 +173,6 @@ struct PnvPhb4PecState {uint32_t index;uint32_t chip_id; -MemoryRegion *system_memory; -/* Nest registers, excuding per-stack */ #define PHB4_PEC_NEST_REGS_COUNT 0xfuint64_t nest_regs[PHB4_PEC_NEST_REGS_COUNT ];
PATCH 2/4 ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID
In reply to Frederic BarratPNV_PHB5_DEVICE_ID is defined in two different headers. The definition in hw/pci-host/pnv_phb4.h was left out in a previous rework.
Remaining definition is in hw/pci-host/pnv_phb.h.
--- include/hw/pci-host/pnv_phb4.h | 1 - 1 file changed, 1 deletion(-)
include/hw/pci-host/pnv_phb4.h +0 -1
@@ -215,7 +215,6 @@ struct PnvPhb4PecClass { OBJECT_CHECK(PnvPhb4, (obj), TYPE_PNV_PHB5)#define PNV_PHB5_VERSION 0x000000a500000001ull -#define PNV_PHB5_DEVICE_ID 0x0652#define TYPE_PNV_PHB5_PEC "pnv-phb5-pec"#define PNV_PHB5_PEC (obj) \
Signature · 1 line
2.39.1
Re: [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID
Quoted 5 lines · Frederic Barrat
PNV_PHB5_DEVICE_IDis defined in two different headers. The definition inhw/pci-host/pnv_phb4.hwas left out in a previous rework.Remaining definition is in
hw/pci-host/pnv_phb.h.Quoted 1 line
Signed-off-by Frederic Barrat <[email protected]>
Thanks,
C.
Quoted 16 lines
--- include/hw/pci-host/pnv_phb4.h | 1 - 1 file changed, 1 deletion(-)include/hw/pci-host/pnv_phb4.h +0
-1@@ -215,7 +215,6 @@ struct PnvPhb4PecClass { OBJECT_CHECK(PnvPhb4, (obj), TYPE_PNV_PHB5)#define PNV_PHB5_VERSION 0x000000a500000001ull -#define PNV_PHB5_DEVICE_ID 0x0652#define TYPE_PNV_PHB5_PEC "pnv-phb5-pec"#define PNV_PHB5_PEC (obj) \
PATCH 3/4 ppc/pnv/pci: Update PHB5 version register
In reply to Frederic BarratUpdate register value per its P10 DD2 definition.
--- include/hw/pci-host/pnv_phb4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/pci-host/pnv_phb4.h +1 -1
@@ -214,7 +214,7 @@ struct PnvPhb4PecClass {#define PNV_PHB5 (obj) \ OBJECT_CHECK(PnvPhb4, (obj), TYPE_PNV_PHB5) -#define PNV_PHB5_VERSION 0x000000a500000001ull +#define PNV_PHB5_VERSION 0x000000a500000002ull#define TYPE_PNV_PHB5_PEC "pnv-phb5-pec"#define PNV_PHB5_PEC (obj) \
Signature · 1 line
2.39.1
Re: [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register
Quoted 3 lines · Frederic Barrat
Update register value per its P10 DD2 definition.
Signed-off-by Frederic Barrat <[email protected]>
Indeed :
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");Thanks,
C.
Quoted 17 lines
--- include/hw/pci-host/pnv_phb4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/pci-host/pnv_phb4.h +1
-1@@ -214,7 +214,7 @@ struct PnvPhb4PecClass {#define PNV_PHB5 (obj) \ OBJECT_CHECK(PnvPhb4, (obj), TYPE_PNV_PHB5) -#define PNV_PHB5_VERSION 0x000000a500000001ull +#define PNV_PHB5_VERSION 0x000000a500000002ull#define TYPE_PNV_PHB5_PEC "pnv-phb5-pec"#define PNV_PHB5_PEC (obj) \
PATCH 4/4 ppc/pnv/pci: Fix PHB xscom registers memory region name
In reply to Frederic BarratThe name is for the region mapping the PHB xscom registers. It was apparently a bad cut-and-paste from the per-stack pci xscom area just above, so we had two regions with the same name.
--- hw/pci-host/pnv_phb4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/pnv_phb4.c +1 -1
@@ -1497,7 +1497,7 @@ static void pnv_phb4_xscom_realize(PnvPHB4 *phb) PHB4_PEC_PCI_STK_REGS_COUNT);/* PHB pass-through */ -snprintf (name,sizeof (name),"xscom-pec-%d.%d-pci-phb-%d" , +snprintf (name,sizeof (name),"xscom-pec-%d.%d-phb-%d" , pec->chip_id, pec->index, stack_no);pnv_xscom_region_init (&phb->phb_regs_mr,OBJECT (phb), &pnv_phb4_xscom_ops, phb, name,0x40 );
Signature · 1 line
2.39.1
Re: [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name
Quoted 5 lines · Frederic Barrat
The name is for the region mapping the PHB xscom registers. It was apparently a bad cut-and-paste from the per-stack pci xscom area just above, so we had two regions with the same name.
Signed-off-by Frederic Barrat <[email protected]>
Thanks,
C.
Quoted 17 lines
--- hw/pci-host/pnv_phb4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci-host/pnv_phb4.c +1
-1@@ -1497,7 +1497,7 @@ static void pnv_phb4_xscom_realize(PnvPHB4 *phb) PHB4_PEC_PCI_STK_REGS_COUNT);/* PHB pass-through */ -snprintf (name,sizeof (name),"xscom-pec-%d.%d-pci-phb-%d" , +snprintf (name,sizeof (name),"xscom-pec-%d.%d-phb-%d" , pec->chip_id, pec->index, stack_no);pnv_xscom_region_init (&phb->phb_regs_mr,OBJECT (phb), &pnv_phb4_xscom_ops, phb, name,0x40 );
Daniel Henrique Barboza
AppliedQuoted 7 lines · Frederic Barrat
Pretty simple PCI-related cleanup for powernv
Frederic Barrat (4):
ppc/pnv/pci: Cleanup PnvPHBPecState structure ppc/pnv/pci: Remove duplicate definition ofPNV_PHB5_DEVICE_IDppc/pnv/pci: Update PHB5 version register ppc/pnv/pci: Fix PHB xscom registers memory region name
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,
Daniel
Quoted 5 lines
hw/pci-host/pnv_phb4.c | 2 +- include/hw/pci-host/pnv_phb4.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-)