diff options
author | Scott Wood <swood@redhat.com> | 2018-01-28 14:22:19 -0600 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-02-13 14:18:06 +0100 |
commit | 01ee04badefd296eb7a4430497373be9b7b16783 (patch) | |
tree | 052d934c5c284606d63ed20e44db4b19ede82d0d /drivers/iommu | |
parent | 27790398c2aed917828dc3c6f81240d57f1584c9 (diff) | |
download | talos-obmc-linux-01ee04badefd296eb7a4430497373be9b7b16783.tar.gz talos-obmc-linux-01ee04badefd296eb7a4430497373be9b7b16783.zip |
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: Scott Wood <swood@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index d227f761cc21..d666246ac30b 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -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); |