Joerg Roedel 4bf5beef57 iommu/amd: Don't put completion-wait semaphore on stack
The semaphore used by the AMD IOMMU to signal command
completion lived on the stack until now, which was safe as
the driver busy-waited on the semaphore with IRQs disabled,
so the stack can't go away under the driver.

But the recently introduced vmap-based stacks break this as
the physical address of the semaphore can't be determinded
easily anymore. The driver used the __pa() macro, but that
only works in the direct-mapping. The result were
Completion-Wait timeout errors seen by the IOMMU driver,
breaking system boot.

Since putting the semaphore on the stack is bad design
anyway, move the semaphore into 'struct amd_iommu'. It is
protected by the per-iommu lock and now in the direct
mapping again. This fixes the Completion-Wait timeout errors
and makes AMD IOMMU systems boot again with vmap-based
stacks enabled.

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-09-15 11:28:19 +02:00
..
2016-09-06 11:02:36 -07:00
2016-09-07 21:24:42 -07:00
2016-09-09 14:52:05 -07:00
2016-07-30 21:01:36 -07:00
2016-09-03 10:40:57 -07:00
2016-07-30 21:01:36 -07:00
2016-08-04 09:59:37 -04:00
2016-08-01 18:36:01 -04:00
2016-07-20 23:39:36 -07:00
2016-09-11 14:41:49 -07:00
2016-09-14 14:06:30 -07:00
2016-08-12 14:59:10 +05:30
2016-08-06 00:01:33 -04:00
2016-08-05 09:48:22 -04:00
2016-09-06 11:06:52 -07:00
2016-08-01 18:36:01 -04:00
2016-09-09 15:11:35 +02:00
2016-08-02 19:35:40 -04:00
2016-08-06 09:20:13 -04:00