Commit 3858d4df authored by Marc Zyngier's avatar Marc Zyngier
Browse files

irqchip/gic-v4.1: Suppress per-VLPI doorbell



Since GICv4.1 gives us a per-VPE doorbell, avoid programming anything
else on VMOVI/VMAPI/VMAPTI and on any other action that would have
otherwise resulted in a per-VLPI doorbell to be programmed.

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarZenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20191224111055.11836-15-maz@kernel.org
parent b4a4bd0f
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -718,7 +718,7 @@ static struct its_vpe *its_build_vmapti_cmd(struct its_node *its,
{
{
	u32 db;
	u32 db;


	if (desc->its_vmapti_cmd.db_enabled)
	if (!is_v4_1(its) && desc->its_vmapti_cmd.db_enabled)
		db = desc->its_vmapti_cmd.vpe->vpe_db_lpi;
		db = desc->its_vmapti_cmd.vpe->vpe_db_lpi;
	else
	else
		db = 1023;
		db = 1023;
@@ -741,7 +741,7 @@ static struct its_vpe *its_build_vmovi_cmd(struct its_node *its,
{
{
	u32 db;
	u32 db;


	if (desc->its_vmovi_cmd.db_enabled)
	if (!is_v4_1(its) && desc->its_vmovi_cmd.db_enabled)
		db = desc->its_vmovi_cmd.vpe->vpe_db_lpi;
		db = desc->its_vmovi_cmd.vpe->vpe_db_lpi;
	else
	else
		db = 1023;
		db = 1023;
@@ -1353,6 +1353,13 @@ static void its_vlpi_set_doorbell(struct irq_data *d, bool enable)
	u32 event = its_get_event_id(d);
	u32 event = its_get_event_id(d);
	struct its_vlpi_map *map;
	struct its_vlpi_map *map;


	/*
	 * GICv4.1 does away with the per-LPI nonsense, nothing to do
	 * here.
	 */
	if (is_v4_1(its_dev->its))
		return;

	map = dev_event_to_vlpi_map(its_dev, event);
	map = dev_event_to_vlpi_map(its_dev, event);


	if (map->db_enabled == enable)
	if (map->db_enabled == enable)