* [PATCH] powerpc/kernel: Avoid preemption check during iommu_range_alloc
@ 2017-07-20 17:26 Victor Aoqui
2017-08-07 10:41 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Victor Aoqui @ 2017-07-20 17:26 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, aneesh.kumar, mpe, khandual
Cc: victora, victora, mauricfo
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.
Signed-off-by: Victor Aoqui <victora@linux.vnet.ibm.com>
---
arch/powerpc/kernel/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/kernel: Avoid preemption check during iommu_range_alloc
2017-07-20 17:26 [PATCH] powerpc/kernel: Avoid preemption check during iommu_range_alloc Victor Aoqui
@ 2017-08-07 10:41 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-08-07 10:41 UTC (permalink / raw)
To: victora, linux-kernel, linuxppc-dev, aneesh.kumar, khandual
Cc: victora, mauricfo, victora
On Thu, 2017-07-20 at 17:26:06 UTC, victora wrote:
> 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.
>
> Signed-off-by: Victor Aoqui <victora@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/75f327c6b75715f3a090daeb33e050
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-07 10:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 17:26 [PATCH] powerpc/kernel: Avoid preemption check during iommu_range_alloc Victor Aoqui
2017-08-07 10:41 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).