Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1701923 > unrolled thread

[PATCH 2/3] iova: Use alloc_percpu_aligned()

Started by"Huang, Ying" <ying.huang@intel.com>
First post2017-08-02 11:00 +0200
Last post2017-08-02 11:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/3] iova: Use alloc_percpu_aligned() "Huang, Ying" <ying.huang@intel.com> - 2017-08-02 11:00 +0200

#1701923 — [PATCH 2/3] iova: Use alloc_percpu_aligned()

From"Huang, Ying" <ying.huang@intel.com>
Date2017-08-02 11:00 +0200
Subject[PATCH 2/3] iova: Use alloc_percpu_aligned()
Message-ID<u9XFw-7As-23@gated-at.bofh.it>
From: Huang Ying <ying.huang@intel.com>

To use the newly introduced alloc_percpu_aligned(), which can allocate
cache line size aligned percpu memory dynamically.

Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
---
 drivers/iommu/iova.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index 246f14c83944..83196f8e8fd5 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -698,7 +698,7 @@ static void init_iova_rcaches(struct iova_domain *iovad)
 		rcache = &iovad->rcaches[i];
 		spin_lock_init(&rcache->lock);
 		rcache->depot_size = 0;
-		rcache->cpu_rcaches = __alloc_percpu(sizeof(*cpu_rcache), cache_line_size());
+		rcache->cpu_rcaches = alloc_percpu_aligned(*cpu_rcache);
 		if (WARN_ON(!rcache->cpu_rcaches))
 			continue;
 		for_each_possible_cpu(cpu) {
-- 
2.13.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web