lkml.org 
[lkml]   [2024]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] irqchip/gic-v3-its: Don't need VSYNC if VMAPP with {V, Alloc}=={0, x}
Date
From GIC spec, a VMAPP with {V, Alloc}=={0, x} is self-synchronizing,
This means the ITS command queue does not show the command as
consumed until all of its effects are completed. A VSYNC with unmapped
vpeid is not needed.

Signed-off-by: t00849498 <tangnianyao@huawei.com>
---
drivers/irqchip/irq-gic-v3-its.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index fca888b36680..a0ca5dcbb245 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -789,6 +789,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
unsigned long vpt_addr, vconf_addr;
u64 target;
bool alloc;
+ bool unmap_v4_1 = !desc->its_vmapp_cmd.valid && is_v4_1(its);

its_encode_cmd(cmd, GITS_CMD_VMAPP);
its_encode_vpeid(cmd, desc->its_vmapp_cmd.vpe->vpe_id);
@@ -832,6 +833,9 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
out:
its_fixup_cmd(cmd);

+ if (unmap_v4_1)
+ return NULL;
+
return valid_vpe(its, desc->its_vmapp_cmd.vpe);
}

--
2.30.0

\
 
 \ /
  Last update: 2024-05-27 16:19    [W:0.059 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site