iommu/amd: Fix amd_iommu_free_device()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 3 Feb 2015 12:25:51 +0000 (13:25 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 Feb 2015 14:33:36 +0000 (15:33 +0100)
commit91f65facba5add493fffb643acdb258bd9f54eb2
tree7bebcccc51912a17e346d02a144852a0bf71b0dd
parente36f014edff70fc02b3d3d79cead1d58f289332e
iommu/amd: Fix amd_iommu_free_device()

put_device_state_wait() doesn't loop on the condition and a spurious
wakeup will have it free the device state even though there might still
be references out to it.

Fix this by using 'normal' wait primitives.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_v2.c