From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755114AbdGVDxF (ORCPT ); Fri, 21 Jul 2017 23:53:05 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:9398 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753502AbdGVDxD (ORCPT ); Fri, 21 Jul 2017 23:53:03 -0400 Subject: Re: [PATCH] irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES To: Ganapatrao Kulkarni , Marc Zyngier References: <1500630715-2156-1-git-send-email-guohanjun@huawei.com> <5971D208.3040005@huawei.com> <84d411ff-596b-c451-29fb-f506abc4fb04@arm.com> CC: Thomas Gleixner , Lorenzo Pieralisi , , , , Hanjun Guo , Ganapatrao Kulkarni , , From: Hanjun Guo Message-ID: <5972CC05.9010702@huawei.com> Date: Sat, 22 Jul 2017 11:52:37 +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: 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.0A090201.5972CC18.0036,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: 39000866929eed9ceb69f683b912b499 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/7/21 19:42, Ganapatrao Kulkarni wrote: > Hi Hanjun, > > > On Fri, Jul 21, 2017 at 4:50 PM, Marc Zyngier wrote: >> On 21/07/17 11:06, Hanjun Guo wrote: >>> On 2017/7/21 17:51, Hanjun Guo wrote: >>>> From: Hanjun Guo >>>> >>>> When running 4.13-rc1 on top of D05, I got the boot log: >>>> >>>> [ 0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0 >>>> [ 0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0 >>>> [ 0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0 >>>> [ 0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1 >>>> [ 0.000000] SRAT: ITS affinity exceeding max count[4] >>>> >>>> This is wrong on D05 as we have 8 ITSes with 4 NUMA nodes. > Used static array to keep it simple. we can have either dynamic array > or increase static array size (which is in init data) to a larger > number. > We may have to go for dynamic array to be more sane. You can refer my > v2 patch [1], which was doing dynamic allocation and avoids > 2 calls to acpi parser as done in this patch. > > [1] https://patchwork.kernel.org/patch/9798659/ Hmm, although scanning the SRAT twice is bad, it will keep the code simple, and no need to alloc the memory every time when we find a ITS affinity entry, you need to free that memory when ITS probing is done. I will post a patch later, please take a look if it's ok to you :) Thanks Hanjun