Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01ee04ba authored by Scott Wood's avatar Scott Wood Committed by Joerg Roedel
Browse files

iommu/amd: Don't use dev_data in irte_ga_set_affinity()



search_dev_data() acquires a non-raw lock, which can't be done
from atomic context on PREEMPT_RT.  There is no need to look at
dev_data because guest_mode should never be set if use_vapic is
not set.

Signed-off-by: default avatarScott Wood <swood@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 27790398
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -3877,10 +3877,8 @@ static void irte_ga_set_affinity(void *entry, u16 devid, u16 index,
				 u8 vector, u32 dest_apicid)
{
	struct irte_ga *irte = (struct irte_ga *) entry;
	struct iommu_dev_data *dev_data = search_dev_data(devid);

	if (!dev_data || !dev_data->use_vapic ||
	    !irte->lo.fields_remap.guest_mode) {
	if (!irte->lo.fields_remap.guest_mode) {
		irte->hi.fields.vector = vector;
		irte->lo.fields_remap.destination = dest_apicid;
		modify_irte_ga(devid, index, irte, NULL);