Skip to contentSkip to conversation

Random cleanup patches

PATCH Applied Bernhard Beschow 4 participants 22 messages May 20, 2022 – Jun 3, 2022

lore
Share & tools
lore
#0 lore raw

v2 cover Random cleanup patches

v2:
* Omit removal of isa_connect_gpio_out() (Mark)

v1:
This patch series contains random cleanups that I made while studying the code.

Bernhard Beschow (10):
hw: Reuse TYPE_I8042 define
hw/audio/cs4231a: Const'ify global tables
hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/i386/pc: Unexport functions used only internally hw/i386/pc: Remove orphan declarations
hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create() accel/tcg/cpu-exec: Unexport dump_drift_info() accel/tcg: Inline dump_opcount_info() and remove it docs/devel: Fix link to developer mailing lists

 accel/tcg/cpu-exec.c              |  4 ++--
 accel/tcg/translate-all.c         |  5 -----
 docs/devel/submitting-a-patch.rst |  6 +++---
 hw/audio/cs4231a.c                |  8 ++++----
 hw/i386/pc.c                      | 17 +++++++++++++----
 hw/net/fsl_etsec/etsec.c          | 23 -----------------------
 hw/net/fsl_etsec/etsec.h          |  7 -------
 hw/ppc/e500.c                     |  1 -
 hw/sparc64/sun4u.c                |  2 +-
 include/exec/cpu-all.h            |  3 ---
 include/hw/i386/pc.h              | 14 --------------
 11 files changed, 23 insertions(+), 67 deletions(-)
Signature · 1 line
2.36.1
#1 lore raw

PATCH v2 1/10 hw: Reuse TYPE_I8042 define

TYPE_I8042 is exported, so reuse it for consistency.

---
 hw/i386/pc.c       | 4 ++--
 hw/sparc64/sun4u.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
hw/i386/pc.c +2 -2
index 7c39c91335..c914ac0154 100644
@@ -1088,7 +1088,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl,
         return;
     }
 
-    i8042 = isa_create_simple(isa_bus, "i8042");
+    i8042 = isa_create_simple(isa_bus, TYPE_I8042);
     if (!no_vmport) {
         isa_create_simple(isa_bus, TYPE_VMPORT);
         vmmouse = isa_try_new("vmmouse");
@@ -1096,7 +1096,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl,
         vmmouse = NULL;
     }
     if (vmmouse) {
-        object_property_set_link(OBJECT(vmmouse), "i8042", OBJECT(i8042),
+        object_property_set_link(OBJECT(vmmouse), TYPE_I8042, OBJECT(i8042),
                                  &error_abort);
         isa_realize_and_unref(vmmouse, isa_bus, &error_fatal);
     }
hw/sparc64/sun4u.c +1 -1
index d1bc77d27e..0e27715ac4 100644
@@ -334,7 +334,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
     parallel_hds_isa_init(s->isa_bus, MAX_PARALLEL_PORTS);
 
     /* Keyboard */
-    isa_create_simple(s->isa_bus, "i8042");
+    isa_create_simple(s->isa_bus, TYPE_I8042);
 
     /* Floppy */
     for (i = 0; i < MAX_FD; i++) {
Signature · 1 line
2.36.1
Reviewed-by on v2 1/10
#2 lore raw

Re: [PATCH v2 01/10] hw: Reuse TYPE_I8042 define

Quoted 36 lines · Bernhard Beschow

TYPE_I8042 is exported, so reuse it for consistency.

---
  hw/i386/pc.c       | 4 ++--
  hw/sparc64/sun4u.c | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
hw/i386/pc.c +2 -2
index 7c39c91335..c914ac0154 100644
@@ -1088,7 +1088,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl,
          return;
      }
 
-    i8042 = isa_create_simple(isa_bus, "i8042");
+    i8042 = isa_create_simple(isa_bus, TYPE_I8042);
      if (!no_vmport) {
          isa_create_simple(isa_bus, TYPE_VMPORT);
          vmmouse = isa_try_new("vmmouse");
@@ -1096,7 +1096,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl,
          vmmouse = NULL;
      }
      if (vmmouse) {
-        object_property_set_link(OBJECT(vmmouse), "i8042", OBJECT(i8042),
+        object_property_set_link(OBJECT(vmmouse), TYPE_I8042, OBJECT(i8042),
                                   &error_abort);
          isa_realize_and_unref(vmmouse, isa_bus, &error_fatal);
      }
hw/sparc64/sun4u.c +0 -0
index d1bc77d27e..0e27715ac4 100644

hw/sparc64/sun4u.c static void ebus_realize(PCIDevice *pci_dev, Error **errp) · line 340

Quoted 8 lines
hw/sparc64/sun4u.c +1 -1
@@ -334,7 +334,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp)
      parallel_hds_isa_init(s->isa_bus, MAX_PARALLEL_PORTS);
 
      /* Keyboard */
-    isa_create_simple(s->isa_bus, "i8042");
+    isa_create_simple(s->isa_bus, TYPE_I8042);
 
      /* Floppy */
      for (i = 0; i < MAX_FD; i++) {

ATB,

Mark.

#3 lore raw

PATCH v2 2/10 hw/audio/cs4231a: Const'ify global tables

In reply to Bernhard Beschow

The tables contain spcifically crafted constants for algorithms, so make them immutable.

---
 hw/audio/cs4231a.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
hw/audio/cs4231a.c +4 -4
index 0723e39430..7f17a72a9c 100644
@@ -84,7 +84,7 @@ struct CSState {
     int transferred;
     int aci_counter;
     SWVoiceOut *voice;
-    int16_t *tab;
+    const int16_t *tab;
 };
 
 #define MODE2 (1 << 6)
@@ -142,13 +142,13 @@ enum {
     Capture_Lower_Base_Count
 };
 
-static int freqs[2][8] = {
+static const int freqs[2][8] = {
     { 8000, 16000, 27420, 32000,    -1,    -1, 48000, 9000 },
     { 5510, 11025, 18900, 22050, 37800, 44100, 33075, 6620 }
 };
 
 /* Tables courtesy http://hazelware.luggle.com/tutorials/mulawcompression.html */
-static int16_t MuLawDecompressTable[256] =
+static const int16_t MuLawDecompressTable[256] =
 {
      -32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
      -23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
@@ -184,7 +184,7 @@ static int16_t MuLawDecompressTable[256] =
          56,    48,    40,    32,    24,    16,     8,     0
 };
 
-static int16_t ALawDecompressTable[256] =
+static const int16_t ALawDecompressTable[256] =
 {
      -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
      -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
Signature · 1 line
2.36.1
#4 lore raw

PATCH v2 3/10 hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro

In reply to Bernhard Beschow

The macro seems to be used only internally, so remove it.

---
 hw/i386/pc.c         | 9 +++++++++
 include/hw/i386/pc.h | 8 --------
 2 files changed, 9 insertions(+), 8 deletions(-)
hw/i386/pc.c +9 -0
index c914ac0154..2ffaac52fb 100644
@@ -96,6 +96,15 @@
 #include "trace.h"
 #include CONFIG_DEVICES
 
+/*
+ * Helper for setting model-id for CPU models that changed model-id
+ * depending on QEMU versions up to QEMU 2.4.
+ */
+#define PC_CPU_MODEL_IDS(v) \
+    { "qemu32-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
+    { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
+    { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },
+
 GlobalProperty pc_compat_7_0[] = {};
 const size_t pc_compat_7_0_len = G_N_ELEMENTS(pc_compat_7_0);
 
include/hw/i386/pc.h +0 -8
index ffcac5121e..38be346a13 100644
@@ -287,14 +287,6 @@ extern const size_t pc_compat_1_5_len;
 extern GlobalProperty pc_compat_1_4[];
 extern const size_t pc_compat_1_4_len;
 
-/* Helper for setting model-id for CPU models that changed model-id
- * depending on QEMU versions up to QEMU 2.4.
- */
-#define PC_CPU_MODEL_IDS(v) \
-    { "qemu32-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
-    { "qemu64-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },\
-    { "athlon-" TYPE_X86_CPU, "model-id", "QEMU Virtual CPU version " v, },
-
 #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
     static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
     { \
Signature · 1 line
2.36.1
#5 lore raw

PATCH v2 4/10 hw/i386/pc: Unexport functions used only internally

In reply to Bernhard Beschow
---
 hw/i386/pc.c         | 4 ++--
 include/hw/i386/pc.h | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)
hw/i386/pc.c +2 -2
index 2ffaac52fb..d7583045a0 100644
@@ -570,7 +570,7 @@ static const char * const fdc_container_path[] = {
  * Locate the FDC at IO address 0x3f0, in order to configure the CMOS registers
  * and ACPI objects.
  */
-ISADevice *pc_find_fdc0(void)
+static ISADevice *pc_find_fdc0(void)
 {
     int i;
     Object *container;
@@ -714,7 +714,7 @@ static const int ne2000_io[NE2000_NB_MAX] = { 0x300, 0x320, 0x340, 0x360,
                                               0x280, 0x380 };
 static const int ne2000_irq[NE2000_NB_MAX] = { 9, 10, 11, 3, 4, 5 };
 
-void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd)
+static void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd)
 {
     static int nb_ne2k = 0;
 
include/hw/i386/pc.h +0 -3
index 38be346a13..cb491fc43b 100644
@@ -166,7 +166,6 @@ void pc_basic_device_init(struct PCMachineState *pcms,
                           ISADevice **rtc_state,
                           bool create_fdctrl,
                           uint32_t hpet_irqs);
-void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
 void pc_cmos_init(PCMachineState *pcms,
                   BusState *ide0, BusState *ide1,
                   ISADevice *s);
@@ -177,8 +176,6 @@ typedef void (*cpu_set_smm_t)(int smm, void *arg);
 
 void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
 
-ISADevice *pc_find_fdc0(void);
-
 /* port92.c */
 #define PORT92_A20_LINE "a20"
 
Signature · 1 line
2.36.1
#6 lore raw

PATCH v2 5/10 hw/i386/pc: Remove orphan declarations

In reply to Bernhard Beschow
---
 include/hw/i386/pc.h | 3 ---
 1 file changed, 3 deletions(-)
include/hw/i386/pc.h +0 -3
index cb491fc43b..9c1d1c0a7c 100644
@@ -170,9 +170,6 @@ void pc_cmos_init(PCMachineState *pcms,
                   BusState *ide0, BusState *ide1,
                   ISADevice *s);
 void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus);
-void pc_pci_device_init(PCIBus *pci_bus);
-
-typedef void (*cpu_set_smm_t)(int smm, void *arg);
 
 void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs);
 
Signature · 1 line
2.36.1
#7 lore raw

PATCH v2 6/10 hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE

In reply to Bernhard Beschow

Commit 28290f37e20cda27574f15be9e9499493e3d0fe8 'PPC: E500: Generate device tree on reset' improved device tree generation and made BINARY_DEVICE_TREE_FILE obsolete.

---
 hw/ppc/e500.c | 1 -
 1 file changed, 1 deletion(-)
hw/ppc/e500.c +0 -1
index 2bc3dce1fb..7f7f5b3452 100644
@@ -47,7 +47,6 @@
 #include "hw/irq.h"
 
 #define EPAPR_MAGIC                (0x45504150)
-#define BINARY_DEVICE_TREE_FILE    "mpc8544ds.dtb"
 #define DTC_LOAD_PAD               0x1800000
 #define DTC_PAD_MASK               0xFFFFF
 #define DTB_MAX_SIZE               (8 * MiB)
Signature · 1 line
2.36.1
#8 lore raw

Re: [PATCH v2 06/10] hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE

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

Daniel

Quoted 22 lines · Bernhard Beschow

Commit 28290f37e20cda27574f15be9e9499493e3d0fe8 'PPC: E500: Generate device tree on reset' improved device tree generation and made BINARY_DEVICE_TREE_FILE obsolete.

---
  hw/ppc/e500.c | 1 -
  1 file changed, 1 deletion(-)
hw/ppc/e500.c +0 -1
index 2bc3dce1fb..7f7f5b3452 100644
@@ -47,7 +47,6 @@
  #include "hw/irq.h"
 
  #define EPAPR_MAGIC                (0x45504150)
-#define BINARY_DEVICE_TREE_FILE    "mpc8544ds.dtb"
  #define DTC_LOAD_PAD               0x1800000
  #define DTC_PAD_MASK               0xFFFFF
  #define DTB_MAX_SIZE               (8 * MiB)
#9 lore raw

PATCH v2 7/10 hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()

In reply to Bernhard Beschow

etsec_create() wraps qdev API which is outdated. It is also unused, so remove it.

---
 hw/net/fsl_etsec/etsec.c | 23 -----------------------
 hw/net/fsl_etsec/etsec.h |  7 -------
 2 files changed, 30 deletions(-)
hw/net/fsl_etsec/etsec.c +0 -23
index 4e6cc708de..b75d8e3dce 100644
@@ -443,26 +443,3 @@ static void etsec_register_types(void)
 }
 
 type_init(etsec_register_types)
-
-DeviceState *etsec_create(hwaddr         base,
-                          MemoryRegion * mr,
-                          NICInfo      * nd,
-                          qemu_irq       tx_irq,
-                          qemu_irq       rx_irq,
-                          qemu_irq       err_irq)
-{
-    DeviceState *dev;
-
-    dev = qdev_new("eTSEC");
-    qdev_set_nic_properties(dev, nd);
-    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, tx_irq);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 1, rx_irq);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 2, err_irq);
-
-    memory_region_add_subregion(mr, base,
-                                SYS_BUS_DEVICE(dev)->mmio[0].memory);
-
-    return dev;
-}
hw/net/fsl_etsec/etsec.h +0 -7
index fddf551544..3c625c955c 100644
@@ -155,13 +155,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(eTSEC, ETSEC_COMMON)
 #define eTSEC_TRANSMIT 1
 #define eTSEC_RECEIVE  2
 
-DeviceState *etsec_create(hwaddr        base,
-                          MemoryRegion *mr,
-                          NICInfo      *nd,
-                          qemu_irq      tx_irq,
-                          qemu_irq      rx_irq,
-                          qemu_irq      err_irq);
-
 void etsec_update_irq(eTSEC *etsec);
 
 void etsec_walk_tx_ring(eTSEC *etsec, int ring_nbr);
Signature · 1 line
2.36.1
Reviewed-by on v2 7/10
#10 lore raw

Re: [PATCH v2 07/10] hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()

Quoted 49 lines · Bernhard Beschow

etsec_create() wraps qdev API which is outdated. It is also unused, so remove it.

---
  hw/net/fsl_etsec/etsec.c | 23 -----------------------
  hw/net/fsl_etsec/etsec.h |  7 -------
  2 files changed, 30 deletions(-)
hw/net/fsl_etsec/etsec.c +0 -23
index 4e6cc708de..b75d8e3dce 100644
@@ -443,26 +443,3 @@ static void etsec_register_types(void)
  }
 
  type_init(etsec_register_types)
-
-DeviceState *etsec_create(hwaddr         base,
-                          MemoryRegion * mr,
-                          NICInfo      * nd,
-                          qemu_irq       tx_irq,
-                          qemu_irq       rx_irq,
-                          qemu_irq       err_irq)
-{
-    DeviceState *dev;
-
-    dev = qdev_new("eTSEC");
-    qdev_set_nic_properties(dev, nd);
-    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, tx_irq);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 1, rx_irq);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 2, err_irq);
-
-    memory_region_add_subregion(mr, base,
-                                SYS_BUS_DEVICE(dev)->mmio[0].memory);
-
-    return dev;
-}
hw/net/fsl_etsec/etsec.h +0 -0
index fddf551544..3c625c955c 100644
@@ -155,13 +155,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(eTSEC, ETSEC_COMMON)
  #define eTSEC_TRANSMIT 1
  #define eTSEC_RECEIVE  2
 

hw/net/fsl_etsec/etsec.h OBJECT_DECLARE_SIMPLE_TYPE(eTSEC, ETSEC_COMMON) · line 160

Quoted 10 lines
hw/net/fsl_etsec/etsec.h +0 -7
-DeviceState *etsec_create(hwaddr        base,
-                          MemoryRegion *mr,
-                          NICInfo      *nd,
-                          qemu_irq      tx_irq,
-                          qemu_irq      rx_irq,
-                          qemu_irq      err_irq);
-
  void etsec_update_irq(eTSEC *etsec);
 
  void etsec_walk_tx_ring(eTSEC *etsec, int ring_nbr);

ATB,

Mark.

#11 lore raw

PATCH v2 8/10 accel/tcg/cpu-exec: Unexport dump_drift_info()

In reply to Bernhard Beschow

Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce x-query-jit QMP command' basically moved the only function using dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't need to be exported any longer.

---
 accel/tcg/cpu-exec.c   | 2 +-
 include/exec/cpu-all.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
accel/tcg/cpu-exec.c +1 -1
index 635aeecc0a..7cbf9996b7 100644
@@ -1048,7 +1048,7 @@ void tcg_exec_unrealizefn(CPUState *cpu)
 
 #ifndef CONFIG_USER_ONLY
 
-void dump_drift_info(GString *buf)
+static void dump_drift_info(GString *buf)
 {
     if (!icount_enabled()) {
         return;
include/exec/cpu-all.h +0 -2
index 5d5290deb5..9a716be80d 100644
@@ -419,8 +419,6 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr)
 }
 
 #ifdef CONFIG_TCG
-/* accel/tcg/cpu-exec.c */
-void dump_drift_info(GString *buf);
 /* accel/tcg/translate-all.c */
 void dump_exec_info(GString *buf);
 void dump_opcount_info(GString *buf);
Signature · 1 line
2.36.1
#12 lore raw

Re: [PATCH v2 08/10] accel/tcg/cpu-exec: Unexport dump_drift_info()

Am 20. Mai 2022 18:01:07 UTC schrieb Bernhard Beschow <[email protected]>:

Quoted 29 lines

Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce x-query-jit QMP command' basically moved the only function using dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't need to be exported any longer.

---
accel/tcg/cpu-exec.c | 2 +-
include/exec/cpu-all.h | 2 --

2 files changed, 1 insertion(+), 3 deletions(-)
accel/tcg/cpu-exec.c +1 -1
index 635aeecc0a..7cbf9996b7 100644
@@ -1048,7 +1048,7 @@ void tcg_exec_unrealizefn(CPUState *cpu)
 
 #ifndef CONFIG_USER_ONLY
 
-void dump_drift_info(GString *buf)
+static void dump_drift_info(GString *buf)
 {
    if (!icount_enabled()) {
        return;
include/exec/cpu-all.h +0 -0
index 5d5290deb5..9a716be80d 100644

include/exec/cpu-all.h static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr) · line 424

Quoted 8 lines
include/exec/cpu-all.h +0 -2
@@ -419,8 +419,6 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr)
 }
 
 #ifdef CONFIG_TCG
-/* accel/tcg/cpu-exec.c */
-void dump_drift_info(GString *buf);
 /* accel/tcg/translate-all.c */
 void dump_exec_info(GString *buf);
 void dump_opcount_info(GString *buf);

Ping

Reviewed-by Philippe Mathieu-Daudé on v2 8/10
#13 lore raw

Re: [PATCH v2 08/10] accel/tcg/cpu-exec: Unexport dump_drift_info()

In reply to Bernhard Beschow
Quoted 10 lines · Bernhard Beschow

Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce x-query-jit QMP command' basically moved the only function using dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't need to be exported any longer.

---
  accel/tcg/cpu-exec.c   | 2 +-
  include/exec/cpu-all.h | 2 --
  2 files changed, 1 insertion(+), 3 deletions(-)
#14 lore raw

PATCH v2 9/10 accel/tcg: Inline dump_opcount_info() and remove it

In reply to Bernhard Beschow

dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() which is also exported. So use the latter directly.

---
 accel/tcg/cpu-exec.c      | 2 +-
 accel/tcg/translate-all.c | 5 -----
 include/exec/cpu-all.h    | 1 -
 3 files changed, 1 insertion(+), 7 deletions(-)
accel/tcg/cpu-exec.c +1 -1
index 7cbf9996b7..a565a3f8ec 100644
@@ -1091,7 +1091,7 @@ HumanReadableText *qmp_x_query_opcount(Error **errp)
         return NULL;
     }
 
-    dump_opcount_info(buf);
+    tcg_dump_op_count(buf);
 
     return human_readable_text_from_str(buf);
 }
accel/tcg/translate-all.c +0 -5
index 291034cb09..8fd23a9d05 100644
@@ -2124,11 +2124,6 @@ void dump_exec_info(GString *buf)
     tcg_dump_info(buf);
 }
 
-void dump_opcount_info(GString *buf)
-{
-    tcg_dump_op_count(buf);
-}
-
 #else /* CONFIG_USER_ONLY */
 
 void cpu_interrupt(CPUState *cpu, int mask)
include/exec/cpu-all.h +0 -1
index 9a716be80d..f5bda2c3ca 100644
@@ -421,7 +421,6 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr)
 #ifdef CONFIG_TCG
 /* accel/tcg/translate-all.c */
 void dump_exec_info(GString *buf);
-void dump_opcount_info(GString *buf);
 #endif /* CONFIG_TCG */
 
 #endif /* !CONFIG_USER_ONLY */
Signature · 1 line
2.36.1
#15 lore raw

Re: [PATCH v2 09/10] accel/tcg: Inline dump_opcount_info() and remove it

Am 20. Mai 2022 18:01:08 UTC schrieb Bernhard Beschow <[email protected]>:

Quoted 44 lines

dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() which is also exported. So use the latter directly.

---

accel/tcg/cpu-exec.c      | 2 +-
accel/tcg/translate-all.c | 5 -----
include/exec/cpu-all.h    | 1 -
3 files changed, 1 insertion(+), 7 deletions(-)
accel/tcg/cpu-exec.c +1 -1
index 7cbf9996b7..a565a3f8ec 100644
@@ -1091,7 +1091,7 @@ HumanReadableText *qmp_x_query_opcount(Error **errp)
        return NULL;
    }
 
-    dump_opcount_info(buf);
+    tcg_dump_op_count(buf);
 
    return human_readable_text_from_str(buf);
 }
accel/tcg/translate-all.c +0 -5
index 291034cb09..8fd23a9d05 100644
@@ -2124,11 +2124,6 @@ void dump_exec_info(GString *buf)
    tcg_dump_info(buf);
 }
 
-void dump_opcount_info(GString *buf)
-{
-    tcg_dump_op_count(buf);
-}
-
 #else /* CONFIG_USER_ONLY */
 
 void cpu_interrupt(CPUState *cpu, int mask)
include/exec/cpu-all.h +0 -0
index 9a716be80d..f5bda2c3ca 100644

include/exec/cpu-all.h static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr) · line 426

Quoted 7 lines
include/exec/cpu-all.h +0 -1
@@ -421,7 +421,6 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr)
 #ifdef CONFIG_TCG
 /* accel/tcg/translate-all.c */
 void dump_exec_info(GString *buf);
-void dump_opcount_info(GString *buf);
 #endif /* CONFIG_TCG */
 
 #endif /* !CONFIG_USER_ONLY */

Ping

Reviewed-by Philippe Mathieu-Daudé on v2 9/10
#16 lore raw

Re: [PATCH v2 09/10] accel/tcg: Inline dump_opcount_info() and remove it

In reply to Bernhard Beschow
Quoted 9 lines · Bernhard Beschow

dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() which is also exported. So use the latter directly.

---
  accel/tcg/cpu-exec.c      | 2 +-
  accel/tcg/translate-all.c | 5 -----
  include/exec/cpu-all.h    | 1 -
  3 files changed, 1 insertion(+), 7 deletions(-)
#17 lore raw

PATCH v2 10/10 docs/devel: Fix link to developer mailing lists

In reply to Bernhard Beschow

Ammends commit 9f73de8df0335c9387f4ee39e207a65a1615676f 'docs: rSTify the "SubmitAPatch" wiki'.

---
 docs/devel/submitting-a-patch.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
docs/devel/submitting-a-patch.rst +3 -3
index e51259eb9c..21ed52bd82 100644
@@ -18,9 +18,9 @@ one-shot fix, the bare minimum we ask is that:
    <http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297>`__
    policy.) ``git commit -s`` or ``git format-patch -s`` will add one.
 -  All contributions to QEMU must be **sent as patches** to the
-   qemu-devel `mailing list <MailingLists>`__. Patch contributions
-   should not be posted on the bug tracker, posted on forums, or
-   externally hosted and linked to. (We have other mailing lists too,
+   qemu-devel `mailing list <https://wiki.qemu.org/Contribute/MailingLists>`__.
+   Patch contributions should not be posted on the bug tracker, posted on
+   forums, or externally hosted and linked to. (We have other mailing lists too,
    but all patches must go to qemu-devel, possibly with a Cc: to another
    list.) ``git send-email`` (`step-by-step setup
    guide <https://git-send-email.io/>`__ and `hints and
Signature · 1 line
2.36.1
#18 lore raw

Re: [PATCH v2 10/10] docs/devel: Fix link to developer mailing lists

Am 20. Mai 2022 18:01:09 UTC schrieb Bernhard Beschow <[email protected]>:

Quoted 16 lines

Ammends commit 9f73de8df0335c9387f4ee39e207a65a1615676f 'docs: rSTify the "SubmitAPatch" wiki'.

---
docs/devel/submitting-a-patch.rst | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
docs/devel/submitting-a-patch.rst +0 -0
index e51259eb9c..21ed52bd82 100644
@@ -18,9 +18,9 @@ one-shot fix, the bare minimum we ask is that:
   <http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297>`__
   policy.) ``git commit -s`` or ``git format-patch -s`` will add one.

docs/devel/submitting-a-patch.rst one-shot fix, the bare minimum we ask is that: · line 25

Quoted 10 lines
docs/devel/submitting-a-patch.rst +3 -4
-  All contributions to QEMU must be **sent as patches** to the
-   qemu-devel `mailing list <MailingLists>`__. Patch contributions
-   should not be posted on the bug tracker, posted on forums, or
-   externally hosted and linked to. (We have other mailing lists too,
+   qemu-devel `mailing list <https://wiki.qemu.org/Contribute/MailingLists>`__.
+   Patch contributions should not be posted on the bug tracker, posted on
+   forums, or externally hosted and linked to. (We have other mailing lists too,
   but all patches must go to qemu-devel, possibly with a Cc: to another
   list.) ``git send-email`` (`step-by-step setup
   guide <https://git-send-email.io/>`__ and `hints and

Ping

Acked-by on the v2 series
#19 lore raw
In reply to Bernhard Beschow
Quoted 18 lines · Bernhard Beschow

v2:
* Omit removal of isa_connect_gpio_out() (Mark)

v1:
This patch series contains random cleanups that I made while studying the code.

Bernhard Beschow (10):
hw: Reuse TYPE_I8042 define
hw/audio/cs4231a: Const'ify global tables
hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/i386/pc: Unexport functions used only internally hw/i386/pc: Remove orphan declarations
hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create() accel/tcg/cpu-exec: Unexport dump_drift_info() accel/tcg: Inline dump_opcount_info() and remove it docs/devel: Fix link to developer mailing lists

Quoted 12 lines
  accel/tcg/cpu-exec.c              |  4 ++--
  accel/tcg/translate-all.c         |  5 -----
  docs/devel/submitting-a-patch.rst |  6 +++---
  hw/audio/cs4231a.c                |  8 ++++----
  hw/i386/pc.c                      | 17 +++++++++++++----
  hw/net/fsl_etsec/etsec.c          | 23 -----------------------
  hw/net/fsl_etsec/etsec.h          |  7 -------
  hw/ppc/e500.c                     |  1 -
  hw/sparc64/sun4u.c                |  2 +-
  include/exec/cpu-all.h            |  3 ---
  include/hw/i386/pc.h              | 14 --------------
  11 files changed, 23 insertions(+), 67 deletions(-)

In general these changes look okay, so I'd be fine to give an:

for those I haven't already given a Reviewed-by tag for.

Laurent, are you happy to take these patches with their current tags via qemu-trivial? Or would you prefer an extra set of eyes on the two accel/tcg ones first?

ATB,

Mark.

#20 lore raw
Quoted 33 lines · Mark Cave-Ayland
Quoted 29 lines · Bernhard Beschow

v2:
* Omit removal of isa_connect_gpio_out() (Mark)

v1:
This patch series contains random cleanups that I made while studying the code.

Bernhard Beschow (10):
   hw: Reuse TYPE_I8042 define
   hw/audio/cs4231a: Const'ify global tables
   hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/i386/pc: Unexport functions used only internally hw/i386/pc: Remove orphan declarations
   hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create() accel/tcg/cpu-exec: Unexport dump_drift_info() accel/tcg: Inline dump_opcount_info() and remove it docs/devel: Fix link to developer mailing lists

  accel/tcg/cpu-exec.c              |  4 ++-- accel/tcg/translate-all.c         |  5 ----- docs/devel/submitting-a-patch.rst |  6 +++--- hw/audio/cs4231a.c                |  8 ++++---- hw/i386/pc.c                      | 17 +++++++++++++---- hw/net/fsl_etsec/etsec.c          | 23 ----------------------- hw/net/fsl_etsec/etsec.h          |  7 ------- hw/ppc/e500.c                     |  1 - hw/sparc64/sun4u.c                |  2 +- include/exec/cpu-all.h            |  3 --- include/hw/i386/pc.h              | 14 --------------

Quoted 1 line
  11 files changed, 23 insertions(+), 67 deletions(-)
Quoted 7 lines

In general these changes look okay, so I'd be fine to give an:

for those I haven't already given a Reviewed-by tag for.

Laurent, are you happy to take these patches with their current tags via qemu-trivial? Or would you prefer an extra set of eyes on the two accel/tcg ones first?

BTW I'll send a PR later this week and I was about to queue patch 06 (hw/ppc/e500 change) via the ppc tree. Let me know if you want to queue the whole series via qemu-trivial instead.

Thanks,

Daniel

Quoted 6 lines

ATB,

Mark.

#21 lore raw
In reply to Mark Cave-Ayland
Quoted 36 lines · Mark Cave-Ayland
Quoted 5 lines · Bernhard Beschow

v2:
* Omit removal of isa_connect_gpio_out() (Mark)

v1:
This patch series contains random cleanups that I made while studying

the code.

Quoted 13 lines

Bernhard Beschow (10):
hw: Reuse TYPE_I8042 define
hw/audio/cs4231a: Const'ify global tables
hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro hw/i386/pc: Unexport functions used only internally hw/i386/pc: Remove orphan declarations
hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create() accel/tcg/cpu-exec: Unexport dump_drift_info() accel/tcg: Inline dump_opcount_info() and remove it docs/devel: Fix link to developer mailing lists

Quoted 12 lines
  accel/tcg/cpu-exec.c              |  4 ++--
  accel/tcg/translate-all.c         |  5 -----
  docs/devel/submitting-a-patch.rst |  6 +++---
  hw/audio/cs4231a.c                |  8 ++++----
  hw/i386/pc.c                      | 17 +++++++++++++----
  hw/net/fsl_etsec/etsec.c          | 23 -----------------------
  hw/net/fsl_etsec/etsec.h          |  7 -------
  hw/ppc/e500.c                     |  1 -
  hw/sparc64/sun4u.c                |  2 +-
  include/exec/cpu-all.h            |  3 ---
  include/hw/i386/pc.h              | 14 --------------
  11 files changed, 23 insertions(+), 67 deletions(-)

In general these changes look okay, so I'd be fine to give an:

Quoted 8 lines

for those I haven't already given a Reviewed-by tag for.

Laurent, are you happy to take these patches with their current tags via qemu-trivial? Or would you prefer an extra set of eyes on the two accel/tcg ones first?

Ping

Quoted 4 lines

ATB,

Mark.