|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 04/27] ARM: GICv3 ITS: map ITS command buffer
Hi Andre, On 16/03/17 11:20, Andre Przywara wrote: Instead of directly manipulating the tables in memory, an ITS driver sends commands via a ring buffer in normal system memory to the ITS h/w to create or alter the LPI mappings. Allocate memory for that buffer and tell the ITS about it to be able to send ITS commands. Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> --- xen/arch/arm/gic-v3-its.c | 57 ++++++++++++++++++++++++++++++++++++++++ xen/include/asm-arm/gic_v3_its.h | 6 +++++ 2 files changed, 63 insertions(+) diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c index 9982fe9..e5601ed 100644 --- a/xen/arch/arm/gic-v3-its.c +++ b/xen/arch/arm/gic-v3-its.c @@ -20,10 +20,13 @@ #include <xen/lib.h> #include <xen/mm.h> +#include <xen/sizes.h> #include <asm/gic_v3_defs.h> #include <asm/gic_v3_its.h> #include <asm/io.h> +#define ITS_CMD_QUEUE_SZ SZ_64K I thought you were planning to increase the size to 1MB? Looking at the spec, the command buffer does not need to be 64K aligned. On the previous version, you made it 4K aligned. So why this restriction? + order = max(get_order_from_bytes(ITS_CMD_QUEUE_SZ), 16U - PAGE_SHIFT); + buffer = alloc_xenheap_pages(order, 0); I am not sure to understand why you move from _zalloc to alloc_xenheap_*. The resulting behavior will be exactly the same but the former result to a simpler code. Please use printk, the message is useful even for non-debug build. + } + + return buffer; +} + Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |