qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] d17052: hw/s390x/s390-pci-inst.c: Use device_


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] d17052: hw/s390x/s390-pci-inst.c: Use device_cold_reset() ...
Date: Sat, 17 Dec 2022 13:19:00 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d170529d56170e401b559a1e6b053c2138b852cb
      
https://github.com/qemu/qemu/commit/d170529d56170e401b559a1e6b053c2138b852cb
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  hw/s390x/s390-pci-inst.c: Use device_cold_reset() to reset PCI devices

The semantic difference between the deprecated device_legacy_reset()
function and the newer device_cold_reset() function is that the new
function resets both the device itself and any qbuses it owns,
whereas the legacy function resets just the device itself and nothing
else.

In s390-pci-inst.c we use device_legacy_reset() to reset an
S390PCIBusDevice.  This device doesn't have any child qbuses, so the
functions do the same thing and we can stop using the deprecated one.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 78e4d5cbaf472c60ebf0516816b2a38a78b48b0b
      
https://github.com/qemu/qemu/commit/78e4d5cbaf472c60ebf0516816b2a38a78b48b0b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/pci/pci.c
    M hw/pci/pci_bridge.c

  Log Message:
  -----------
  pci: Use device_cold_reset() and bus_cold_reset()

In the PCI subsystem we currently use the legacy function
qdev_reset_all() and qbus_reset_all().  These perform a recursive
reset, starting from either a qbus or a qdev.  However they do not
permit any of the devices in the tree to use three-phase reset,
because device reset goes through the device_legacy_reset() function
that only calls the single DeviceClass::reset method.

Switch to using the device_cold_reset() and bus_cold_reset()
functions.  These also perform a recursive reset, where first the
children are reset and then finally the parent, but they use the new
(...in 2020...) Resettable mechanism, which supports both the old
style single-reset method and also the new 3-phase reset handling.

This should be a no-behaviour-change commit which just reduces the
use of a deprecated API.

Commit created with:
 sed -i -e 
's/qdev_reset_all/device_cold_reset/g;s/qbus_reset_all/bus_cold_reset/g' 
hw/pci/*.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 8cadd251b0212adaa3fc6bb278bcb0800840ac18
      
https://github.com/qemu/qemu/commit/8cadd251b0212adaa3fc6bb278bcb0800840ac18
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/hyperv/vmbus.c

  Log Message:
  -----------
  hw/hyperv/vmbus: Use device_cold_reset() and bus_cold_reset()

In the vmbus code we currently use the legacy functions
qdev_reset_all() and qbus_reset_all().  These perform a recursive
reset, starting from either a qbus or a qdev.  However they do not
permit any of the devices in the tree to use three-phase reset,
because device reset goes through the device_legacy_reset() function
that only calls the single DeviceClass::reset method.

Switch to using the device_cold_reset() and bus_cold_reset()
functions.  These also perform a recursive reset, where first the
children are reset and then finally the parent, but they use the new
(...in 2020...) Resettable mechanism, which supports both the old
style single-reset method and also the new 3-phase reset handling.

This should be a no-behaviour-change commit which just reduces the
use of a deprecated API.

Commit created with:
  sed -i -e 
's/qdev_reset_all/device_cold_reset/g;s/qbus_reset_all/bus_cold_reset/g' 
hw/hyperv/*.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: dfa6ba6baeebe25e3299c050e20a5a6755888cbf
      
https://github.com/qemu/qemu/commit/dfa6ba6baeebe25e3299c050e20a5a6755888cbf
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/i386/xen/xen_platform.c
    M hw/input/adb.c
    M hw/remote/vfio-user-obj.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/usb/dev-uas.c

  Log Message:
  -----------
  Replace use of qdev_reset_all() with device_cold_reset()

The legacy function qdev_reset_all() performs a recursive reset,
starting from a qdev.  However, it does not permit any of the devices
in the tree to use three-phase reset, because device reset goes
through the device_legacy_reset() function that only calls the single
DeviceClass::reset method.

Switch to using the device_cold_reset() function instead.  This also
performs a recursive reset, where first the children are reset and
then finally the parent, but it uses the new (...in 2020...)
Resettable mechanism, which supports both the old style single-reset
method and also the new 3-phase reset handling.

This commit changes the five remaining uses of this function.

Commit created with:
 sed -i -e 's/qdev_reset_all/device_cold_reset/g' hw/i386/xen/xen_platform.c 
hw/input/adb.c hw/remote/vfio-user-obj.c hw/s390x/s390-virtio-ccw.c 
hw/usb/dev-uas.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: e5e887c73b2201d80aff6780a8908ec0e86d7407
      
https://github.com/qemu/qemu/commit/e5e887c73b2201d80aff6780a8908ec0e86d7407
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/core/qdev.c
    M hw/core/trace-events
    M include/hw/qdev-core.h

  Log Message:
  -----------
  qdev: Remove qdev_reset_all() and qbus_reset_all()

Remove the qdev_reset_all() and qbus_reset_all() functions, now we
have moved all the callers over to the new device_cold_reset() and
bus_cold_reset() functions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c3141e21e3904408a527e9bbd08b8622f4ef8072
      
https://github.com/qemu/qemu/commit/c3141e21e3904408a527e9bbd08b8622f4ef8072
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/core/qdev.c
    M hw/core/trace-events
    M include/hw/qdev-core.h

  Log Message:
  -----------
  hw: Remove device_legacy_reset()

The device_legacy_reset() function is now not used anywhere, so we
can remove the implementation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 2bb3f9303706387a044fa68341550c676376055f
      
https://github.com/qemu/qemu/commit/2bb3f9303706387a044fa68341550c676376055f
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/input/ps2.c

  Log Message:
  -----------
  hw/input/ps2: Convert TYPE_PS2_DEVICE to 3-phase reset

Convert the parent class TYPE_PS2_DEVICE to 3-phase reset.  Note that
we need an 'exit' phase function as well as the usual 'hold' phase
function, because changing outbound IRQ line state is only permitted
in 'exit'.  (Strictly speaking it's not supposed to be done in a
legacy reset handler either, but you can often get away with it.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221109170009.3498451-2-peter.maydell@linaro.org


  Commit: fc2fc3c1eda8286eb890fe7e0896d20c80ac4e7b
      
https://github.com/qemu/qemu/commit/fc2fc3c1eda8286eb890fe7e0896d20c80ac4e7b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/input/ps2.c
    M include/hw/input/ps2.h

  Log Message:
  -----------
  hw/input/ps2.c: Convert TYPE_PS2_{KBD, MOUSE}_DEVICE to 3-phase reset

Convert the child classes TYPE_PS2_KBD_DEVICE and
TYPE_PS2_MOUSE_DEVICE to the 3-phase reset system.  This allows us to
stop using the old device_class_set_parent_reset() function.

We don't need to register an 'exit' phase function for the
subclasses, because they have no work to do in that phase.  Passing
NULL to resettable_class_set_parent_phases() will result in the
parent class method being called for that phase, so we don't need to
register a function purely to chain to the parent 'exit' phase
function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221109170009.3498451-3-peter.maydell@linaro.org


  Commit: 8bdaed0f30ef8e8fb04d7909d7b9639bf98ce454
      
https://github.com/qemu/qemu/commit/8bdaed0f30ef8e8fb04d7909d7b9639bf98ce454
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/misc/mos6522.c

  Log Message:
  -----------
  hw/misc/mos6522: Convert TYPE_MOS6522 to 3-phase reset

Convert the TYPE_MOS6522 parent class to use 3-phase reset.  This is
a prerequisite for converting its subclasses.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221110143459.3833425-2-peter.maydell@linaro.org


  Commit: ed053e899799fe7b32797f484de34869b9d26b3f
      
https://github.com/qemu/qemu/commit/ed053e899799fe7b32797f484de34869b9d26b3f
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/misc/mac_via.c
    M hw/misc/macio/cuda.c
    M hw/misc/macio/pmu.c
    M include/hw/misc/mos6522.h

  Log Message:
  -----------
  hw/misc: Convert TYPE_MOS6522 subclasses to 3-phase reset

Convert the various subclasses of TYPE_MOS6522 to 3-phase reset.
This removes some uses of device_class_set_parent_reset(), which we
would eventually like to be able to get rid of.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221110143459.3833425-3-peter.maydell@linaro.org


  Commit: 3b750f1b1aa6b6835853badddee6613515ab0530
      
https://github.com/qemu/qemu/commit/3b750f1b1aa6b6835853badddee6613515ab0530
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/core/cpu-common.c

  Log Message:
  -----------
  hw/core/cpu-common: Convert TYPE_CPU class to 3-phase reset

Convert the parent class TYPE_CPU to 3-phase reset. This
is a necessary prerequisite to converting the subclasses.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20221124115023.2437291-2-peter.maydell@linaro.org


  Commit: 9130cade5fc22d11eb05493737439918f501b752
      
https://github.com/qemu/qemu/commit/9130cade5fc22d11eb05493737439918f501b752
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/arm/cpu-qom.h
    M target/arm/cpu.c

  Log Message:
  -----------
  target/arm: Convert to 3-phase reset

Convert the Arm CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20221124115023.2437291-3-peter.maydell@linaro.org


  Commit: 605787606eb24918b266a71319143430974db2de
      
https://github.com/qemu/qemu/commit/605787606eb24918b266a71319143430974db2de
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/avr/cpu-qom.h
    M target/avr/cpu.c

  Log Message:
  -----------
  target/avr: Convert to 3-phase reset

Convert the avr CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20221124115023.2437291-4-peter.maydell@linaro.org


  Commit: 1d2eb1c0c5f9ca0720bec29d5f16d3242c0d1afd
      
https://github.com/qemu/qemu/commit/1d2eb1c0c5f9ca0720bec29d5f16d3242c0d1afd
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/cris/cpu-qom.h
    M target/cris/cpu.c

  Log Message:
  -----------
  target/cris: Convert to 3-phase reset

Convert the cris CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Message-id: 20221124115023.2437291-5-peter.maydell@linaro.org


  Commit: ab85156d8aaaa2b301fe16efee35df8a35f2b33d
      
https://github.com/qemu/qemu/commit/ab85156d8aaaa2b301fe16efee35df8a35f2b33d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/hexagon/cpu.c
    M target/hexagon/cpu.h

  Log Message:
  -----------
  target/hexagon: Convert to 3-phase reset

Convert the hexagon CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-6-peter.maydell@linaro.org


  Commit: e86787d33baac07f4a8bf22c4ed253f11fae167e
      
https://github.com/qemu/qemu/commit/e86787d33baac07f4a8bf22c4ed253f11fae167e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/i386/cpu-qom.h
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: Convert to 3-phase reset

Convert the i386 CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-7-peter.maydell@linaro.org


  Commit: f78b49ae8dd900f90d8e650c09d6bc4b489ea11c
      
https://github.com/qemu/qemu/commit/f78b49ae8dd900f90d8e650c09d6bc4b489ea11c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/loongarch/cpu.c
    M target/loongarch/cpu.h

  Log Message:
  -----------
  target/loongarch: Convert to 3-phase reset

Convert the loongarch CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-8-peter.maydell@linaro.org


  Commit: bf90b345d7229861c5d0cfc8404bb5a3b766ddec
      
https://github.com/qemu/qemu/commit/bf90b345d7229861c5d0cfc8404bb5a3b766ddec
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/m68k/cpu-qom.h
    M target/m68k/cpu.c

  Log Message:
  -----------
  target/m68k: Convert to 3-phase reset

Convert the m68k CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-9-peter.maydell@linaro.org


  Commit: d4bc6c1a795217c0fccc10b817d43f6ae062d072
      
https://github.com/qemu/qemu/commit/d4bc6c1a795217c0fccc10b817d43f6ae062d072
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/microblaze/cpu-qom.h
    M target/microblaze/cpu.c

  Log Message:
  -----------
  target/microblaze: Convert to 3-phase reset

Convert the microblaze CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-10-peter.maydell@linaro.org


  Commit: c08dfb7ae2bd1a5a22e452c8172a8131778fe77c
      
https://github.com/qemu/qemu/commit/c08dfb7ae2bd1a5a22e452c8172a8131778fe77c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/mips/cpu-qom.h
    M target/mips/cpu.c

  Log Message:
  -----------
  target/mips: Convert to 3-phase reset

Convert the mips CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-11-peter.maydell@linaro.org


  Commit: 4245a71662648b804ccc19163f44f75d6e92dcad
      
https://github.com/qemu/qemu/commit/4245a71662648b804ccc19163f44f75d6e92dcad
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/nios2/cpu.c
    M target/nios2/cpu.h

  Log Message:
  -----------
  target/nios2: Convert to 3-phase reset

Convert the nios2 CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-12-peter.maydell@linaro.org


  Commit: 040975047972b68f1cd06358e5fe4a144f90bee9
      
https://github.com/qemu/qemu/commit/040975047972b68f1cd06358e5fe4a144f90bee9
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/openrisc/cpu.c
    M target/openrisc/cpu.h

  Log Message:
  -----------
  target/openrisc: Convert to 3-phase reset

Convert the openrisc CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id: 20221124115023.2437291-13-peter.maydell@linaro.org


  Commit: a1c5d644b77b9e5c2639e7c7a6257398d72fc81d
      
https://github.com/qemu/qemu/commit/a1c5d644b77b9e5c2639e7c7a6257398d72fc81d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/ppc/cpu-qom.h
    M target/ppc/cpu_init.c

  Log Message:
  -----------
  target/ppc: Convert to 3-phase reset

Convert the ppc CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-id: 20221124115023.2437291-14-peter.maydell@linaro.org


  Commit: 4fa485a78e7e887afccdd183602cfb117cf05659
      
https://github.com/qemu/qemu/commit/4fa485a78e7e887afccdd183602cfb117cf05659
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/riscv/cpu.c
    M target/riscv/cpu.h

  Log Message:
  -----------
  target/riscv: Convert to 3-phase reset

Convert the riscv CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-id: 20221124115023.2437291-15-peter.maydell@linaro.org


  Commit: 88c41e4082c01b0b06fb6d781e154deb1a4a2c83
      
https://github.com/qemu/qemu/commit/88c41e4082c01b0b06fb6d781e154deb1a4a2c83
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/rx/cpu-qom.h
    M target/rx/cpu.c

  Log Message:
  -----------
  target/rx: Convert to 3-phase reset

Convert the rx CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-id: 20221124115023.2437291-16-peter.maydell@linaro.org


  Commit: 90493830024ded23e7f9d3b383edbe74b05a6c75
      
https://github.com/qemu/qemu/commit/90493830024ded23e7f9d3b383edbe74b05a6c75
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/sh4/cpu-qom.h
    M target/sh4/cpu.c

  Log Message:
  -----------
  target/sh4: Convert to 3-phase reset

Convert the sh4 CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-id: 20221124115023.2437291-17-peter.maydell@linaro.org


  Commit: 3b4fff1bd5333f98b2138f1a874c70b15ae3710c
      
https://github.com/qemu/qemu/commit/3b4fff1bd5333f98b2138f1a874c70b15ae3710c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/sparc/cpu-qom.h
    M target/sparc/cpu.c

  Log Message:
  -----------
  target/sparc: Convert to 3-phase reset

Convert the sparc CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20221124115023.2437291-18-peter.maydell@linaro.org


  Commit: efcc10682e8a1feda4c6b2766cb7067e58f75135
      
https://github.com/qemu/qemu/commit/efcc10682e8a1feda4c6b2766cb7067e58f75135
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/tricore/cpu-qom.h
    M target/tricore/cpu.c

  Log Message:
  -----------
  target/tricore: Convert to 3-phase reset

Convert the tricore CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20221124115023.2437291-19-peter.maydell@linaro.org


  Commit: d66e64dd006dfbc08f5395e1ca674903d46fa601
      
https://github.com/qemu/qemu/commit/d66e64dd006dfbc08f5395e1ca674903d46fa601
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M target/xtensa/cpu-qom.h
    M target/xtensa/cpu.c

  Log Message:
  -----------
  target/xtensa: Convert to 3-phase reset

Convert the xtensa CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20221124115023.2437291-20-peter.maydell@linaro.org


  Commit: 54da41834fc8d19004ab2401074b3f70d518aef0
      
https://github.com/qemu/qemu/commit/54da41834fc8d19004ab2401074b3f70d518aef0
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/virtio/virtio-pci.c

  Log Message:
  -----------
  hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset

Convert the TYPE_VIRTIO_PCI class to 3-phase reset.  This is
necessary so that we can convert the subclass TYPE_VIRTIO_VGA_BASE
also to 3-phase reset.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-2-peter.maydell@linaro.org


  Commit: 0d898904668f806cea474077eb2b7fa53b3ef4e0
      
https://github.com/qemu/qemu/commit/0d898904668f806cea474077eb2b7fa53b3ef4e0
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/display/virtio-vga.c
    M hw/display/virtio-vga.h

  Log Message:
  -----------
  hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset

Convert the TYPE_VIRTIO_VGA_BASE class to 3-phase reset, so we
don't need to use device_class_set_parent_reset() any more.

Note that this is an abstract class itself; none of the subclasses
override its reset method.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-3-peter.maydell@linaro.org


  Commit: bb27210c8cb8c246b221dad178a3e04566d38e3d
      
https://github.com/qemu/qemu/commit/bb27210c8cb8c246b221dad178a3e04566d38e3d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/pci-bridge/pcie_root_port.c

  Log Message:
  -----------
  pci: Convert TYPE_PCIE_ROOT_PORT to 3-phase reset

Convert the TYPE_PCIE_ROOT_PORT device to 3-phase reset; this is a
necessary precursor to converting any of its child classes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-4-peter.maydell@linaro.org


  Commit: f4c636b0c2f53531e16e018b6e096d26b5809dfd
      
https://github.com/qemu/qemu/commit/f4c636b0c2f53531e16e018b6e096d26b5809dfd
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/pci-bridge/cxl_root_port.c
    M hw/pci-host/pnv_phb.c
    M include/hw/pci/pcie_port.h

  Log Message:
  -----------
  pci: Convert child classes of TYPE_PCIE_ROOT_PORT to 3-phase reset

Convert the TYPE_CXL_ROOT_PORT and TYPE_PNV_PHB_ROOT_PORT classes to
3-phase reset, so they don't need to use the deprecated
device_class_set_parent_reset() function any more.

We have to do both in the same commit, because they keep the
parent_reset field in their common parent class's class struct.

Note that pnv_phb_root_port_class_init() was pointlessly setting
dc->reset twice, once by calling device_class_set_parent_reset()
and once directly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-5-peter.maydell@linaro.org


  Commit: 36cdc8b3b87b8a42933b1987ad00cbe1c1a6f6d8
      
https://github.com/qemu/qemu/commit/36cdc8b3b87b8a42933b1987ad00cbe1c1a6f6d8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/intc/xics.c
    M hw/pci-host/pnv_phb3_msi.c

  Log Message:
  -----------
  hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

The realize method for the TYPE_ICS class uses qemu_register_reset()
to register a reset handler, as a workaround for the fact that
currently objects which directly inherit from TYPE_DEVICE don't get
automatically reset.  However, the reset function directly calls
ics_reset(), which is the function that implements the legacy reset
method.  This means that only the parent class's data gets reset, and
a subclass which also needs to handle reset, like TYPE_PHB3_MSI, has
to register its own reset function.

Make the TYPE_ICS reset function call device_cold_reset() instead:
this will handle reset for both the parent class and the subclass,
and will work whether the classes are using legacy reset or 3-phase
reset. This allows us to remove the reset function that the subclass
currently has to set up.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-6-peter.maydell@linaro.org


  Commit: a359da4c62a59d400c3081160b1105e2fd8e719e
      
https://github.com/qemu/qemu/commit/a359da4c62a59d400c3081160b1105e2fd8e719e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/intc/xics.c

  Log Message:
  -----------
  hw/intc/xics: Convert TYPE_ICS to 3-phase reset

Convert the TYPE_ICS class to 3-phase reset; this will allow us
to convert the TYPE_PHB3_MSI class which inherits from it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-7-peter.maydell@linaro.org


  Commit: a0c2e80afc98a9771b109eb5ce0b47edd7c78155
      
https://github.com/qemu/qemu/commit/a0c2e80afc98a9771b109eb5ce0b47edd7c78155
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M hw/pci-host/pnv_phb3_msi.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset

Convert the TYPE_PHB3_MSI class to 3-phase reset, so we can
avoid using the device_class_set_parent_reset() function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20221125115240.3005559-8-peter.maydell@linaro.org


  Commit: 55745005e90a9deabd3d7900e13fc850f26f9d62
      
https://github.com/qemu/qemu/commit/55745005e90a9deabd3d7900e13fc850f26f9d62
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-17 (Sat, 17 Dec 2022)

  Changed paths:
    M hw/core/cpu-common.c
    M hw/core/qdev.c
    M hw/core/trace-events
    M hw/display/virtio-vga.c
    M hw/display/virtio-vga.h
    M hw/hyperv/vmbus.c
    M hw/i386/xen/xen_platform.c
    M hw/input/adb.c
    M hw/input/ps2.c
    M hw/intc/xics.c
    M hw/misc/mac_via.c
    M hw/misc/macio/cuda.c
    M hw/misc/macio/pmu.c
    M hw/misc/mos6522.c
    M hw/pci-bridge/cxl_root_port.c
    M hw/pci-bridge/pcie_root_port.c
    M hw/pci-host/pnv_phb.c
    M hw/pci-host/pnv_phb3_msi.c
    M hw/pci/pci.c
    M hw/pci/pci_bridge.c
    M hw/remote/vfio-user-obj.c
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/usb/dev-uas.c
    M hw/virtio/virtio-pci.c
    M include/hw/input/ps2.h
    M include/hw/misc/mos6522.h
    M include/hw/pci/pcie_port.h
    M include/hw/ppc/xics.h
    M include/hw/qdev-core.h
    M target/arm/cpu-qom.h
    M target/arm/cpu.c
    M target/avr/cpu-qom.h
    M target/avr/cpu.c
    M target/cris/cpu-qom.h
    M target/cris/cpu.c
    M target/hexagon/cpu.c
    M target/hexagon/cpu.h
    M target/i386/cpu-qom.h
    M target/i386/cpu.c
    M target/loongarch/cpu.c
    M target/loongarch/cpu.h
    M target/m68k/cpu-qom.h
    M target/m68k/cpu.c
    M target/microblaze/cpu-qom.h
    M target/microblaze/cpu.c
    M target/mips/cpu-qom.h
    M target/mips/cpu.c
    M target/nios2/cpu.c
    M target/nios2/cpu.h
    M target/openrisc/cpu.c
    M target/openrisc/cpu.h
    M target/ppc/cpu-qom.h
    M target/ppc/cpu_init.c
    M target/riscv/cpu.c
    M target/riscv/cpu.h
    M target/rx/cpu-qom.h
    M target/rx/cpu.c
    M target/sh4/cpu-qom.h
    M target/sh4/cpu.c
    M target/sparc/cpu-qom.h
    M target/sparc/cpu.c
    M target/tricore/cpu-qom.h
    M target/tricore/cpu.c
    M target/xtensa/cpu-qom.h
    M target/xtensa/cpu.c

  Log Message:
  -----------
  Merge tag 'pull-target-arm-20221216' of 
https://git.linaro.org/people/pmaydell/qemu-arm into staging

reset refactoring queue:
 * remove uses of qdev_reset_all(), qbus_reset_all(), device_legacy_reset()
 * convert various devices to 3-phase reset, so we can remove their
   uses of device_class_set_parent_reset()

# gpg: Signature made Fri 16 Dec 2022 21:41:11 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" 
[ultimate]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20221216' of 
https://git.linaro.org/people/pmaydell/qemu-arm: (36 commits)
  hw/pci-host/pnv_phb3_msi: Convert TYPE_PHB3_MSI to 3-phase reset
  hw/intc/xics: Convert TYPE_ICS to 3-phase reset
  hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()
  pci: Convert child classes of TYPE_PCIE_ROOT_PORT to 3-phase reset
  pci: Convert TYPE_PCIE_ROOT_PORT to 3-phase reset
  hw/display/virtio-vga: Convert TYPE_VIRTIO_VGA_BASE to 3-phase reset
  hw/virtio: Convert TYPE_VIRTIO_PCI to 3-phase reset
  target/xtensa: Convert to 3-phase reset
  target/tricore: Convert to 3-phase reset
  target/sparc: Convert to 3-phase reset
  target/sh4: Convert to 3-phase reset
  target/rx: Convert to 3-phase reset
  target/riscv: Convert to 3-phase reset
  target/ppc: Convert to 3-phase reset
  target/openrisc: Convert to 3-phase reset
  target/nios2: Convert to 3-phase reset
  target/mips: Convert to 3-phase reset
  target/microblaze: Convert to 3-phase reset
  target/m68k: Convert to 3-phase reset
  target/loongarch: Convert to 3-phase reset
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/d038d2645aca...55745005e90a



reply via email to

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