]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc/iommu: Fix multiple issues with IOMMU pools code
authorAnton Blanchard <anton@samba.org>
Wed, 3 Oct 2012 18:57:10 +0000 (18:57 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2012 20:50:17 +0000 (05:50 +0900)
commit11464f790b08f7a8b0e5a98b994f53bd33ecb9e4
tree517480d28c88a219b327a3a6cd538d04d56f1e63
parent987bb385ef97fba0dcaf531e63a9bc5ca2e2f9f1
powerpc/iommu: Fix multiple issues with IOMMU pools code

commit d900bd7366463fd96a907b2c212242e2b68b27d8 upstream.

There are a number of issues in the recent IOMMU pools code:

- On a preempt kernel we might switch CPUs in the middle of building
  a scatter gather list. When this happens the handle hint passed in
  no longer falls within the local CPU's pool. Check for this and
  fall back to the pool hint.

- We were missing a spin_unlock/spin_lock in one spot where we
  switch pools.

- We need to provide locking around dart_tlb_invalidate_all and
  dart_tlb_invalidate_one now that the global lock is gone.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/iommu.c
arch/powerpc/sysdev/dart_iommu.c