|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Xen-20] Clearing of GICD_ICACTIVER register at boot time.
Hello,Please use scripts/get_maintainers.pl to CC all the relevant maintainers on your patch. Regarding the title, Xen is supporting multiple architecture. So it is always useful to specify the architecture in the title. Also the title is quite confusing as for clearing interrupts, you need to write 1s in that register. A better title would be: xen/arm: gic: Clear active state of IRQs when the GIC is initialized On 05/06/18 20:20, cdeshpan wrote: From: Chaitanya Deshpande <chaitanyagd11@xxxxxxxxx> Please explain in the commit message why you need to clear the interrupts. Signed-off-by: Chaitanya Deshpande <chaitanyagd11@xxxxxxxxx> --- xen/arch/arm/gic-v2.c | 6 +++++- xen/arch/arm/gic-v3.c | 5 +++++ xen/arch/arm/vgic-v2.c | 5 +++++ xen/arch/arm/vgic-v3.c | 5 +++++ xen/arch/arm/vgic/vgic-mmio-v2.c | 5 +++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index d2dcafb..6bd7e43 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -5,7 +5,6 @@ * * Tim Deegan <tim@xxxxxxx> * Copyright (c) 2011 Citrix Systems. - * Please don't remove unnecessary line. This comment seems incorrect. + uint32_t *gicd_icactiver; + gicd_icactiver = (uint32_t*) GICD_ICACTIVER; + *gicd_icactiver = 0; That code is not going to do anything if you write 0. Per the spec, you need to set 1 in order to deactivate interrupts. Furthermore, this is only covering the first 32 interrupts. You have to clear the active state of all the interrupts. The first 32 interrupts are banked (i.e per-CPU) the others are shared. The former should be initialized in gicv{2,3}_cpu_init that will be called during each CPU initialization. The latter should be done in gicv{2,3}_dist_init(). Lastly, GICD_ICACTIVER is just a register offset in the distributor. You have to add the base address in order to find to memory address to write. We have an helper for that in the GICv2 driver, see writel_gicd(...). For GICv3, you will have to use writel_relaxed(..., GICD + GICD_ICACTIVER). I would also recommend to test your patches as very likely the latest error would have been caught. See my remark above. I don't understand why you are clearing active register in vgic_v{2,3}_init. Those functions are called when creating a domain, so there are no need to mess with the physical interrupts here. See above. See above. I am afraid I am not going to be able to accept any patch containing that paragraph in the signature (see [1]). This is a public mailing list, so everything is public. Please resend your patch without it if it was intended to be merged. [1] https://www.youtube.com/watch?v=fMeH7wqOwXA&feature=youtu.be&t=13m53s 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 |