Skip to contentSkip to conversation

memory: Print region priority

PATCH Applied Jan Kiszka 3 participants 4 messages Sep 27, 2011 – Oct 2, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/3 memory: Print region priority

Useful to discover eclipses.

---

PS: Current memory/master requires an obvious build fix (central definition of some types), but I assume you already have a patch in your tree.

 memory.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
memory.c +4 -2
index b1724fe..4c190e5 100644
@@ -1370,18 +1370,20 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f,
             ml->printed = false;
             QTAILQ_INSERT_TAIL(print_queue, ml, queue);
         }
-        mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " : alias %s @%s "
+        mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d): alias %s @%s "
                    TARGET_FMT_plx "-" TARGET_FMT_plx "\n",
                    base + mr->addr,
                    base + mr->addr + (target_phys_addr_t)mr->size - 1,
+                   mr->priority,
                    mr->name,
                    mr->alias->name,
                    mr->alias_offset,
                    mr->alias_offset + (target_phys_addr_t)mr->size - 1);
     } else {
-        mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " : %s\n",
+        mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d): %s\n",
                    base + mr->addr,
                    base + mr->addr + (target_phys_addr_t)mr->size - 1,
+                   mr->priority,
                    mr->name);
     }
     QTAILQ_FOREACH(submr, &mr->subregions, subregions_link) {
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 9 lines · Jan Kiszka

Useful to discover eclipses.

---

PS: Current memory/master requires an obvious build fix (central definition of some types), but I assume you already have a patch in your tree.

No, doesn't happen here.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw

PATCH 1/1 memory: Push typedefs into qemu-common

From: Jan Kiszka <[email protected]>

There is a circular dependency between memory.h and ioport.h /wrt type definitions now. Resolve it by pushing MemoryRegion and MemoryRegionPortio typedefs into qemu-common.h.

---
 ioport.h      |    3 ---
 memory.h      |    2 --
 qemu-common.h |    2 ++
 3 files changed, 2 insertions(+), 5 deletions(-)
ioport.h +0 -3
index 968cc23..f1bd663 100644
@@ -52,9 +52,6 @@ uint8_t cpu_inb(pio_addr_t addr);
 uint16_t cpu_inw(pio_addr_t addr);
 uint32_t cpu_inl(pio_addr_t addr);
 
-typedef struct MemoryRegion MemoryRegion;
-typedef struct MemoryRegionPortio MemoryRegionPortio;
-
 typedef struct PortioList {
     const MemoryRegionPortio *ports;
     MemoryRegion *address_space;
memory.h +0 -2
index d77c1f1..275404a 100644
@@ -26,8 +26,6 @@
 #include "ioport.h"
 
 typedef struct MemoryRegionOps MemoryRegionOps;
-typedef struct MemoryRegion MemoryRegion;
-typedef struct MemoryRegionPortio MemoryRegionPortio;
 typedef struct MemoryRegionMmio MemoryRegionMmio;
 
 /* Must match *_DIRTY_FLAGS in cpu-all.h.  To be replaced with dynamic
qemu-common.h +2 -0
index 5e87bdf..8cb26f6 100644
@@ -264,6 +264,8 @@ typedef struct SSIBus SSIBus;
 typedef struct EventNotifier EventNotifier;
 typedef struct VirtIODevice VirtIODevice;
 typedef struct QEMUSGList QEMUSGList;
+typedef struct MemoryRegion MemoryRegion;
+typedef struct MemoryRegionPortio MemoryRegionPortio;
 
 typedef uint64_t pcibus_t;
 
#3 lore raw

Re: [Qemu-devel] [PATCH] memory: Push typedefs into qemu-common

Quoted 7 lines · Jan Kiszka

From: Jan Kiszka<[email protected]>

There is a circular dependency between memory.h and ioport.h /wrt type definitions now. Resolve it by pushing MemoryRegion and MemoryRegionPortio typedefs into qemu-common.h.

Yuck. I'll just change PortioList to say 'struct MemoryRegion'.

I'm still surprised I don't see it.

Signature · 1 line
error compiling committee.c: too many arguments to function