qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/11] sun4u: rename apb variables and constants


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [PATCH 07/11] sun4u: rename apb variables and constants
Date: Mon, 15 Jan 2018 18:26:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 14/01/18 13:20, Philippe Mathieu-Daudé wrote:
Hi Mark,

On 01/14/2018 07:47 AM, Mark Cave-Ayland wrote:
In order to reflect the previous change of TYPE_APB to TYPE_SABRE, update
the corresponding variable names to keep the terminology consistent.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
  hw/sparc64/sun4u.c | 41 +++++++++++++++++++++--------------------
  1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index b8f685847a..fb18afaaa6 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -55,9 +55,9 @@
  #define CMDLINE_ADDR         0x003ff000
  #define PROM_SIZE_MAX        (4 * 1024 * 1024)
  #define PROM_VADDR           0x000ffd00000ULL
-#define APB_SPECIAL_BASE     0x1fe00000000ULL
-#define APB_MEM_BASE         0x1ff00000000ULL
-#define APB_PCI_IO_BASE      (APB_SPECIAL_BASE + 0x02000000ULL)
+#define PBM_SPECIAL_BASE     0x1fe00000000ULL
+#define PBM_MEM_BASE         0x1ff00000000ULL
+#define PBM_PCI_IO_BASE      (PBM_SPECIAL_BASE + 0x02000000ULL)
  #define PROM_FILENAME        "openbios-sparc64"
  #define NVRAM_SIZE           0x2000
  #define MAX_IDE_BUS          2
@@ -465,7 +465,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
      Nvram *nvram;
      unsigned int i;
      uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry;
-    SabreState *apb;
+    SabreState *sabre;
      PCIBus *pci_bus, *pci_busA, *pci_busB;
      PCIDevice *ebus, *pci_dev;
      SysBusDevice *s;
@@ -489,23 +489,24 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
      prom_init(hwdef->prom_addr, bios_name);
/* Init sabre (PCI host bridge) */
-    apb = SABRE_DEVICE(qdev_create(NULL, TYPE_SABRE));
-    qdev_prop_set_uint64(DEVICE(apb), "special-base", APB_SPECIAL_BASE);
-    qdev_prop_set_uint64(DEVICE(apb), "mem-base", APB_MEM_BASE);
-    object_property_set_link(OBJECT(apb), OBJECT(iommu), "iommu", 
&error_abort);
-    qdev_init_nofail(DEVICE(apb));
+    sabre = SABRE_DEVICE(qdev_create(NULL, TYPE_SABRE));
+    qdev_prop_set_uint64(DEVICE(sabre), "special-base", PBM_SPECIAL_BASE);
+    qdev_prop_set_uint64(DEVICE(sabre), "mem-base", PBM_MEM_BASE);
+    object_property_set_link(OBJECT(sabre), OBJECT(iommu), "iommu",
+                             &error_abort);
+    qdev_init_nofail(DEVICE(sabre));
/* Wire up PCI interrupts to CPU */
      for (i = 0; i < IVEC_MAX; i++) {
-        qdev_connect_gpio_out_named(DEVICE(apb), "ivec-irq", i,
+        qdev_connect_gpio_out_named(DEVICE(sabre), "ivec-irq", i,
              qdev_get_gpio_in_named(DEVICE(cpu), "ivec-irq", i));
      }
- pci_bus = PCI_HOST_BRIDGE(apb)->bus;
-    pci_busA = pci_bridge_get_sec_bus(apb->bridgeA);
-    pci_busB = pci_bridge_get_sec_bus(apb->bridgeB);
+    pci_bus = PCI_HOST_BRIDGE(sabre)->bus;
+    pci_busA = pci_bridge_get_sec_bus(sabre->bridgeA);
+    pci_busB = pci_bridge_get_sec_bus(sabre->bridgeB);
- /* Only in-built Simba PBMs can exist on the root bus, slot 0 on busA is
+    /* Only in-built Simba APBs can exist on the root bus, slot 0 on busA is

This single change might go in patch #2 instead.

Anyway:
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Hi Philippe,

I did think about that, but it feels a bit cleaner to keep all the sun4u changes in one place (see the change to the constants and the other comments within the file).


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]