* [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function
@ 2020-03-07 9:13 Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 1/2] dp264: use pci_create_simple() to initialise the cmd646 device Mark Cave-Ayland
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Mark Cave-Ayland @ 2020-03-07 9:13 UTC (permalink / raw)
To: qemu-devel, rth, jsnow
The recent cmd646 discussions reminded me of this patch I've had sitting in an
old branch for a while.
The DP264 machine is the last remaining user of the deprecated
pci_cmd646_ide_init() init function. Switch it over to using qdev via pci_create()
and then remove the now-unused pci_cmd646_ide_init() function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
v3:
- Rebase onto master
- Add R-B tag from Phil
- Use pci_create_simple() instead of pci_create() as suggested by Zoltan
v2:
- Rebase onto master
- Remove setting "secondary" property to 0 for dp264 since this is already the default
- Add R-B tags from Richard
Mark Cave-Ayland (2):
dp264: use pci_create_simple() to initialise the cmd646 device
cmd646: remove unused pci_cmd646_ide_init() function
hw/alpha/dp264.c | 6 +++++-
hw/ide/cmd646.c | 12 ------------
include/hw/ide.h | 2 --
3 files changed, 5 insertions(+), 15 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/2] dp264: use pci_create_simple() to initialise the cmd646 device
2020-03-07 9:13 [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function Mark Cave-Ayland
@ 2020-03-07 9:13 ` Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function Mark Cave-Ayland
2020-03-10 15:31 ` [PATCH v3 0/2] cmd646: remove " John Snow
2 siblings, 0 replies; 6+ messages in thread
From: Mark Cave-Ayland @ 2020-03-07 9:13 UTC (permalink / raw)
To: qemu-devel, rth, jsnow
Remove the call to pci_cmd646_ide_init() since global device init functions
are deprecated in preference of using qdev directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/alpha/dp264.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index d28f57199f..f24b34b62e 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -16,6 +16,7 @@
#include "sysemu/sysemu.h"
#include "hw/rtc/mc146818rtc.h"
#include "hw/ide.h"
+#include "hw/ide/pci.h"
#include "hw/timer/i8254.h"
#include "hw/isa/superio.h"
#include "hw/dma/i8257.h"
@@ -100,9 +101,12 @@ static void clipper_init(MachineState *machine)
/* IDE disk setup. */
{
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+ PCIDevice *pci_dev;
+
ide_drive_get(hd, ARRAY_SIZE(hd));
- pci_cmd646_ide_init(pci_bus, hd, 0);
+ pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
+ pci_ide_create_devs(pci_dev, hd);
}
/* Load PALcode. Given that this is not "real" cpu palcode,
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function
2020-03-07 9:13 [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 1/2] dp264: use pci_create_simple() to initialise the cmd646 device Mark Cave-Ayland
@ 2020-03-07 9:13 ` Mark Cave-Ayland
2020-03-07 17:27 ` Philippe Mathieu-Daudé
2020-03-10 15:31 ` [PATCH v3 0/2] cmd646: remove " John Snow
2 siblings, 1 reply; 6+ messages in thread
From: Mark Cave-Ayland @ 2020-03-07 9:13 UTC (permalink / raw)
To: qemu-devel, rth, jsnow
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/ide/cmd646.c | 12 ------------
include/hw/ide.h | 2 --
2 files changed, 14 deletions(-)
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 335c060673..d953932104 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -317,18 +317,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
}
}
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
- int secondary_ide_enabled)
-{
- PCIDevice *dev;
-
- dev = pci_create(bus, -1, "cmd646-ide");
- qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
- qdev_init_nofail(&dev->qdev);
-
- pci_ide_create_devs(dev, hd_table);
-}
-
static Property cmd646_ide_properties[] = {
DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/include/hw/ide.h b/include/hw/ide.h
index 28d8a06439..0c7080ed92 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
DriveInfo *hd0, DriveInfo *hd1);
/* ide-pci.c */
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
- int secondary_ide_enabled);
PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function
2020-03-07 9:13 ` [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function Mark Cave-Ayland
@ 2020-03-07 17:27 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-03-07 17:27 UTC (permalink / raw)
To: Mark Cave-Ayland, qemu-devel, rth, jsnow
On 3/7/20 10:13 AM, Mark Cave-Ayland wrote:
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> hw/ide/cmd646.c | 12 ------------
> include/hw/ide.h | 2 --
> 2 files changed, 14 deletions(-)
>
> diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
> index 335c060673..d953932104 100644
> --- a/hw/ide/cmd646.c
> +++ b/hw/ide/cmd646.c
> @@ -317,18 +317,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
> }
> }
>
> -void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
> - int secondary_ide_enabled)
> -{
> - PCIDevice *dev;
> -
> - dev = pci_create(bus, -1, "cmd646-ide");
> - qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
> - qdev_init_nofail(&dev->qdev);
> -
> - pci_ide_create_devs(dev, hd_table);
> -}
> -
> static Property cmd646_ide_properties[] = {
> DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
> DEFINE_PROP_END_OF_LIST(),
> diff --git a/include/hw/ide.h b/include/hw/ide.h
> index 28d8a06439..0c7080ed92 100644
> --- a/include/hw/ide.h
> +++ b/include/hw/ide.h
> @@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
> DriveInfo *hd0, DriveInfo *hd1);
>
> /* ide-pci.c */
> -void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
> - int secondary_ide_enabled);
> PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
> PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
> PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function
2020-03-07 9:13 [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 1/2] dp264: use pci_create_simple() to initialise the cmd646 device Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function Mark Cave-Ayland
@ 2020-03-10 15:31 ` John Snow
2020-03-10 21:27 ` John Snow
2 siblings, 1 reply; 6+ messages in thread
From: John Snow @ 2020-03-10 15:31 UTC (permalink / raw)
To: Mark Cave-Ayland, qemu-devel, rth
On 3/7/20 4:13 AM, Mark Cave-Ayland wrote:
> The recent cmd646 discussions reminded me of this patch I've had sitting in an
> old branch for a while.
>
> The DP264 machine is the last remaining user of the deprecated
> pci_cmd646_ide_init() init function. Switch it over to using qdev via pci_create()
> and then remove the now-unused pci_cmd646_ide_init() function.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>
> v3:
> - Rebase onto master
> - Add R-B tag from Phil
> - Use pci_create_simple() instead of pci_create() as suggested by Zoltan
>
> v2:
> - Rebase onto master
> - Remove setting "secondary" property to 0 for dp264 since this is already the default
> - Add R-B tags from Richard
>
>
> Mark Cave-Ayland (2):
> dp264: use pci_create_simple() to initialise the cmd646 device
> cmd646: remove unused pci_cmd646_ide_init() function
>
> hw/alpha/dp264.c | 6 +++++-
> hw/ide/cmd646.c | 12 ------------
> include/hw/ide.h | 2 --
> 3 files changed, 5 insertions(+), 15 deletions(-)
>
Thanks, applied to my IDE tree:
https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git
--js
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function
2020-03-10 15:31 ` [PATCH v3 0/2] cmd646: remove " John Snow
@ 2020-03-10 21:27 ` John Snow
0 siblings, 0 replies; 6+ messages in thread
From: John Snow @ 2020-03-10 21:27 UTC (permalink / raw)
To: Mark Cave-Ayland, qemu-devel, rth
On 3/10/20 11:31 AM, John Snow wrote:
>
>
> On 3/7/20 4:13 AM, Mark Cave-Ayland wrote:
>> The recent cmd646 discussions reminded me of this patch I've had sitting in an
>> old branch for a while.
>>
>> The DP264 machine is the last remaining user of the deprecated
>> pci_cmd646_ide_init() init function. Switch it over to using qdev via pci_create()
>> and then remove the now-unused pci_cmd646_ide_init() function.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>
>> v3:
>> - Rebase onto master
>> - Add R-B tag from Phil
>> - Use pci_create_simple() instead of pci_create() as suggested by Zoltan
>>
>> v2:
>> - Rebase onto master
>> - Remove setting "secondary" property to 0 for dp264 since this is already the default
>> - Add R-B tags from Richard
>>
>>
>> Mark Cave-Ayland (2):
>> dp264: use pci_create_simple() to initialise the cmd646 device
>> cmd646: remove unused pci_cmd646_ide_init() function
>>
>> hw/alpha/dp264.c | 6 +++++-
>> hw/ide/cmd646.c | 12 ------------
>> include/hw/ide.h | 2 --
>> 3 files changed, 5 insertions(+), 15 deletions(-)
>>
>
> Thanks, applied to my IDE tree:
>
> https://github.com/jnsnow/qemu/commits/ide
> https://github.com/jnsnow/qemu.git
>
> --js
>
Sorry, I replied to the wrong series!
But now it's true.
Thanks, applied to my IDE tree:
https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git
--js
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-10 21:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-07 9:13 [PATCH v3 0/2] cmd646: remove pci_cmd646_ide_init() function Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 1/2] dp264: use pci_create_simple() to initialise the cmd646 device Mark Cave-Ayland
2020-03-07 9:13 ` [PATCH v3 2/2] cmd646: remove unused pci_cmd646_ide_init() function Mark Cave-Ayland
2020-03-07 17:27 ` Philippe Mathieu-Daudé
2020-03-10 15:31 ` [PATCH v3 0/2] cmd646: remove " John Snow
2020-03-10 21:27 ` John Snow
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.