Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752248AbdGVNFq (ORCPT ); Sat, 22 Jul 2017 09:05:46 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38846 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbdGVNFo (ORCPT ); Sat, 22 Jul 2017 09:05:44 -0400 MIME-Version: 1.0 In-Reply-To: <5972C54F.6030000@huawei.com> References: <1496897059-8272-1-git-send-email-ganapatrao.kulkarni@cavium.com> <1496897059-8272-3-git-send-email-ganapatrao.kulkarni@cavium.com> <5972C54F.6030000@huawei.com> From: Ganapatrao Kulkarni Date: Sat, 22 Jul 2017 18:35:43 +0530 Message-ID: Subject: Re: [PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices To: Hanjun Guo Cc: Ganapatrao Kulkarni , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, Will Deacon , Lorenzo Pieralisi , Hanjun Guo , sudeep.holla@arm.com, Robin Murphy , Lv Zheng , joro@8bytes.org, "Rafael J. Wysocki" , Len Brown , Jayachandran C Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1619 Lines: 47 On Sat, Jul 22, 2017 at 8:53 AM, Hanjun Guo wrote: > Hi Ganapat, > > On 2017/6/8 12:44, Ganapatrao Kulkarni wrote: >> Add code to parse proximity domain in SMMUv3 IORT table to >> set numa node mapping for smmuv3 devices. >> >> Signed-off-by: Ganapatrao Kulkarni >> --- >> drivers/acpi/arm64/iort.c | 28 ++++++++++++++++++++++++++-- >> 1 file changed, 26 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c >> index bba2b59..e804386 100644 >> --- a/drivers/acpi/arm64/iort.c >> +++ b/drivers/acpi/arm64/iort.c >> @@ -882,6 +882,23 @@ static bool __init arm_smmu_v3_is_coherent(struct acpi_iort_node *node) >> return smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE; >> } >> >> +/* >> + * set numa proximity domain for smmuv3 device >> + */ >> +static void __init arm_smmu_v3_set_proximity(struct acpi_iort_node *node, >> + struct device *dev) >> +{ >> + struct acpi_iort_smmu_v3 *smmu; >> + >> + smmu = (struct acpi_iort_smmu_v3 *)node->node_data; >> + if (smmu->flags & ACPI_IORT_SMMU_V3_PXM_VALID) { >> + set_dev_node(dev, acpi_map_pxm_to_node(smmu->pxm)); > ^^ > Will have compile error in !CONFIG_NUMA, I think we need to introduce > a stub function in acpi_numa.h. thanks Hanjun, i thought it is already there in header file, however, there is stub for acpi_map_pxm_to_online_node and not for this function. it is better to have ifdef. will do it in next version. > > Thanks > Hanjun > thanks Ganapat