[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH RESEND v2 02/21] sysbus: Set user_creatable=false
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-arm] [PATCH RESEND v2 02/21] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE |
Date: |
Fri, 5 May 2017 13:54:19 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, May 05, 2017 at 09:36:22AM +0200, Cornelia Huck wrote:
[...]
> > diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c
> > index c0f560b289..6a2eec8dd0 100644
> > --- a/hw/core/sysbus.c
> > +++ b/hw/core/sysbus.c
> > @@ -326,6 +326,17 @@ static void sysbus_device_class_init(ObjectClass
> > *klass, void *data)
> > DeviceClass *k = DEVICE_CLASS(klass);
> > k->init = sysbus_device_init;
> > k->bus_type = TYPE_SYSTEM_BUS;
> > + /*
> > + * device_add plugs devices into suitable bus. For "real" buses,
>
> s/suitable/a suitable/
Thanks, I will fix it.
>
> > + * that actually connects the device. For sysbus, the connections
> > + * need to be made separately, and device_add can't do that. The
> > + * device would be left unconnected, and will probably not work
> > + *
> > + * However, a few machines and a few devices can handle a few sysbus
> > + * devices. In this case, the device subclass needs to override
>
> Should that rather be "a few machines can handle a few specific sysbus
> devices"?
I will extend it to "a few machines can handle device_add for a
few specific sysbus devices". Thanks for spotting it.
>
> > + * it and set user_creatable=true.
> > + */
> > + k->user_creatable = false;
> > }
> >
> > static const TypeInfo sysbus_device_type_info = {
>
--
Eduardo