|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: merge make_timer_node and make_timer_domU_node
Hi Viktor, On 20/06/2019 11:38, Viktor Mitin wrote: Functions make_timer_node and make_timer_domU_node are quite similar. The only difference between Dom0 and DomU timer DT node is the timer interrupts used. All the rest code should be the same. This is a bit confusing to read. First you say there are only "one difference" but then the second part leads to think there are more difference. The commit message should describe what are the differences and which version you are keeping. How about domU support? Also, do you have the clock-frequency property in your DT timer node?So it is better to merge them to avoid discrepancy. Tested dom0 boot with rcar h3 sk board. Please avoid to use the term "d0"/"dom0" whenever it is possible. While in practice the hardware domain is always dom0 on Arm, I want to avoid the mixing. + uint32_t ip_val;dt_dprintk("Create timer node\n"); I am not sure where to comment, but the compatible will be different for DomU now. I would actually prefer if we keep the domU version for the compatible as it is simpler. @@ -1004,22 +1006,36 @@ static int __init make_timer_node(const struct domain *d, void *fdt) Rather than using ternary everywhere, how about introducing an array where the value will be stored.
So the code would look like:
if ( is_hardware_domain(...) )
{
timer_irq[...] = ...;
timer_irq[...] = ...;
}
else
{
}
[....]
set_interrupt(timer_irq[...]);
Have a look at time.c as we define handy value (enum timer_ppi and
MAX_TIMER_PPI).
I would actually prefer if we extend fdt_property_interrupts to deal with other domain than the hwdom. This would avoid the function. + if (res) NIT: Coding style if ( ... ) Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |