1. 31 1月, 2020 1 次提交
  2. 25 1月, 2020 1 次提交
  3. 16 8月, 2019 3 次提交
    • M
      Include hw/qdev-properties.h less · a27bd6c7
      Markus Armbruster 提交于
      In my "build everything" tree, changing hw/qdev-properties.h triggers
      a recompile of some 2700 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Many places including hw/qdev-properties.h (directly or via hw/qdev.h)
      actually need only hw/qdev-core.h.  Include hw/qdev-core.h there
      instead.
      
      hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h
      and hw/qdev-properties.h, which in turn includes hw/qdev-core.h.
      Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h.
      
      While there, delete a few superfluous inclusions of hw/qdev-core.h.
      
      Touching hw/qdev-properties.h now recompiles some 1200 objects.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Daniel P. Berrangé" <berrange@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20190812052359.30071-22-armbru@redhat.com>
      a27bd6c7
    • M
      Include migration/vmstate.h less · d6454270
      Markus Armbruster 提交于
      In my "build everything" tree, changing migration/vmstate.h triggers a
      recompile of some 2700 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      hw/hw.h supposedly includes it for convenience.  Several other headers
      include it just to get VMStateDescription.  The previous commit made
      that unnecessary.
      
      Include migration/vmstate.h only where it's still needed.  Touching it
      now recompiles only some 1600 objects.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-16-armbru@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      d6454270
    • M
      Include hw/irq.h a lot less · 64552b6b
      Markus Armbruster 提交于
      In my "build everything" tree, changing hw/irq.h triggers a recompile
      of some 5400 out of 6600 objects (not counting tests and objects that
      don't depend on qemu/osdep.h).
      
      hw/hw.h supposedly includes it for convenience.  Several other headers
      include it just to get qemu_irq and.or qemu_irq_handler.
      
      Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
      qemu/typedefs.h, and then include hw/irq.h only where it's still
      needed.  Touching it now recompiles only some 500 objects.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@wdc.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190812052359.30071-13-armbru@redhat.com>
      64552b6b
  4. 12 6月, 2019 1 次提交
  5. 15 6月, 2018 1 次提交
    • P
      hw/core/or-irq: Support more than 16 inputs to an OR gate · f81804a5
      Peter Maydell 提交于
      For the IoTKit MPC support, we need to wire together the
      interrupt outputs of 17 MPCs; this exceeds the current
      value of MAX_OR_LINES. Increase MAX_OR_LINES to 32 (which
      should be enough for anyone).
      
      The tricky part is retaining the migration compatibility for
      existing OR gates; we add a subsection which is only used
      for larger OR gates, and define it such that we can freely
      increase MAX_OR_LINES in future (or even move to a dynamically
      allocated levels[] array without an upper size limit) without
      breaking compatibility.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 20180604152941.20374-10-peter.maydell@linaro.org
      f81804a5
  6. 17 5月, 2017 1 次提交
    • E
      qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable · e90f2a8c
      Eduardo Habkost 提交于
      cannot_instantiate_with_device_add_yet was introduced by commit
      efec3dd6 to replace no_user. It was
      supposed to be a temporary measure.
      
      When it was introduced, we had 54
      cannot_instantiate_with_device_add_yet=true lines in the code.
      Today (3 years later) this number has not shrunk: we now have
      57 cannot_instantiate_with_device_add_yet=true lines. I think it
      is safe to say it is not a temporary measure, and we won't see
      the flag go away soon.
      
      Instead of a long field name that misleads people to believe it
      is temporary, replace it a shorter and less misleading field:
      user_creatable.
      
      Except for code comments, changes were generated using the
      following Coccinelle patch:
      
        @@
        expression DC;
        @@
        (
        -DC->cannot_instantiate_with_device_add_yet = false;
        +DC->user_creatable = true;
        |
        -DC->cannot_instantiate_with_device_add_yet = true;
        +DC->user_creatable = false;
        )
      
        @@
        typedef ObjectClass;
        expression dc;
        identifier class, data;
        @@
         static void device_class_init(ObjectClass *class, void *data)
         {
         ...
         dc->hotpluggable = true;
        +dc->user_creatable = true;
         ...
         }
      
        @@
        @@
         struct DeviceClass {
         ...
        -bool cannot_instantiate_with_device_add_yet;
        +bool user_creatable;
         ...
        }
      
        @@
        expression DC;
        @@
        (
        -!DC->cannot_instantiate_with_device_add_yet
        +DC->user_creatable
        |
        -DC->cannot_instantiate_with_device_add_yet
        +!DC->user_creatable
        )
      
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Thomas Huth <thuth@redhat.com>
      Acked-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-2-ehabkost@redhat.com>
      [ehabkost: kept "TODO remove once we're there" comment]
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e90f2a8c
  7. 28 2月, 2017 1 次提交
  8. 04 10月, 2016 1 次提交