Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbdDMLfY (ORCPT ); Thu, 13 Apr 2017 07:35:24 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51158 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751423AbdDMLfW (ORCPT ); Thu, 13 Apr 2017 07:35:22 -0400 Date: Thu, 13 Apr 2017 17:05:13 +0530 From: Gautham R Shenoy To: Michael Ellerman Cc: Michael Neuling , "Gautham R. Shenoy" , Benjamin Herrenschmidt , "Shreyas B. Prabhu" , Shilpasri G Bhat , Vaidyanathan Srinivasan , Anton Blanchard , Balbir Singh , Akshay Adiga , Nicholas Piggin , Mahesh J Salgaonkar , "Aneesh Kumar K.V" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] powernv:idle: Use correct IDLE_THREAD_BITS in POWER8/9 Reply-To: ego@linux.vnet.ibm.com References: <1b89d07b1a7ea140501a86b1ed246c5af1b0ce83.1491996797.git.ego@linux.vnet.ibm.com> <1492065380.4624.50.camel@neuling.org> <87bms0aapc.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bms0aapc.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 17041311-0028-0000-0000-0000076646BC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006928; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00846962; UDB=6.00417823; IPR=6.00625395; BA=6.00005288; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015031; XFM=3.00000013; UTC=2017-04-13 11:35:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041311-0029-0000-0000-00003511B4BD Message-Id: <20170413113513.GA2425@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-13_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704130097 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 856 Lines: 27 On Thu, Apr 13, 2017 at 08:00:47PM +1000, Michael Ellerman wrote: > Michael Neuling writes: > > > On Wed, 2017-04-12 at 17:16 +0530, Gautham R. Shenoy wrote: > >> From: "Gautham R. Shenoy" > >> > >> This patch ensures that POWER8 and POWER9 processors use the correct > >> value of IDLE_THREAD_BITS as POWER8 has 8 threads per core and hence > >> the IDLE_THREAD_BITS should be 0xFF while POWER9 has only 4 threads > >> per core and hence the IDLE_THREAD_BITS should be 0xF. > > > > Why don't we derive this from the device tree rather than hard wiring it per cpu > > type? > > Right. > > In fact we already have threads_per_core which is exactly that. Ok. I will convert IDLE_THREAD_BITS to a variable instead of a macro so that the variable holds the value (1 << threads_per_core) - 1. > > cheers >