From: "Huang, Ying" <ying.huang@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Huang Ying <ying.huang@intel.com>,
Joerg Roedel <joro@8bytes.org>,
iommu@lists.linux-foundation.org
Subject: [PATCH 2/3] iova: Use alloc_percpu_aligned()
Date: Wed, 2 Aug 2017 16:52:19 +0800 [thread overview]
Message-ID: <20170802085220.4315-3-ying.huang@intel.com> (raw)
In-Reply-To: <20170802085220.4315-1-ying.huang@intel.com>
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
parent reply other threads:[~2017-08-02 8:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20170802085220.4315-1-ying.huang@intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170802085220.4315-3-ying.huang@intel.com \
--to=ying.huang@intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).