Because micro-bench may send a large number of ITS commands, we should handle ITS command queue wrapping as kernel instead of just failing the test. Signed-off-by: Jingyi Wang <wangjingyi11@xxxxxxxxxx> --- lib/arm64/gic-v3-its-cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/arm64/gic-v3-its-cmd.c b/lib/arm64/gic-v3-its-cmd.c index 2c208d1..34574f7 100644 --- a/lib/arm64/gic-v3-its-cmd.c +++ b/lib/arm64/gic-v3-its-cmd.c @@ -164,8 +164,9 @@ static struct its_cmd_block *its_allocate_entry(void) { struct its_cmd_block *cmd; - assert((u64)its_data.cmd_write < (u64)its_data.cmd_base + SZ_64K); cmd = its_data.cmd_write++; + if ((u64)its_data.cmd_write == (u64)its_data.cmd_base + SZ_64K) + its_data.cmd_write = its_data.cmd_base; return cmd; } -- 2.19.1