From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935434AbbI2Sak (ORCPT ); Tue, 29 Sep 2015 14:30:40 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:57777 "EHLO e23smtp09.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935302AbbI2Sad (ORCPT ); Tue, 29 Sep 2015 14:30:33 -0400 X-Helo: d23dlp01.au.ibm.com X-MailFrom: raghavendra.kt@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Message-ID: <560AD8E5.1000001@linux.vnet.ibm.com> Date: Wed, 30 Sep 2015 00:01:01 +0530 From: Raghavendra K T Organization: IBM User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Nishanth Aravamudan CC: benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, anton@samba.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, cl@linux.com, gkurz@linux.vnet.ibm.com, grant.likely@linaro.org, nikunj@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com Subject: Re: [PATCH RFC 2/5] powerpc:numa Rename functions referring to nid as chipid References: <1443378553-2146-1-git-send-email-raghavendra.kt@linux.vnet.ibm.com> <1443378553-2146-3-git-send-email-raghavendra.kt@linux.vnet.ibm.com> <20150928172702.GB48470@linux.vnet.ibm.com> In-Reply-To: <20150928172702.GB48470@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15092918-0033-0000-0000-000002301FB2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/28/2015 10:57 PM, Nishanth Aravamudan wrote: > On 27.09.2015 [23:59:10 +0530], Raghavendra K T wrote: >> There is no change in the fuctionality >> >> Signed-off-by: Raghavendra K T >> --- >> arch/powerpc/mm/numa.c | 42 +++++++++++++++++++++--------------------- >> 1 file changed, 21 insertions(+), 21 deletions(-) >> >> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c >> index d5e6eee..f84ed2f 100644 >> --- a/arch/powerpc/mm/numa.c >> +++ b/arch/powerpc/mm/numa.c >> @@ -235,47 +235,47 @@ static void initialize_distance_lookup_table(int nid, >> } >> } >> >> -/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa >> +/* Returns chipid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa >> * info is found. >> */ >> -static int associativity_to_nid(const __be32 *associativity) >> +static int associativity_to_chipid(const __be32 *associativity) > > This is confusing to me. This function is also used by the DLPAR code > under PowerVM to indicate what node the CPU is on -- not a chip (which I > don't believe is exposed at all under PowerVM). > Good point. should I retain the name nid? or any suggestions? instead of chipid -> nid which fits both the cases. or should I rename like nid->vnid something? [...] >> @@ -1415,7 +1415,7 @@ int arch_update_cpu_topology(void) >> >> /* Use associativity from first thread for all siblings */ >> vphn_get_associativity(cpu, associativity); >> - new_nid = associativity_to_nid(associativity); >> + new_nid = associativity_to_chipid(associativity); > > If you are getting a chipid, shouldn't you be assigning it to a variable > called 'new_chipid'? yes perhaps. my splitting idea was 1. change nid name in functions to chipid (without changing nid variable calling that function) 2. rename variables to chipid and assign nid=chipid (1:1 mapping) 3. now let nid = mapped chipid But I see that it isn't consistent in some places. do you think merging step 1 and step 2 is okay?