summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Aoqui <victora@linux.vnet.ibm.com>2017-07-20 14:26:06 -0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-01 21:49:23 +1000
commit75f327c6b75715f3a090daeb33e05003aaffb010 (patch)
tree706f9ad972c7a968b4fd81d3c5cda532bd472f45
parent24be85a23d1fcdc72264a062a2e4ebaaea48feab (diff)
downloadop-kernel-dev-75f327c6b75715f3a090daeb33e05003aaffb010.zip
op-kernel-dev-75f327c6b75715f3a090daeb33e05003aaffb010.tar.gz
powerpc/kernel: Avoid preemption check in iommu_range_alloc()
Replace the __this_cpu_read() with raw_cpu_read() in iommu_range_alloc(). Otherwise we get a warning about using __this_cpu_read() in preemptible code: BUG: using __this_cpu_read() in preemptible caller is iommu_range_alloc+0xa8/0x3d0 Preemption doesn't need to be disabled since according to the comment any CPU can safely use any IOMMU pool. Signed-off-by: Victor Aoqui <victora@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/kernel/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 233ca3f..0e49a45 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -208,7 +208,7 @@ static unsigned long iommu_range_alloc(struct device *dev,
* We don't need to disable preemption here because any CPU can
* safely use any IOMMU pool.
*/
- pool_nr = __this_cpu_read(iommu_pool_hash) & (tbl->nr_pools - 1);
+ pool_nr = raw_cpu_read(iommu_pool_hash) & (tbl->nr_pools - 1);
if (largealloc)
pool = &(tbl->large_pool);
OpenPOWER on IntegriCloud