qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
@ 2017-09-26 15:51 Thomas Huth
  2017-09-26 16:36 ` Alistair Francis
  2017-10-03 13:49 ` Peter Maydell
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Huth @ 2017-09-26 15:51 UTC (permalink / raw)
  To: Alistair Francis, Edgar E. Iglesias, qemu-arm
  Cc: Peter Maydell, qemu-devel, qemu-trivial

The device uses serial_hds in its realize function and thus can't be
used twice. Apart from that, the comma in its name makes it quite hard
to use for the user anyway, since a comma is normally used to separate
the device name from its properties when using the "-device" parameter
or the "device_add" HMP command.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/xlnx-zynqmp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 2b27daf..d4b6560 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -440,6 +440,8 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
 
     dc->props = xlnx_zynqmp_props;
     dc->realize = xlnx_zynqmp_realize;
+    /* Reason: Uses serial_hds in realize function, thus can't be used twice */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo xlnx_zynqmp_type_info = {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
  2017-09-26 15:51 [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false Thomas Huth
@ 2017-09-26 16:36 ` Alistair Francis
  2017-09-26 16:52   ` Thomas Huth
  2017-10-03 13:49 ` Peter Maydell
  1 sibling, 1 reply; 6+ messages in thread
From: Alistair Francis @ 2017-09-26 16:36 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Alistair Francis, Edgar E. Iglesias, qemu-arm, QEMU Trivial,
	Peter Maydell, qemu-devel@nongnu.org Developers

On Tue, Sep 26, 2017 at 8:51 AM, Thomas Huth <thuth@redhat.com> wrote:
> The device uses serial_hds in its realize function and thus can't be
> used twice. Apart from that, the comma in its name makes it quite hard
> to use for the user anyway, since a comma is normally used to separate
> the device name from its properties when using the "-device" parameter
> or the "device_add" HMP command.

Is it worth changing the name now then as well?

>
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>

Thanks,
Alistair

> ---
>  hw/arm/xlnx-zynqmp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index 2b27daf..d4b6560 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -440,6 +440,8 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
>
>      dc->props = xlnx_zynqmp_props;
>      dc->realize = xlnx_zynqmp_realize;
> +    /* Reason: Uses serial_hds in realize function, thus can't be used twice */
> +    dc->user_creatable = false;
>  }
>
>  static const TypeInfo xlnx_zynqmp_type_info = {
> --
> 1.8.3.1
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
  2017-09-26 16:36 ` Alistair Francis
@ 2017-09-26 16:52   ` Thomas Huth
  2017-09-26 17:03     ` Alistair Francis
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2017-09-26 16:52 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Edgar E. Iglesias, qemu-arm, QEMU Trivial, Peter Maydell,
	qemu-devel@nongnu.org Developers

On 26.09.2017 18:36, Alistair Francis wrote:
> On Tue, Sep 26, 2017 at 8:51 AM, Thomas Huth <thuth@redhat.com> wrote:
>> The device uses serial_hds in its realize function and thus can't be
>> used twice. Apart from that, the comma in its name makes it quite hard
>> to use for the user anyway, since a comma is normally used to separate
>> the device name from its properties when using the "-device" parameter
>> or the "device_add" HMP command.
> 
> Is it worth changing the name now then as well?

Not sure, was there a reason for this name? E.g. is it used in a device
tree somewhere somehow? Anyway, with user_creatable = false, I think it
is not so urgent anymore to change it.

>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>

Thanks!

 Thomas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
  2017-09-26 16:52   ` Thomas Huth
@ 2017-09-26 17:03     ` Alistair Francis
  2017-09-26 17:16       ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Alistair Francis @ 2017-09-26 17:03 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Alistair Francis, QEMU Trivial, Edgar E. Iglesias, qemu-arm,
	qemu-devel@nongnu.org Developers, Peter Maydell

On Tue, Sep 26, 2017 at 9:52 AM, Thomas Huth <thuth@redhat.com> wrote:
> On 26.09.2017 18:36, Alistair Francis wrote:
>> On Tue, Sep 26, 2017 at 8:51 AM, Thomas Huth <thuth@redhat.com> wrote:
>>> The device uses serial_hds in its realize function and thus can't be
>>> used twice. Apart from that, the comma in its name makes it quite hard
>>> to use for the user anyway, since a comma is normally used to separate
>>> the device name from its properties when using the "-device" parameter
>>> or the "device_add" HMP command.
>>
>> Is it worth changing the name now then as well?
>
> Not sure, was there a reason for this name? E.g. is it used in a device
> tree somewhere somehow? Anyway, with user_creatable = false, I think it
> is not so urgent anymore to change it.

I don't think there was a specific reason. Maybe it was copied from a
device tree, but I'm not tied to keeping the comma. Maybe that's
something we can investigate in the future.

Thanks,
Alistair

>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>
>> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
>
> Thanks!
>
>  Thomas
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
  2017-09-26 17:03     ` Alistair Francis
@ 2017-09-26 17:16       ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2017-09-26 17:16 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Thomas Huth, QEMU Trivial, Edgar E. Iglesias, qemu-arm,
	qemu-devel@nongnu.org Developers

On 26 September 2017 at 18:03, Alistair Francis
<alistair.francis@xilinx.com> wrote:
> On Tue, Sep 26, 2017 at 9:52 AM, Thomas Huth <thuth@redhat.com> wrote:
>> On 26.09.2017 18:36, Alistair Francis wrote:
>>> On Tue, Sep 26, 2017 at 8:51 AM, Thomas Huth <thuth@redhat.com> wrote:
>>>> The device uses serial_hds in its realize function and thus can't be
>>>> used twice. Apart from that, the comma in its name makes it quite hard
>>>> to use for the user anyway, since a comma is normally used to separate
>>>> the device name from its properties when using the "-device" parameter
>>>> or the "device_add" HMP command.
>>>
>>> Is it worth changing the name now then as well?
>>
>> Not sure, was there a reason for this name? E.g. is it used in a device
>> tree somewhere somehow? Anyway, with user_creatable = false, I think it
>> is not so urgent anymore to change it.
>
> I don't think there was a specific reason. Maybe it was copied from a
> device tree, but I'm not tied to keeping the comma. Maybe that's
> something we can investigate in the future.

I vaguely recall that the comma was part of an attempt to be consistent
about device names by making them follow the device tree names for them
rather than just making up our own. Some of the imx devices and boards
follow the same convention.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false
  2017-09-26 15:51 [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false Thomas Huth
  2017-09-26 16:36 ` Alistair Francis
@ 2017-10-03 13:49 ` Peter Maydell
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2017-10-03 13:49 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Alistair Francis, Edgar E. Iglesias, qemu-arm, QEMU Developers,
	QEMU Trivial

On 26 September 2017 at 16:51, Thomas Huth <thuth@redhat.com> wrote:
> The device uses serial_hds in its realize function and thus can't be
> used twice. Apart from that, the comma in its name makes it quite hard
> to use for the user anyway, since a comma is normally used to separate
> the device name from its properties when using the "-device" parameter
> or the "device_add" HMP command.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/arm/xlnx-zynqmp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index 2b27daf..d4b6560 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -440,6 +440,8 @@ static void xlnx_zynqmp_class_init(ObjectClass *oc, void *data)
>
>      dc->props = xlnx_zynqmp_props;
>      dc->realize = xlnx_zynqmp_realize;
> +    /* Reason: Uses serial_hds in realize function, thus can't be used twice */
> +    dc->user_creatable = false;
>  }
>
>  static const TypeInfo xlnx_zynqmp_type_info = {



Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-03 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 15:51 [Qemu-devel] [PATCH] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false Thomas Huth
2017-09-26 16:36 ` Alistair Francis
2017-09-26 16:52   ` Thomas Huth
2017-09-26 17:03     ` Alistair Francis
2017-09-26 17:16       ` Peter Maydell
2017-10-03 13:49 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).