Files
linuxkit/kernel/patches-4.14.x-rt/0007-0007-iommu-amd-Don-t-use-dev_data-in-irte_ga_set_affinity.patch
Tiejun Chen ccd9998461 update -rt to 4.14.40-rt30
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-05-15 13:46:26 +08:00

39 lines
1.3 KiB
Diff

From b906b00cd362b81ac8c584c5323c103ed49e5a8b Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
Date: Sun, 28 Jan 2018 14:22:19 -0600
Subject: [PATCH 007/414] iommu/amd: Don't use dev_data in
irte_ga_set_affinity()
Upstream commit 01ee04badefd296eb7a4430497373be9b7b16783
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: Scott Wood <swood@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 5e519630eefb..f8051e20d889 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3861,10 +3861,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);
--
2.17.0