diff options
author | Damien Hedde <damien.hedde@greensocs.com> | 2020-01-30 16:02:03 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-01-30 16:02:03 +0000 |
commit | f703a04ce558ac3c7c0587a2d919c39efb8ca3ba (patch) | |
tree | dc89c0445826aeda40f29c5129a634d48fc7afb9 /hw/i386 | |
parent | 100bc4ab41a9819846a798d4eb8ad495046e8f11 (diff) |
add device_legacy_reset function to prepare for reset api change
Provide a temporary device_legacy_reset function doing what
device_reset does to prepare for the transition with Resettable
API.
All occurrence of device_reset in the code tree are also replaced
by device_legacy_reset.
The new resettable API has different prototype and semantics
(resetting child buses as well as the specified device). Subsequent
commits will make the changeover for each call site individually; once
that is complete device_legacy_reset() will be removed.
Signed-off-by: Damien Hedde <damien.hedde@greensocs.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200123132823.1117486-2-damien.hedde@greensocs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/microvm.c | 2 | ||||
-rw-r--r-- | hw/i386/pc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 827ce29e58..d23485108d 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -370,7 +370,7 @@ static void microvm_machine_reset(MachineState *machine) cpu = X86_CPU(cs); if (cpu->apic_state) { - device_reset(cpu->apic_state); + device_legacy_reset(cpu->apic_state); } } } diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a6302a772d..2ddce4230a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1879,7 +1879,7 @@ static void pc_machine_reset(MachineState *machine) cpu = X86_CPU(cs); if (cpu->apic_state) { - device_reset(cpu->apic_state); + device_legacy_reset(cpu->apic_state); } } } |