From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6CBAC2C011B for ; Wed, 14 Aug 2013 07:07:40 +1000 (EST) Message-ID: <1376428024.4255.14.camel@pasglop> Subject: Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12 From: Benjamin Herrenschmidt To: Sudeep KarkadaNagesha Date: Wed, 14 Aug 2013 07:07:04 +1000 In-Reply-To: <520A7B00.8060405@arm.com> References: <5208E2D3.7060005@arm.com> <3356439.a21MloFP7n@vostro.rjw.lan> <520A536C.3030600@arm.com> <520A7B00.8060405@arm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: "devicetree@vger.kernel.org" , "linux-pm@vger.kernel.org" , Viresh Kumar , "linux-kernel@vger.kernel.org" , "rob.herring@calxeda.com" , "Rafael J. Wysocki" , Olof Johansson , "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2013-08-13 at 19:29 +0100, Sudeep KarkadaNagesha wrote: > I don't understand completely the use of ibm,ppc-interrupt-server#s and > its implications on generic of_get_cpu_node implementation. > I see the PPC specific definition of of_get_cpu_node uses thread id only > in 2 instances. Based on that, I have tried to move all the other > instances to use generic definition. > > Let me know if the idea is correct. No. The device-tree historically only represents cores, not HW threads, so it makes sense to retrieve also the thread number corresponding to the CPU. However, the mechanism to represent HW threads in the device-tree is currently somewhat platform specific (the ibm,ppc-interrupt-server#s). So what you could do for now is: - Have a generic version that always returns 0 as the thread, which is weak - powerpc keeps its own implementation - Start a discussion on the bindings (if not already there) to define threads in a better way at which point the generic function can be updated. Cheers, Ben.