Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932072AbdGVDYY (ORCPT ); Fri, 21 Jul 2017 23:24:24 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:10243 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbdGVDYW (ORCPT ); Fri, 21 Jul 2017 23:24:22 -0400 Subject: Re: [PATCH v3 2/2] acpi/iort: numa: Add numa node mapping for smmuv3 devices To: Ganapatrao Kulkarni , , , , References: <1496897059-8272-1-git-send-email-ganapatrao.kulkarni@cavium.com> <1496897059-8272-3-git-send-email-ganapatrao.kulkarni@cavium.com> CC: , , , , , , , , , , From: Hanjun Guo Message-ID: <5972C54F.6030000@huawei.com> Date: Sat, 22 Jul 2017 11:23:59 +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: <1496897059-8272-3-git-send-email-ganapatrao.kulkarni@cavium.com> Content-Type: text/plain; charset="utf-8" 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.0A020203.5972C55C.0023,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: 5d68ebb20ffde664b74221ea45763127 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1247 Lines: 36 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