Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751157AbdFBDvT (ORCPT ); Thu, 1 Jun 2017 23:51:19 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:6861 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751122AbdFBDvR (ORCPT ); Thu, 1 Jun 2017 23:51:17 -0400 Subject: Re: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices To: Lorenzo Pieralisi , Ganapatrao Kulkarni References: <1496325937-21113-1-git-send-email-ganapatrao.kulkarni@cavium.com> <20170601162142.GC19003@red-moon> CC: , , , , , , , , , , , , , "Lv Zheng" From: Hanjun Guo Message-ID: <5930E085.8000404@huawei.com> Date: Fri, 2 Jun 2017 11:50:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20170601162142.GC19003@red-moon> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.5930E0AF.0147,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 28d47660eae5b339418d3d1f3239023e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1787 Lines: 55 [+Cc Lv Zheng] On 2017/6/2 0:21, Lorenzo Pieralisi wrote: > On Thu, Jun 01, 2017 at 07:35:37PM +0530, Ganapatrao Kulkarni wrote: >> ARM IORT specification has provision to define Proximity domain >> in SMMUv3 IORT table. Adding required code to parse Proximity domain of >> SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node >> of SMMUv3 platform devices. >> >> Signed-off-by: Ganapatrao Kulkarni >> --- >> drivers/iommu/arm-smmu-v3.c | 6 ++++++ >> include/acpi/actbl2.h | 4 ++++ >> 2 files changed, 10 insertions(+) >> >> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c >> index 69d8506..98c2319 100644 >> --- a/drivers/iommu/arm-smmu-v3.c >> +++ b/drivers/iommu/arm-smmu-v3.c >> @@ -2667,6 +2667,12 @@ static int arm_smmu_device_acpi_probe(struct platform_device *pdev, >> if (iort_smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE) >> smmu->features |= ARM_SMMU_FEAT_COHERENCY; >> >> + /* set numa proximity domain for smmv3 device */ >> + if (iort_smmu->flags & ACPI_IORT_SMMU_V3_PXM) { >> + set_dev_node(dev, acpi_map_pxm_to_node(iort_smmu->pxm)); >> + dev_info(dev, "on NUMA node %d\n", dev_to_node(dev)); > It should be done in acpi/arm64/iort.c at device creation time. Agreed. > >> + } >> + >> return 0; >> } >> #else >> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h >> index 4b306a6..c16ced8 100644 >> --- a/include/acpi/actbl2.h >> +++ b/include/acpi/actbl2.h >> @@ -805,6 +805,9 @@ struct acpi_iort_smmu_v3 { >> u32 pri_gsiv; >> u32 gerr_gsiv; >> u32 sync_gsiv; >> + u8 pxm; >> + u8 reserved1; >> + u16 reserved2; I think changes to actbl2.h need to be split as a new patch which go via ACPICA updates, Lv, could you share your comments here? Thanks Hanjun