Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbdHBIx2 (ORCPT ); Wed, 2 Aug 2017 04:53:28 -0400 Received: from mga11.intel.com ([192.55.52.93]:4729 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594AbdHBIwe (ORCPT ); Wed, 2 Aug 2017 04:52:34 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,310,1498546800"; d="scan'208";a="294597213" From: "Huang, Ying" To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Huang Ying , Joerg Roedel , iommu@lists.linux-foundation.org Subject: [PATCH 2/3] iova: Use alloc_percpu_aligned() Date: Wed, 2 Aug 2017 16:52:19 +0800 Message-Id: <20170802085220.4315-3-ying.huang@intel.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170802085220.4315-1-ying.huang@intel.com> References: <20170802085220.4315-1-ying.huang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 27 From: Huang Ying To use the newly introduced alloc_percpu_aligned(), which can allocate cache line size aligned percpu memory dynamically. Signed-off-by: "Huang, Ying" Cc: Joerg Roedel 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