|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: domain_build: DT: add clocks node to the hypervisor node
Hello Dirk, On 21/06/16 11:15, Dirk Behme wrote: Some clocks might be used by Xen (drivers) and not by the Linux kernel. If these are not registered by the Linux kernel, they might be disabled by the Linux kernel's clk_disable_unused() as the kernel doesn't know that they are used (by Xen drivers). The clock of the serial console handled by Xen is one example for this. It might be disabled by clk_disable_unused() which stops the whole serial output, even from Xen, then. Up to now, the workaround for this has been to use the Linux kernel command line parameter 'clk_ignore_unused'. See Xen bug http://bugs.xenproject.org/xen/bug/45 too. To fix this, add the clocks used by Xen to the hypervisor node. The Linux kernel has to register the clocks from the hypervisor node, then. Therefore, collect all clocks from nodes used by Xen. These are marked with DOMID_XEN. Afterwards, add a 'clocks' node to the hypervisor node containing all these clocks. The Linux kernel can register all these clocks, preventing them from being disabled, then. Signed-off-by: Dirk Behme <dirk.behme@xxxxxxxxxxxx> --- xen/arch/arm/domain_build.c | 20 ++++++++++++++++++++ xen/arch/arm/kernel.h | 7 +++++++ 2 files changed, 27 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 2e4c295..fccf87e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -657,6 +657,10 @@ static int make_hypervisor_node(const struct kernel_info *kinfo, if ( res ) return res; + res = fdt_property(fdt, "clocks", kinfo->clk.dtclocks, kinfo->clk.cnt); You may create an empty property if there is no clocks. len is only updated when the property exists. The bracket should be a newline. I don't think this is tolerable. We need to fix it once and for all.I understand that xen does not provide a realloc function. Is there another way we can get a rid of this limit? I am wondering if we can use the member domain_list of dt_device_node to link the device having a clock property. And then latter one, allocate the memory + copying the data. How did you define this value? Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |