Skip to contentSkip to conversation

powerpc/kernel: Avoid preemption check during iommu_range_alloc

PATCH Applied Victor Aoqui 2 participants 2 messages Jul 20, 2017 – Aug 7, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/kernel: Avoid preemption check during iommu_range_alloc

Replaced __this_cpu_read function call by raw_cpu_read in iommu_range_alloc function.
Preemption doesn't need to be disabled since any CPU can safely use IOMMU pool.

---
 arch/powerpc/kernel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/iommu.c +1 -1
index 233ca3f..0e49a45 100644
@@ -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);
Signature · 1 line
1.8.3.1