From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964886AbcBBQ6z (ORCPT ); Tue, 2 Feb 2016 11:58:55 -0500 Received: from foss.arm.com ([217.140.101.70]:57029 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964833AbcBBQ6w (ORCPT ); Tue, 2 Feb 2016 11:58:52 -0500 Date: Tue, 2 Feb 2016 17:00:43 +0000 From: Lorenzo Pieralisi To: Hanjun Guo Cc: Robert Richter , Hanjun Guo , "Rafael J. Wysocki" , Will Deacon , Catalin Marinas , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ganapatrao Kulkarni , Shannon Zhao , Steve Capper , Mark Rutland Subject: Re: [PATCH v3 05/12] arm64, acpi, numa: NUMA support based on SRAT and SLIT Message-ID: <20160202170043.GA30358@red-moon> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> <1453541967-3744-6-git-send-email-guohanjun@huawei.com> <20160201180944.GV24726@rric.localdomain> <56B09344.4000100@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56B09344.4000100@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 02, 2016 at 07:30:12PM +0800, Hanjun Guo wrote: [...] > >How about the following (similar to x86)? > > > >---- > > if (!numa_off) { > >#ifdef CONFIG_ACPI_NUMA > > if (!numa_init(acpi_numa_init)) > > return 0; > >#endif > >#ifdef CONFIG_OF_NUMA > > if (!numa_init(of_numa_init)) > > return 0; > >#endif > > } > > > > return numa_init(dummy_numa_init); > >---- > > > >Pretty straight and nice. > > > >Note: The !acpi_disabled check needs to be moved to the beginning of > >acpi_numa_init(). Variable ret can be removed. > > Lorenzo suggested to remove it, Lorenzo, what's your opinion here? I do not think it is a big deal. OF is not a fall-back for ACPI, which is what the code above may make us think, either you parse ACPI or you parse DT. I will have a look at the complete code to check if we can rewrite it differently but I would not be too worried about it. Lorenzo