Message ID | 1376687156-6737-18-git-send-email-julien.grall@linaro.org |
---|---|
State | Superseded, archived |
Headers | show |
On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: > When a device has a property status with disabled inside, Linux will not use > the device. Is Linux consistent about that? I must admit I thought we omitted things in use by Xen from the DT altogether. Is that no longer true? > > Signed-off-by: Julien Grall <julien.grall@linaro.org> > --- > xen/arch/arm/domain_build.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index c8f24ed..8377610 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -208,6 +208,14 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > return res; > } > > + /* Disable all devices used by Xen */ > + if ( dt_device_used_by(np) == DOMID_XEN ) > + { > + res = fdt_property(kinfo->fdt, "status", "disabled", 8 + 1); > + if ( res ) > + return res; > + } > + > /* > * XXX should populate /chosen/linux,initrd-{start,end} here if we > * have module[2]
On 08/22/2013 02:50 PM, Ian Campbell wrote: > On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: >> When a device has a property status with disabled inside, Linux will not use >> the device. > > Is Linux consistent about that? For general device (ie: not GIC, timer, and malformed driver), yes. I choose this solution because, I'm not sure how Linux react if, for example, on a board with 3 UARTs, the second UART is removed. Set status property to "disabled" works fine for me. > I must admit I thought we omitted things in use by Xen from the DT > altogether. Is that no longer true. > >> >> Signed-off-by: Julien Grall <julien.grall@linaro.org> >> --- >> xen/arch/arm/domain_build.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c >> index c8f24ed..8377610 100644 >> --- a/xen/arch/arm/domain_build.c >> +++ b/xen/arch/arm/domain_build.c >> @@ -208,6 +208,14 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, >> return res; >> } >> >> + /* Disable all devices used by Xen */ >> + if ( dt_device_used_by(np) == DOMID_XEN ) >> + { >> + res = fdt_property(kinfo->fdt, "status", "disabled", 8 + 1); >> + if ( res ) >> + return res; >> + } >> + >> /* >> * XXX should populate /chosen/linux,initrd-{start,end} here if we >> * have module[2] > >
On Thu, 2013-08-22 at 15:15 +0100, Julien Grall wrote: > On 08/22/2013 02:50 PM, Ian Campbell wrote: > > On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: > >> When a device has a property status with disabled inside, Linux will not use > >> the device. > > > > Is Linux consistent about that? > > For general device (ie: not GIC, timer, and malformed driver), yes. Good enough for me. Acked-by: Ian Campbell <ian.campbell@citrix.com> > > I choose this solution because, I'm not sure how Linux react if, for > example, on a board with 3 UARTs, the second UART is removed. > Set status property to "disabled" works fine for me. > > > I must admit I thought we omitted things in use by Xen from the DT > > altogether. Is that no longer true. > > > > >> > >> Signed-off-by: Julien Grall <julien.grall@linaro.org> > >> --- > >> xen/arch/arm/domain_build.c | 8 ++++++++ > >> 1 file changed, 8 insertions(+) > >> > >> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > >> index c8f24ed..8377610 100644 > >> --- a/xen/arch/arm/domain_build.c > >> +++ b/xen/arch/arm/domain_build.c > >> @@ -208,6 +208,14 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, > >> return res; > >> } > >> > >> + /* Disable all devices used by Xen */ > >> + if ( dt_device_used_by(np) == DOMID_XEN ) > >> + { > >> + res = fdt_property(kinfo->fdt, "status", "disabled", 8 + 1); > >> + if ( res ) > >> + return res; > >> + } > >> + > >> /* > >> * XXX should populate /chosen/linux,initrd-{start,end} here if we > >> * have module[2] > > > > > >
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index c8f24ed..8377610 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -208,6 +208,14 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo, return res; } + /* Disable all devices used by Xen */ + if ( dt_device_used_by(np) == DOMID_XEN ) + { + res = fdt_property(kinfo->fdt, "status", "disabled", 8 + 1); + if ( res ) + return res; + } + /* * XXX should populate /chosen/linux,initrd-{start,end} here if we * have module[2]
When a device has a property status with disabled inside, Linux will not use the device. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- xen/arch/arm/domain_build.c | 8 ++++++++ 1 file changed, 8 insertions(+)