Revert "irqchip/gic-v4: Don't allow a VMOVP on a dying VPE"
This reverts commit 9b97db363b
.
This commit is contained in:
parent
d22ac47288
commit
a91e7ad42f
2 changed files with 7 additions and 15 deletions
|
@ -789,8 +789,8 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
|
|||
its_encode_valid(cmd, desc->its_vmapp_cmd.valid);
|
||||
|
||||
if (!desc->its_vmapp_cmd.valid) {
|
||||
alloc = !atomic_dec_return(&desc->its_vmapp_cmd.vpe->vmapp_count);
|
||||
if (is_v4_1(its)) {
|
||||
alloc = !atomic_dec_return(&desc->its_vmapp_cmd.vpe->vmapp_count);
|
||||
its_encode_alloc(cmd, alloc);
|
||||
/*
|
||||
* Unmapping a VPE is self-synchronizing on GICv4.1,
|
||||
|
@ -809,13 +809,13 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
|
|||
its_encode_vpt_addr(cmd, vpt_addr);
|
||||
its_encode_vpt_size(cmd, LPI_NRBITS - 1);
|
||||
|
||||
alloc = !atomic_fetch_inc(&desc->its_vmapp_cmd.vpe->vmapp_count);
|
||||
|
||||
if (!is_v4_1(its))
|
||||
goto out;
|
||||
|
||||
vconf_addr = virt_to_phys(page_address(desc->its_vmapp_cmd.vpe->its_vm->vprop_page));
|
||||
|
||||
alloc = !atomic_fetch_inc(&desc->its_vmapp_cmd.vpe->vmapp_count);
|
||||
|
||||
its_encode_alloc(cmd, alloc);
|
||||
|
||||
/* We can only signal PTZ when alloc==1. Why do we have two bits? */
|
||||
|
@ -3802,13 +3802,6 @@ static int its_vpe_set_affinity(struct irq_data *d,
|
|||
unsigned long flags;
|
||||
int from, cpu;
|
||||
|
||||
/*
|
||||
* Check if we're racing against a VPE being destroyed, for
|
||||
* which we don't want to allow a VMOVP.
|
||||
*/
|
||||
if (!atomic_read(&vpe->vmapp_count))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Changing affinity is mega expensive, so let's be as lazy as
|
||||
* we can and only do it if we really have to. Also, if mapped
|
||||
|
@ -4445,8 +4438,9 @@ static int its_vpe_init(struct its_vpe *vpe)
|
|||
raw_spin_lock_init(&vpe->vpe_lock);
|
||||
vpe->vpe_id = vpe_id;
|
||||
vpe->vpt_page = vpt_page;
|
||||
if (gic_rdists->has_rvpeid)
|
||||
atomic_set(&vpe->vmapp_count, 0);
|
||||
if (!gic_rdists->has_rvpeid)
|
||||
else
|
||||
vpe->vpe_proxy_event = -1;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -58,11 +58,9 @@ struct its_vpe {
|
|||
bool enabled;
|
||||
bool group;
|
||||
} sgi_config[16];
|
||||
};
|
||||
};
|
||||
|
||||
/* Track the VPE being mapped */
|
||||
atomic_t vmapp_count;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* Ensures mutual exclusion between affinity setting of the
|
||||
|
|
Loading…
Reference in a new issue