qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once
@ 2024-02-07  9:12 Philippe Mathieu-Daudé
  2024-02-07  9:12 ` [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-07  9:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Nicholas Piggin, BALATON Zoltan, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza,
	Philippe Mathieu-Daudé

v2:
- Squashed 2 patches (Zoltan)

v1:
- Move ppc4xx_pci.c/ppc440_pcix.c from hw/ppc/ to hw/pci-host/
- Build them once for all targets

If it is convenient for PPC maintainers I can queue
this via my misc-hw tree.

Thanks,

Phil.

Philippe Mathieu-Daudé (4):
  hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header
  hw/ppc/ppc4xx_pci: Extract PCI host definitions to
    hw/pci-host/ppc4xx.h
  hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/
  hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/

 MAINTAINERS                        |  4 +++-
 include/hw/pci-host/ppc4xx.h       | 17 +++++++++++++++++
 include/hw/ppc/ppc4xx.h            |  5 -----
 hw/{ppc => pci-host}/ppc440_pcix.c |  3 +--
 hw/{ppc => pci-host}/ppc4xx_pci.c  |  3 +--
 hw/pci-host/ppce500.c              |  2 +-
 hw/ppc/ppc440_bamboo.c             |  1 +
 hw/ppc/ppc440_uc.c                 |  1 +
 hw/ppc/sam460ex.c                  |  1 +
 hw/pci-host/Kconfig                |  8 ++++++++
 hw/pci-host/meson.build            |  2 ++
 hw/pci-host/trace-events           | 12 ++++++++++++
 hw/ppc/Kconfig                     |  3 ++-
 hw/ppc/meson.build                 |  3 +--
 hw/ppc/trace-events                | 12 ------------
 15 files changed, 51 insertions(+), 26 deletions(-)
 create mode 100644 include/hw/pci-host/ppc4xx.h
 rename hw/{ppc => pci-host}/ppc440_pcix.c (99%)
 rename hw/{ppc => pci-host}/ppc4xx_pci.c (99%)

-- 
2.41.0



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

* [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header
  2024-02-07  9:12 [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once Philippe Mathieu-Daudé
@ 2024-02-07  9:12 ` Philippe Mathieu-Daudé
  2024-02-07  9:15   ` Thomas Huth
  2024-02-07  9:12 ` [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-07  9:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Nicholas Piggin, BALATON Zoltan, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20231011132427.65001-2-philmd@linaro.org>
---
 hw/ppc/ppc440_pcix.c | 1 -
 hw/ppc/ppc4xx_pci.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index df4ee374d0..d84418cb7b 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -25,7 +25,6 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "hw/irq.h"
-#include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
 #include "hw/pci/pci_device.h"
 #include "hw/pci/pci_host.h"
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index 0a07aab5d1..e4101398c9 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -24,7 +24,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "hw/irq.h"
-#include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
-- 
2.41.0



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

* [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h
  2024-02-07  9:12 [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once Philippe Mathieu-Daudé
  2024-02-07  9:12 ` [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header Philippe Mathieu-Daudé
@ 2024-02-07  9:12 ` Philippe Mathieu-Daudé
  2024-02-07  9:17   ` Thomas Huth
  2024-02-07 12:25   ` BALATON Zoltan
  2024-02-07  9:12 ` [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/ Philippe Mathieu-Daudé
  2024-02-07  9:12 ` [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c " Philippe Mathieu-Daudé
  3 siblings, 2 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-07  9:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Nicholas Piggin, BALATON Zoltan, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20231011132427.65001-3-philmd@linaro.org>
---
 MAINTAINERS                  |  1 +
 include/hw/pci-host/ppc4xx.h | 17 +++++++++++++++++
 include/hw/ppc/ppc4xx.h      |  5 -----
 hw/ppc/ppc440_bamboo.c       |  1 +
 hw/ppc/ppc440_pcix.c         |  2 +-
 hw/ppc/ppc440_uc.c           |  1 +
 hw/ppc/ppc4xx_pci.c          |  2 +-
 hw/ppc/sam460ex.c            |  1 +
 8 files changed, 23 insertions(+), 7 deletions(-)
 create mode 100644 include/hw/pci-host/ppc4xx.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 2f9741b898..b288f0dc76 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2068,6 +2068,7 @@ F: hw/ppc/ppc4xx*.c
 F: hw/ppc/ppc440_uc.c
 F: hw/ppc/ppc440.h
 F: hw/i2c/ppc4xx_i2c.c
+F: include/hw/pci-host/ppc4xx.h
 F: include/hw/ppc/ppc4xx.h
 F: include/hw/i2c/ppc4xx_i2c.h
 F: hw/intc/ppc-uic.c
diff --git a/include/hw/pci-host/ppc4xx.h b/include/hw/pci-host/ppc4xx.h
new file mode 100644
index 0000000000..dc36e1ea29
--- /dev/null
+++ b/include/hw/pci-host/ppc4xx.h
@@ -0,0 +1,17 @@
+/*
+ * QEMU PowerPC 4xx PCI-host definitions
+ *
+ * Copyright (c) 2007 Jocelyn Mayer
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef HW_PCIHOST_PPC4XX_H
+#define HW_PCIHOST_PPC4XX_H
+
+#define TYPE_PPC4xx_HOST_BRIDGE "ppc4xx-host-bridge"
+#define TYPE_PPC4xx_PCI_HOST "ppc4xx-pci-host"
+#define TYPE_PPC440_PCIX_HOST "ppc440-pcix-host"
+#define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host"
+
+#endif
diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
index ea7740239b..1bd9b8821b 100644
--- a/include/hw/ppc/ppc4xx.h
+++ b/include/hw/ppc/ppc4xx.h
@@ -29,11 +29,6 @@
 #include "exec/memory.h"
 #include "hw/sysbus.h"
 
-#define TYPE_PPC4xx_HOST_BRIDGE "ppc4xx-host-bridge"
-#define TYPE_PPC4xx_PCI_HOST "ppc4xx-pci-host"
-#define TYPE_PPC440_PCIX_HOST "ppc440-pcix-host"
-#define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host"
-
 /*
  * Generic DCR device
  */
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index c75c3083e6..e18f57efce 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -24,6 +24,7 @@
 #include "elf.h"
 #include "hw/char/serial.h"
 #include "hw/ppc/ppc.h"
+#include "hw/pci-host/ppc4xx.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/reset.h"
 #include "hw/sysbus.h"
diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index d84418cb7b..1926ae2a27 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -25,7 +25,7 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "hw/irq.h"
-#include "hw/ppc/ppc4xx.h"
+#include "hw/pci-host/ppc4xx.h"
 #include "hw/pci/pci_device.h"
 #include "hw/pci/pci_host.h"
 #include "trace.h"
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index 7d6ca70387..1312aa2080 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -14,6 +14,7 @@
 #include "qemu/log.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc4xx.h"
+#include "hw/pci-host/ppc4xx.h"
 #include "hw/qdev-properties.h"
 #include "hw/pci/pci.h"
 #include "sysemu/reset.h"
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index e4101398c9..b6c6c8993c 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "hw/irq.h"
-#include "hw/ppc/ppc4xx.h"
+#include "hw/pci-host/ppc4xx.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/reset.h"
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 1e615b8d35..a28498f39c 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -25,6 +25,7 @@
 #include "elf.h"
 #include "exec/memory.h"
 #include "ppc440.h"
+#include "hw/pci-host/ppc4xx.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/reset.h"
-- 
2.41.0



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

* [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/
  2024-02-07  9:12 [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once Philippe Mathieu-Daudé
  2024-02-07  9:12 ` [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header Philippe Mathieu-Daudé
  2024-02-07  9:12 ` [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h Philippe Mathieu-Daudé
@ 2024-02-07  9:12 ` Philippe Mathieu-Daudé
  2024-02-07  9:21   ` Thomas Huth
  2024-02-07  9:12 ` [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c " Philippe Mathieu-Daudé
  3 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-07  9:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Nicholas Piggin, BALATON Zoltan, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza,
	Philippe Mathieu-Daudé

ppc4xx_pci.c is moved from the target specific ppc_ss[] meson
source set to pci_ss[] which is common to all targets: the
object is built once.

Declare PPC4XX_PCI selector in pci-host/Kconfig.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 MAINTAINERS                       | 1 +
 hw/{ppc => pci-host}/ppc4xx_pci.c | 0
 hw/pci-host/ppce500.c             | 2 +-
 hw/pci-host/Kconfig               | 4 ++++
 hw/pci-host/meson.build           | 1 +
 hw/pci-host/trace-events          | 4 ++++
 hw/ppc/Kconfig                    | 2 +-
 hw/ppc/meson.build                | 1 -
 hw/ppc/trace-events               | 4 ----
 9 files changed, 12 insertions(+), 7 deletions(-)
 rename hw/{ppc => pci-host}/ppc4xx_pci.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index b288f0dc76..1927530c2d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1421,6 +1421,7 @@ Bamboo
 L: qemu-ppc@nongnu.org
 S: Orphan
 F: hw/ppc/ppc440_bamboo.c
+F: hw/pci-host/ppc4xx_pci.c
 F: tests/avocado/ppc_bamboo.py
 
 e500
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/pci-host/ppc4xx_pci.c
similarity index 100%
rename from hw/ppc/ppc4xx_pci.c
rename to hw/pci-host/ppc4xx_pci.c
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
index fa0d67b342..95b983b2b3 100644
--- a/hw/pci-host/ppce500.c
+++ b/hw/pci-host/ppce500.c
@@ -5,7 +5,7 @@
  *
  * Author: Yu Liu,     <yu.liu@freescale.com>
  *
- * This file is derived from hw/ppc4xx_pci.c,
+ * This file is derived from ppc4xx_pci.c,
  * the copyright for that material belongs to the original owners.
  *
  * This is free software; you can redistribute it and/or modify
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index f046d76a68..0a221e719e 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -6,6 +6,10 @@ config XEN_IGD_PASSTHROUGH
     default y
     depends on XEN && PCI_I440FX
 
+config PPC4XX_PCI
+    bool
+    select PCI
+
 config RAVEN_PCI
     bool
     select PCI
diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
index 36d5ab756f..eb6dc71c88 100644
--- a/hw/pci-host/meson.build
+++ b/hw/pci-host/meson.build
@@ -14,6 +14,7 @@ pci_ss.add(when: 'CONFIG_REMOTE_PCIHOST', if_true: files('remote.c'))
 pci_ss.add(when: 'CONFIG_SH_PCI', if_true: files('sh_pci.c'))
 
 # PPC devices
+pci_ss.add(when: 'CONFIG_PPC4XX_PCI', if_true: files('ppc4xx_pci.c'))
 pci_ss.add(when: 'CONFIG_RAVEN_PCI', if_true: files('raven.c'))
 pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c'))
 # NewWorld PowerMac
diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
index b2f47e6335..90a37ebff0 100644
--- a/hw/pci-host/trace-events
+++ b/hw/pci-host/trace-events
@@ -37,6 +37,10 @@ unin_data_read(uint64_t addr, unsigned len, uint64_t val) "read addr 0x%"PRIx64
 unin_write(uint64_t addr, uint64_t value) "addr=0x%" PRIx64 " val=0x%"PRIx64
 unin_read(uint64_t addr, uint64_t value) "addr=0x%" PRIx64 " val=0x%"PRIx64
 
+# ppc4xx_pci.c
+ppc4xx_pci_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
+ppc4xx_pci_set_irq(int irq_num) "PCI irq %d"
+
 # pnv_phb4.c
 pnv_phb4_xive_notify(uint64_t notif_port, uint64_t data) "notif=@0x%"PRIx64" data=0x%"PRIx64
 pnv_phb4_xive_notify_ic(uint64_t addr, uint64_t data) "addr=@0x%"PRIx64" data=0x%"PRIx64
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 44263a58c4..82e847d22c 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -53,7 +53,7 @@ config PPC440
 config PPC4XX
     bool
     select BITBANG_I2C
-    select PCI
+    select PPC4XX_PCI
     select PPC_UIC
 
 config SAM460EX
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index eba3406e7f..d0efc0aba5 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -63,7 +63,6 @@ ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
   'ppc440_pcix.c', 'ppc440_uc.c'))
 ppc_ss.add(when: 'CONFIG_PPC4XX', if_true: files(
   'ppc4xx_devs.c',
-  'ppc4xx_pci.c',
   'ppc4xx_sdram.c'))
 ppc_ss.add(when: 'CONFIG_SAM460EX', if_true: files('sam460ex.c'))
 # PReP
diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events
index f670e8906c..b59fbf340f 100644
--- a/hw/ppc/trace-events
+++ b/hw/ppc/trace-events
@@ -146,10 +146,6 @@ rs6000mc_size_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
 rs6000mc_size_write(uint32_t addr, uint32_t val) "write addr=0x%x val=0x%x"
 rs6000mc_parity_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
 
-# ppc4xx_pci.c
-ppc4xx_pci_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
-ppc4xx_pci_set_irq(int irq_num) "PCI irq %d"
-
 # ppc440_pcix.c
 ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
 ppc440_pcix_set_irq(int irq_num) "PCI irq %d"
-- 
2.41.0



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

* [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/
  2024-02-07  9:12 [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2024-02-07  9:12 ` [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/ Philippe Mathieu-Daudé
@ 2024-02-07  9:12 ` Philippe Mathieu-Daudé
  2024-02-07  9:46   ` Thomas Huth
  2024-02-07 12:33   ` BALATON Zoltan
  3 siblings, 2 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-07  9:12 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Nicholas Piggin, BALATON Zoltan, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza,
	Philippe Mathieu-Daudé

ppc440_pcix.c is moved from the target specific ppc_ss[] meson
source set to pci_ss[] which is common to all targets: the
object is built once.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 MAINTAINERS                        | 2 +-
 hw/{ppc => pci-host}/ppc440_pcix.c | 0
 hw/pci-host/Kconfig                | 4 ++++
 hw/pci-host/meson.build            | 1 +
 hw/pci-host/trace-events           | 8 ++++++++
 hw/ppc/Kconfig                     | 1 +
 hw/ppc/meson.build                 | 2 +-
 hw/ppc/trace-events                | 8 --------
 8 files changed, 16 insertions(+), 10 deletions(-)
 rename hw/{ppc => pci-host}/ppc440_pcix.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1927530c2d..42e63ed696 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1554,7 +1554,7 @@ L: qemu-ppc@nongnu.org
 S: Maintained
 F: hw/ppc/sam460ex.c
 F: hw/ppc/ppc440_uc.c
-F: hw/ppc/ppc440_pcix.c
+F: hw/pci-host/ppc440_pcix.c
 F: hw/display/sm501*
 F: hw/ide/sii3112.c
 F: hw/rtc/m41t80.c
diff --git a/hw/ppc/ppc440_pcix.c b/hw/pci-host/ppc440_pcix.c
similarity index 100%
rename from hw/ppc/ppc440_pcix.c
rename to hw/pci-host/ppc440_pcix.c
diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
index 0a221e719e..b348cacadb 100644
--- a/hw/pci-host/Kconfig
+++ b/hw/pci-host/Kconfig
@@ -10,6 +10,10 @@ config PPC4XX_PCI
     bool
     select PCI
 
+config PPC440_PCI
+    bool
+    select PCI
+
 config RAVEN_PCI
     bool
     select PCI
diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
index eb6dc71c88..83cf3a1783 100644
--- a/hw/pci-host/meson.build
+++ b/hw/pci-host/meson.build
@@ -15,6 +15,7 @@ pci_ss.add(when: 'CONFIG_SH_PCI', if_true: files('sh_pci.c'))
 
 # PPC devices
 pci_ss.add(when: 'CONFIG_PPC4XX_PCI', if_true: files('ppc4xx_pci.c'))
+pci_ss.add(when: 'CONFIG_PPC440_PCI', if_true: files('ppc440_pcix.c'))
 pci_ss.add(when: 'CONFIG_RAVEN_PCI', if_true: files('raven.c'))
 pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c'))
 # NewWorld PowerMac
diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
index 90a37ebff0..0a816b9aa1 100644
--- a/hw/pci-host/trace-events
+++ b/hw/pci-host/trace-events
@@ -41,6 +41,14 @@ unin_read(uint64_t addr, uint64_t value) "addr=0x%" PRIx64 " val=0x%"PRIx64
 ppc4xx_pci_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
 ppc4xx_pci_set_irq(int irq_num) "PCI irq %d"
 
+# ppc440_pcix.c
+ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
+ppc440_pcix_set_irq(int irq_num) "PCI irq %d"
+ppc440_pcix_update_pim(int idx, uint64_t size, uint64_t la) "Added window %d of size=0x%" PRIx64 " to CPU=0x%" PRIx64
+ppc440_pcix_update_pom(int idx, uint32_t size, uint64_t la, uint64_t pcia) "Added window %d of size=0x%x from CPU=0x%" PRIx64 " to PCI=0x%" PRIx64
+ppc440_pcix_reg_read(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
+ppc440_pcix_reg_write(uint64_t addr, uint32_t val, uint32_t size) "addr 0x%" PRIx64 " = 0x%" PRIx32 " size 0x%" PRIx32
+
 # pnv_phb4.c
 pnv_phb4_xive_notify(uint64_t notif_port, uint64_t data) "notif=@0x%"PRIx64" data=0x%"PRIx64
 pnv_phb4_xive_notify_ic(uint64_t addr, uint64_t data) "addr=@0x%"PRIx64" data=0x%"PRIx64
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 82e847d22c..2da6c16186 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -46,6 +46,7 @@ config PPC440
     imply TEST_DEVICES
     imply E1000_PCI
     select PCI_EXPRESS
+    select PPC440_PCI
     select PPC4XX
     select SERIAL
     select FDT_PPC
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index d0efc0aba5..da14fccce5 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -60,7 +60,7 @@ ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
   'ppc405_uc.c'))
 ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
   'ppc440_bamboo.c',
-  'ppc440_pcix.c', 'ppc440_uc.c'))
+  'ppc440_uc.c'))
 ppc_ss.add(when: 'CONFIG_PPC4XX', if_true: files(
   'ppc4xx_devs.c',
   'ppc4xx_sdram.c'))
diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events
index b59fbf340f..157ea756e9 100644
--- a/hw/ppc/trace-events
+++ b/hw/ppc/trace-events
@@ -146,14 +146,6 @@ rs6000mc_size_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
 rs6000mc_size_write(uint32_t addr, uint32_t val) "write addr=0x%x val=0x%x"
 rs6000mc_parity_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
 
-# ppc440_pcix.c
-ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
-ppc440_pcix_set_irq(int irq_num) "PCI irq %d"
-ppc440_pcix_update_pim(int idx, uint64_t size, uint64_t la) "Added window %d of size=0x%" PRIx64 " to CPU=0x%" PRIx64
-ppc440_pcix_update_pom(int idx, uint32_t size, uint64_t la, uint64_t pcia) "Added window %d of size=0x%x from CPU=0x%" PRIx64 " to PCI=0x%" PRIx64
-ppc440_pcix_reg_read(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
-ppc440_pcix_reg_write(uint64_t addr, uint32_t val, uint32_t size) "addr 0x%" PRIx64 " = 0x%" PRIx32 " size 0x%" PRIx32
-
 # ppc405_boards.c
 opba_readb(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
 opba_writeb(uint64_t addr, uint64_t val) "addr 0x%" PRIx64 " = 0x%" PRIx64
-- 
2.41.0



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

* Re: [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header
  2024-02-07  9:12 ` [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header Philippe Mathieu-Daudé
@ 2024-02-07  9:15   ` Thomas Huth
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-02-07  9:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Nicholas Piggin, BALATON Zoltan, qemu-ppc, Cédric Le Goater,
	Paolo Bonzini, Daniel Henrique Barboza

On 07/02/2024 10.12, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> Message-Id: <20231011132427.65001-2-philmd@linaro.org>
> ---
>   hw/ppc/ppc440_pcix.c | 1 -
>   hw/ppc/ppc4xx_pci.c  | 1 -
>   2 files changed, 2 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h
  2024-02-07  9:12 ` [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h Philippe Mathieu-Daudé
@ 2024-02-07  9:17   ` Thomas Huth
  2024-02-07 12:25   ` BALATON Zoltan
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-02-07  9:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Nicholas Piggin, BALATON Zoltan, qemu-ppc, Cédric Le Goater,
	Paolo Bonzini, Daniel Henrique Barboza

On 07/02/2024 10.12, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> Message-Id: <20231011132427.65001-3-philmd@linaro.org>
> ---
>   MAINTAINERS                  |  1 +
>   include/hw/pci-host/ppc4xx.h | 17 +++++++++++++++++
>   include/hw/ppc/ppc4xx.h      |  5 -----
>   hw/ppc/ppc440_bamboo.c       |  1 +
>   hw/ppc/ppc440_pcix.c         |  2 +-
>   hw/ppc/ppc440_uc.c           |  1 +
>   hw/ppc/ppc4xx_pci.c          |  2 +-
>   hw/ppc/sam460ex.c            |  1 +
>   8 files changed, 23 insertions(+), 7 deletions(-)
>   create mode 100644 include/hw/pci-host/ppc4xx.h

Reviewed-by: Thomas Huth <thuth@redhat.com>




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

* Re: [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/
  2024-02-07  9:12 ` [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/ Philippe Mathieu-Daudé
@ 2024-02-07  9:21   ` Thomas Huth
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-02-07  9:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Nicholas Piggin, BALATON Zoltan, qemu-ppc, Cédric Le Goater,
	Paolo Bonzini, Daniel Henrique Barboza

On 07/02/2024 10.12, Philippe Mathieu-Daudé wrote:
> ppc4xx_pci.c is moved from the target specific ppc_ss[] meson
> source set to pci_ss[] which is common to all targets: the
> object is built once.
> 
> Declare PPC4XX_PCI selector in pci-host/Kconfig.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   MAINTAINERS                       | 1 +
>   hw/{ppc => pci-host}/ppc4xx_pci.c | 0
>   hw/pci-host/ppce500.c             | 2 +-
>   hw/pci-host/Kconfig               | 4 ++++
>   hw/pci-host/meson.build           | 1 +
>   hw/pci-host/trace-events          | 4 ++++
>   hw/ppc/Kconfig                    | 2 +-
>   hw/ppc/meson.build                | 1 -
>   hw/ppc/trace-events               | 4 ----
>   9 files changed, 12 insertions(+), 7 deletions(-)
>   rename hw/{ppc => pci-host}/ppc4xx_pci.c (100%)

Reviewed-by: Thomas Huth <thuth@redhat.com>




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

* Re: [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/
  2024-02-07  9:12 ` [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c " Philippe Mathieu-Daudé
@ 2024-02-07  9:46   ` Thomas Huth
  2024-02-07 12:33   ` BALATON Zoltan
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2024-02-07  9:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Nicholas Piggin, BALATON Zoltan, qemu-ppc, Cédric Le Goater,
	Paolo Bonzini, Daniel Henrique Barboza

On 07/02/2024 10.12, Philippe Mathieu-Daudé wrote:
> ppc440_pcix.c is moved from the target specific ppc_ss[] meson
> source set to pci_ss[] which is common to all targets: the
> object is built once.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   MAINTAINERS                        | 2 +-
>   hw/{ppc => pci-host}/ppc440_pcix.c | 0
>   hw/pci-host/Kconfig                | 4 ++++
>   hw/pci-host/meson.build            | 1 +
>   hw/pci-host/trace-events           | 8 ++++++++
>   hw/ppc/Kconfig                     | 1 +
>   hw/ppc/meson.build                 | 2 +-
>   hw/ppc/trace-events                | 8 --------
>   8 files changed, 16 insertions(+), 10 deletions(-)
>   rename hw/{ppc => pci-host}/ppc440_pcix.c (100%)

Reviewed-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h
  2024-02-07  9:12 ` [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h Philippe Mathieu-Daudé
  2024-02-07  9:17   ` Thomas Huth
@ 2024-02-07 12:25   ` BALATON Zoltan
  1 sibling, 0 replies; 11+ messages in thread
From: BALATON Zoltan @ 2024-02-07 12:25 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Thomas Huth, Nicholas Piggin, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza

[-- Attachment #1: Type: text/plain, Size: 4166 bytes --]

On Wed, 7 Feb 2024, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
> Message-Id: <20231011132427.65001-3-philmd@linaro.org>
> ---
> MAINTAINERS                  |  1 +
> include/hw/pci-host/ppc4xx.h | 17 +++++++++++++++++
> include/hw/ppc/ppc4xx.h      |  5 -----
> hw/ppc/ppc440_bamboo.c       |  1 +
> hw/ppc/ppc440_pcix.c         |  2 +-
> hw/ppc/ppc440_uc.c           |  1 +
> hw/ppc/ppc4xx_pci.c          |  2 +-
> hw/ppc/sam460ex.c            |  1 +
> 8 files changed, 23 insertions(+), 7 deletions(-)
> create mode 100644 include/hw/pci-host/ppc4xx.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2f9741b898..b288f0dc76 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2068,6 +2068,7 @@ F: hw/ppc/ppc4xx*.c
> F: hw/ppc/ppc440_uc.c
> F: hw/ppc/ppc440.h
> F: hw/i2c/ppc4xx_i2c.c
> +F: include/hw/pci-host/ppc4xx.h
> F: include/hw/ppc/ppc4xx.h
> F: include/hw/i2c/ppc4xx_i2c.h
> F: hw/intc/ppc-uic.c
> diff --git a/include/hw/pci-host/ppc4xx.h b/include/hw/pci-host/ppc4xx.h
> new file mode 100644
> index 0000000000..dc36e1ea29
> --- /dev/null
> +++ b/include/hw/pci-host/ppc4xx.h
> @@ -0,0 +1,17 @@
> +/*
> + * QEMU PowerPC 4xx PCI-host definitions
> + *
> + * Copyright (c) 2007 Jocelyn Mayer
> + *
> + * SPDX-License-Identifier: MIT

Not that it matters much for simple definitions but these lines were added 
by me and I prefer GPLv2+.

Regards,
BALATON Zoltan

> + */
> +
> +#ifndef HW_PCIHOST_PPC4XX_H
> +#define HW_PCIHOST_PPC4XX_H
> +
> +#define TYPE_PPC4xx_HOST_BRIDGE "ppc4xx-host-bridge"
> +#define TYPE_PPC4xx_PCI_HOST "ppc4xx-pci-host"
> +#define TYPE_PPC440_PCIX_HOST "ppc440-pcix-host"
> +#define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host"
> +
> +#endif
> diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
> index ea7740239b..1bd9b8821b 100644
> --- a/include/hw/ppc/ppc4xx.h
> +++ b/include/hw/ppc/ppc4xx.h
> @@ -29,11 +29,6 @@
> #include "exec/memory.h"
> #include "hw/sysbus.h"
>
> -#define TYPE_PPC4xx_HOST_BRIDGE "ppc4xx-host-bridge"
> -#define TYPE_PPC4xx_PCI_HOST "ppc4xx-pci-host"
> -#define TYPE_PPC440_PCIX_HOST "ppc440-pcix-host"
> -#define TYPE_PPC460EX_PCIE_HOST "ppc460ex-pcie-host"
> -
> /*
>  * Generic DCR device
>  */
> diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
> index c75c3083e6..e18f57efce 100644
> --- a/hw/ppc/ppc440_bamboo.c
> +++ b/hw/ppc/ppc440_bamboo.c
> @@ -24,6 +24,7 @@
> #include "elf.h"
> #include "hw/char/serial.h"
> #include "hw/ppc/ppc.h"
> +#include "hw/pci-host/ppc4xx.h"
> #include "sysemu/sysemu.h"
> #include "sysemu/reset.h"
> #include "hw/sysbus.h"
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index d84418cb7b..1926ae2a27 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -25,7 +25,7 @@
> #include "qemu/module.h"
> #include "qemu/units.h"
> #include "hw/irq.h"
> -#include "hw/ppc/ppc4xx.h"
> +#include "hw/pci-host/ppc4xx.h"
> #include "hw/pci/pci_device.h"
> #include "hw/pci/pci_host.h"
> #include "trace.h"
> diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
> index 7d6ca70387..1312aa2080 100644
> --- a/hw/ppc/ppc440_uc.c
> +++ b/hw/ppc/ppc440_uc.c
> @@ -14,6 +14,7 @@
> #include "qemu/log.h"
> #include "hw/irq.h"
> #include "hw/ppc/ppc4xx.h"
> +#include "hw/pci-host/ppc4xx.h"
> #include "hw/qdev-properties.h"
> #include "hw/pci/pci.h"
> #include "sysemu/reset.h"
> diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
> index e4101398c9..b6c6c8993c 100644
> --- a/hw/ppc/ppc4xx_pci.c
> +++ b/hw/ppc/ppc4xx_pci.c
> @@ -24,7 +24,7 @@
> #include "qemu/osdep.h"
> #include "qemu/log.h"
> #include "hw/irq.h"
> -#include "hw/ppc/ppc4xx.h"
> +#include "hw/pci-host/ppc4xx.h"
> #include "migration/vmstate.h"
> #include "qemu/module.h"
> #include "sysemu/reset.h"
> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> index 1e615b8d35..a28498f39c 100644
> --- a/hw/ppc/sam460ex.c
> +++ b/hw/ppc/sam460ex.c
> @@ -25,6 +25,7 @@
> #include "elf.h"
> #include "exec/memory.h"
> #include "ppc440.h"
> +#include "hw/pci-host/ppc4xx.h"
> #include "hw/block/flash.h"
> #include "sysemu/sysemu.h"
> #include "sysemu/reset.h"
>

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

* Re: [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/
  2024-02-07  9:12 ` [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c " Philippe Mathieu-Daudé
  2024-02-07  9:46   ` Thomas Huth
@ 2024-02-07 12:33   ` BALATON Zoltan
  1 sibling, 0 replies; 11+ messages in thread
From: BALATON Zoltan @ 2024-02-07 12:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Thomas Huth, Nicholas Piggin, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Daniel Henrique Barboza

[-- Attachment #1: Type: text/plain, Size: 5768 bytes --]

On Wed, 7 Feb 2024, Philippe Mathieu-Daudé wrote:
> ppc440_pcix.c is moved from the target specific ppc_ss[] meson
> source set to pci_ss[] which is common to all targets: the
> object is built once.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> MAINTAINERS                        | 2 +-
> hw/{ppc => pci-host}/ppc440_pcix.c | 0
> hw/pci-host/Kconfig                | 4 ++++
> hw/pci-host/meson.build            | 1 +
> hw/pci-host/trace-events           | 8 ++++++++
> hw/ppc/Kconfig                     | 1 +
> hw/ppc/meson.build                 | 2 +-
> hw/ppc/trace-events                | 8 --------
> 8 files changed, 16 insertions(+), 10 deletions(-)
> rename hw/{ppc => pci-host}/ppc440_pcix.c (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1927530c2d..42e63ed696 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1554,7 +1554,7 @@ L: qemu-ppc@nongnu.org
> S: Maintained
> F: hw/ppc/sam460ex.c
> F: hw/ppc/ppc440_uc.c
> -F: hw/ppc/ppc440_pcix.c
> +F: hw/pci-host/ppc440_pcix.c
> F: hw/display/sm501*
> F: hw/ide/sii3112.c
> F: hw/rtc/m41t80.c
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/pci-host/ppc440_pcix.c
> similarity index 100%
> rename from hw/ppc/ppc440_pcix.c
> rename to hw/pci-host/ppc440_pcix.c
> diff --git a/hw/pci-host/Kconfig b/hw/pci-host/Kconfig
> index 0a221e719e..b348cacadb 100644
> --- a/hw/pci-host/Kconfig
> +++ b/hw/pci-host/Kconfig
> @@ -10,6 +10,10 @@ config PPC4XX_PCI
>     bool
>     select PCI
>
> +config PPC440_PCI

Maybe PPC440_PCIX to be consistent with the file name? There are different 
versions of these PCI hosts in different SoCs so I'm not sure there isn't 
another earlier one with is called just pci so better call this one pcix 
as it's referred to in the device tree so we don't need to rename it if 
another SoC with just PCI host is added later.

Regards,
BALATON Zoltan

> +    bool
> +    select PCI
> +
> config RAVEN_PCI
>     bool
>     select PCI
> diff --git a/hw/pci-host/meson.build b/hw/pci-host/meson.build
> index eb6dc71c88..83cf3a1783 100644
> --- a/hw/pci-host/meson.build
> +++ b/hw/pci-host/meson.build
> @@ -15,6 +15,7 @@ pci_ss.add(when: 'CONFIG_SH_PCI', if_true: files('sh_pci.c'))
>
> # PPC devices
> pci_ss.add(when: 'CONFIG_PPC4XX_PCI', if_true: files('ppc4xx_pci.c'))
> +pci_ss.add(when: 'CONFIG_PPC440_PCI', if_true: files('ppc440_pcix.c'))
> pci_ss.add(when: 'CONFIG_RAVEN_PCI', if_true: files('raven.c'))
> pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c'))
> # NewWorld PowerMac
> diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events
> index 90a37ebff0..0a816b9aa1 100644
> --- a/hw/pci-host/trace-events
> +++ b/hw/pci-host/trace-events
> @@ -41,6 +41,14 @@ unin_read(uint64_t addr, uint64_t value) "addr=0x%" PRIx64 " val=0x%"PRIx64
> ppc4xx_pci_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
> ppc4xx_pci_set_irq(int irq_num) "PCI irq %d"
>
> +# ppc440_pcix.c
> +ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
> +ppc440_pcix_set_irq(int irq_num) "PCI irq %d"
> +ppc440_pcix_update_pim(int idx, uint64_t size, uint64_t la) "Added window %d of size=0x%" PRIx64 " to CPU=0x%" PRIx64
> +ppc440_pcix_update_pom(int idx, uint32_t size, uint64_t la, uint64_t pcia) "Added window %d of size=0x%x from CPU=0x%" PRIx64 " to PCI=0x%" PRIx64
> +ppc440_pcix_reg_read(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
> +ppc440_pcix_reg_write(uint64_t addr, uint32_t val, uint32_t size) "addr 0x%" PRIx64 " = 0x%" PRIx32 " size 0x%" PRIx32
> +
> # pnv_phb4.c
> pnv_phb4_xive_notify(uint64_t notif_port, uint64_t data) "notif=@0x%"PRIx64" data=0x%"PRIx64
> pnv_phb4_xive_notify_ic(uint64_t addr, uint64_t data) "addr=@0x%"PRIx64" data=0x%"PRIx64
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 82e847d22c..2da6c16186 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -46,6 +46,7 @@ config PPC440
>     imply TEST_DEVICES
>     imply E1000_PCI
>     select PCI_EXPRESS
> +    select PPC440_PCI
>     select PPC4XX
>     select SERIAL
>     select FDT_PPC
> diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
> index d0efc0aba5..da14fccce5 100644
> --- a/hw/ppc/meson.build
> +++ b/hw/ppc/meson.build
> @@ -60,7 +60,7 @@ ppc_ss.add(when: 'CONFIG_PPC405', if_true: files(
>   'ppc405_uc.c'))
> ppc_ss.add(when: 'CONFIG_PPC440', if_true: files(
>   'ppc440_bamboo.c',
> -  'ppc440_pcix.c', 'ppc440_uc.c'))
> +  'ppc440_uc.c'))
> ppc_ss.add(when: 'CONFIG_PPC4XX', if_true: files(
>   'ppc4xx_devs.c',
>   'ppc4xx_sdram.c'))
> diff --git a/hw/ppc/trace-events b/hw/ppc/trace-events
> index b59fbf340f..157ea756e9 100644
> --- a/hw/ppc/trace-events
> +++ b/hw/ppc/trace-events
> @@ -146,14 +146,6 @@ rs6000mc_size_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
> rs6000mc_size_write(uint32_t addr, uint32_t val) "write addr=0x%x val=0x%x"
> rs6000mc_parity_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
>
> -# ppc440_pcix.c
> -ppc440_pcix_map_irq(int32_t devfn, int irq_num, int slot) "devfn 0x%x irq %d -> %d"
> -ppc440_pcix_set_irq(int irq_num) "PCI irq %d"
> -ppc440_pcix_update_pim(int idx, uint64_t size, uint64_t la) "Added window %d of size=0x%" PRIx64 " to CPU=0x%" PRIx64
> -ppc440_pcix_update_pom(int idx, uint32_t size, uint64_t la, uint64_t pcia) "Added window %d of size=0x%x from CPU=0x%" PRIx64 " to PCI=0x%" PRIx64
> -ppc440_pcix_reg_read(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
> -ppc440_pcix_reg_write(uint64_t addr, uint32_t val, uint32_t size) "addr 0x%" PRIx64 " = 0x%" PRIx32 " size 0x%" PRIx32
> -
> # ppc405_boards.c
> opba_readb(uint64_t addr, uint32_t val) "addr 0x%" PRIx64 " = 0x%" PRIx32
> opba_writeb(uint64_t addr, uint64_t val) "addr 0x%" PRIx64 " = 0x%" PRIx64
>

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

end of thread, other threads:[~2024-02-07 12:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  9:12 [PATCH v2 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once Philippe Mathieu-Daudé
2024-02-07  9:12 ` [PATCH v2 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header Philippe Mathieu-Daudé
2024-02-07  9:15   ` Thomas Huth
2024-02-07  9:12 ` [PATCH v2 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h Philippe Mathieu-Daudé
2024-02-07  9:17   ` Thomas Huth
2024-02-07 12:25   ` BALATON Zoltan
2024-02-07  9:12 ` [PATCH v2 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/ Philippe Mathieu-Daudé
2024-02-07  9:21   ` Thomas Huth
2024-02-07  9:12 ` [PATCH v2 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c " Philippe Mathieu-Daudé
2024-02-07  9:46   ` Thomas Huth
2024-02-07 12:33   ` BALATON Zoltan

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