qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] PCI-related cleanup for ppc/powernv
@ 2023-01-27 12:28 Frederic Barrat
  2023-01-27 12:28 ` [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure Frederic Barrat
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Frederic Barrat @ 2023-01-27 12:28 UTC (permalink / raw)
  To: clg, danielhb413, qemu-ppc, qemu-devel

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(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure
  2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
@ 2023-01-27 12:28 ` Frederic Barrat
  2023-01-27 16:15   ` Cédric Le Goater
  2023-01-27 12:28 ` [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID Frederic Barrat
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Frederic Barrat @ 2023-01-27 12:28 UTC (permalink / raw)
  To: clg, danielhb413, qemu-ppc, qemu-devel

Remove unused structure member 'system_memory'.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
 include/hw/pci-host/pnv_phb4.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 1f3237c9d5..17aef08f91 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -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    0xf
     uint64_t nest_regs[PHB4_PEC_NEST_REGS_COUNT];
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID
  2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
  2023-01-27 12:28 ` [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure Frederic Barrat
@ 2023-01-27 12:28 ` Frederic Barrat
  2023-01-27 16:16   ` Cédric Le Goater
  2023-01-27 12:28 ` [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register Frederic Barrat
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Frederic Barrat @ 2023-01-27 12:28 UTC (permalink / raw)
  To: clg, danielhb413, qemu-ppc, qemu-devel

PNV_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.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
 include/hw/pci-host/pnv_phb4.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 17aef08f91..761525686e 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -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) \
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register
  2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
  2023-01-27 12:28 ` [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure Frederic Barrat
  2023-01-27 12:28 ` [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID Frederic Barrat
@ 2023-01-27 12:28 ` Frederic Barrat
  2023-01-27 16:18   ` Cédric Le Goater
  2023-01-27 12:28 ` [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name Frederic Barrat
  2023-01-28 23:32 ` [PATCH 0/4] PCI-related cleanup for ppc/powernv Daniel Henrique Barboza
  4 siblings, 1 reply; 10+ messages in thread
From: Frederic Barrat @ 2023-01-27 12:28 UTC (permalink / raw)
  To: clg, danielhb413, qemu-ppc, qemu-devel

Update register value per its P10 DD2 definition.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
 include/hw/pci-host/pnv_phb4.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
index 761525686e..28d61b96c7 100644
--- a/include/hw/pci-host/pnv_phb4.h
+++ b/include/hw/pci-host/pnv_phb4.h
@@ -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) \
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name
  2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
                   ` (2 preceding siblings ...)
  2023-01-27 12:28 ` [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register Frederic Barrat
@ 2023-01-27 12:28 ` Frederic Barrat
  2023-01-27 16:19   ` Cédric Le Goater
  2023-01-28 23:32 ` [PATCH 0/4] PCI-related cleanup for ppc/powernv Daniel Henrique Barboza
  4 siblings, 1 reply; 10+ messages in thread
From: Frederic Barrat @ 2023-01-27 12:28 UTC (permalink / raw)
  To: clg, danielhb413, qemu-ppc, qemu-devel

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 <fbarrat@linux.ibm.com>
---
 hw/pci-host/pnv_phb4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index ccbde841fc..542f9e2932 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -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);
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure
  2023-01-27 12:28 ` [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure Frederic Barrat
@ 2023-01-27 16:15   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2023-01-27 16:15 UTC (permalink / raw)
  To: Frederic Barrat, danielhb413, qemu-ppc, qemu-devel

On 1/27/23 13:28, Frederic Barrat wrote:
> Remove unused structure member 'system_memory'.
> 
> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>   include/hw/pci-host/pnv_phb4.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
> index 1f3237c9d5..17aef08f91 100644
> --- a/include/hw/pci-host/pnv_phb4.h
> +++ b/include/hw/pci-host/pnv_phb4.h
> @@ -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    0xf
>       uint64_t nest_regs[PHB4_PEC_NEST_REGS_COUNT];



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID
  2023-01-27 12:28 ` [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID Frederic Barrat
@ 2023-01-27 16:16   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2023-01-27 16:16 UTC (permalink / raw)
  To: Frederic Barrat, danielhb413, qemu-ppc, qemu-devel

On 1/27/23 13:28, Frederic Barrat wrote:
> PNV_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.
> > Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>



Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>   include/hw/pci-host/pnv_phb4.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
> index 17aef08f91..761525686e 100644
> --- a/include/hw/pci-host/pnv_phb4.h
> +++ b/include/hw/pci-host/pnv_phb4.h
> @@ -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) \



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register
  2023-01-27 12:28 ` [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register Frederic Barrat
@ 2023-01-27 16:18   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2023-01-27 16:18 UTC (permalink / raw)
  To: Frederic Barrat, danielhb413, qemu-ppc, qemu-devel

On 1/27/23 13:28, Frederic Barrat wrote:
> Update register value per its P10 DD2 definition.
> 
> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>

Indeed :

   mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("power10_v2.0");


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>   include/hw/pci-host/pnv_phb4.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h
> index 761525686e..28d61b96c7 100644
> --- a/include/hw/pci-host/pnv_phb4.h
> +++ b/include/hw/pci-host/pnv_phb4.h
> @@ -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) \



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name
  2023-01-27 12:28 ` [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name Frederic Barrat
@ 2023-01-27 16:19   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2023-01-27 16:19 UTC (permalink / raw)
  To: Frederic Barrat, danielhb413, qemu-ppc, qemu-devel

On 1/27/23 13:28, Frederic Barrat wrote:
> 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 <fbarrat@linux.ibm.com>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>   hw/pci-host/pnv_phb4.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
> index ccbde841fc..542f9e2932 100644
> --- a/hw/pci-host/pnv_phb4.c
> +++ b/hw/pci-host/pnv_phb4.c
> @@ -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);



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] PCI-related cleanup for ppc/powernv
  2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
                   ` (3 preceding siblings ...)
  2023-01-27 12:28 ` [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name Frederic Barrat
@ 2023-01-28 23:32 ` Daniel Henrique Barboza
  4 siblings, 0 replies; 10+ messages in thread
From: Daniel Henrique Barboza @ 2023-01-28 23:32 UTC (permalink / raw)
  To: Frederic Barrat, clg, qemu-ppc, qemu-devel



On 1/27/23 09:28, Frederic Barrat wrote:
> 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

Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks,


Daniel

> 
>   hw/pci-host/pnv_phb4.c         | 2 +-
>   include/hw/pci-host/pnv_phb4.h | 5 +----
>   2 files changed, 2 insertions(+), 5 deletions(-)
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-28 23:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-27 12:28 [PATCH 0/4] PCI-related cleanup for ppc/powernv Frederic Barrat
2023-01-27 12:28 ` [PATCH 1/4] ppc/pnv/pci: Cleanup PnvPHBPecState structure Frederic Barrat
2023-01-27 16:15   ` Cédric Le Goater
2023-01-27 12:28 ` [PATCH 2/4] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID Frederic Barrat
2023-01-27 16:16   ` Cédric Le Goater
2023-01-27 12:28 ` [PATCH 3/4] ppc/pnv/pci: Update PHB5 version register Frederic Barrat
2023-01-27 16:18   ` Cédric Le Goater
2023-01-27 12:28 ` [PATCH 4/4] ppc/pnv/pci: Fix PHB xscom registers memory region name Frederic Barrat
2023-01-27 16:19   ` Cédric Le Goater
2023-01-28 23:32 ` [PATCH 0/4] PCI-related cleanup for ppc/powernv Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).