Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1755621imm; Wed, 23 May 2018 23:57:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp7fxSzeq33J+rgMoEzc3xKEspxpNeKH1HdSpUUU5kVLIDhKGk9vHQhidLDZpKVGIxk8SbX X-Received: by 2002:a65:4a02:: with SMTP id s2-v6mr4771794pgq.265.1527145036007; Wed, 23 May 2018 23:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527145035; cv=none; d=google.com; s=arc-20160816; b=YyQfCHXIjdBomAHLGm+orRdOT9A3unHTdPqwuTiexqFcKQVEfdPuIiWv2neJoCPIwA 9aP/woIE/t3otytKrD5NcBbSYTNlf4v9e3MKC7RhtkUE3cejefbgwhJx8hrnnbOudYjY KRIQH9LDpijxJvegdXECEa7N/0vMsX1M2ll+f7uoqdxqY6ix6Uj+Njm9cEGPfxf3bk75 wo3wfLaitLHpO1qnatK8AlKBxgZIf+21CKGuo+L7UvhCxIppPkcSUlWOgx+V5s0z12Jw syvL2x3Gi8ljqwfjjql1LHgvwy/Ps6o07ISPEnN6bHipWXDUpvrHYD5ohwao+yd2HC0T Q25A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=rwzetH8SMDgQU75BPHVMuewliDbFeYyUoTCOqgcydSM=; b=LrZ2Iyr22MfoQmgCtUGozOxZV469Zgtt3RPidUwB/7pufx2yk1dcY3+Lh9B0C5uTPW xKOLfufdc1F6pMSsG3iAr/v6URWStMaMMAnDJvTR4loYbGK8hDN956PjgFjAGcdyGpQC c8BY8LH200XWrT1RW9eVhLnhxnFt5ZDHgsEE38BZQwDkievpvA3zOkKnIHccZ1YEW+zY ruWXY1e1r80a0Xz7g5IOvCEwCTPLUxE7x1HTMaucMN3OeUfyd7zdQBAGfioWjk1uYanc BfTc20/GG5kSxWgLoGRojzqeULz7012jpn9E2UN+YNl7HWHRqXk3K1j7Vp7COwocgUl5 7WGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23-v6si20923022plr.458.2018.05.23.23.56.47; Wed, 23 May 2018 23:57:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935559AbeEXGxy (ORCPT + 99 others); Thu, 24 May 2018 02:53:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45898 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751158AbeEXGxx (ORCPT ); Thu, 24 May 2018 02:53:53 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4O6mr0P022785 for ; Thu, 24 May 2018 02:53:52 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j5ra9rft5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 24 May 2018 02:53:52 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 May 2018 07:53:51 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 24 May 2018 07:53:49 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4O6rmBq53412004; Thu, 24 May 2018 06:53:49 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 68146A4057; Thu, 24 May 2018 07:45:08 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71CD2A405D; Thu, 24 May 2018 07:45:07 +0100 (BST) Received: from aksadiga.ibm (unknown [9.124.35.109]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 24 May 2018 07:45:07 +0100 (BST) Date: Thu, 24 May 2018 12:23:45 +0530 From: Akshay Adiga To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: npiggin@gmail.com, ego@linux.vnet.ibm.com, mpe@ellerman.id.au Subject: Re: [PATCH] cpuidle/powernv : init all present cpus for deep states References: <1526472134-23757-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526472134-23757-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> User-Agent: NeoMutt/20170306 (1.8.0) X-TM-AS-GCONF: 00 x-cbid: 18052406-0040-0000-0000-0000043D4AB3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052406-0041-0000-0000-000026428605 Message-Id: <20180524065345.yuqb76aerxjnn3pk@aksadiga.ibm> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-24_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805240083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 16, 2018 at 05:32:14PM +0530, Akshay Adiga wrote: > Init all present cpus for deep states instead of "all possible" cpus. > Init fails if the possible cpu is gaurded. Resulting in making only > non-deep states available for cpuidle/hotplug. > > Signed-off-by: Akshay Adiga > --- > arch/powerpc/platforms/powernv/idle.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c > index 1f12ab1..1c5d067 100644 > --- a/arch/powerpc/platforms/powernv/idle.c > +++ b/arch/powerpc/platforms/powernv/idle.c > @@ -79,7 +79,7 @@ static int pnv_save_sprs_for_deep_states(void) > uint64_t msr_val = MSR_IDLE; > uint64_t psscr_val = pnv_deepest_stop_psscr_val; > > - for_each_possible_cpu(cpu) { > + for_each_present_cpu(cpu) { > uint64_t pir = get_hard_smp_processor_id(cpu); > uint64_t hsprg0_val = (uint64_t)paca_ptrs[cpu]; > > @@ -814,7 +814,7 @@ static int __init pnv_init_idle_states(void) > int cpu; > > pr_info("powernv: idle: Saving PACA pointers of all CPUs in their thread sibling PACA\n"); > - for_each_possible_cpu(cpu) { > + for_each_present_cpu(cpu) { > int base_cpu = cpu_first_thread_sibling(cpu); > int idx = cpu_thread_in_core(cpu); > int i; > -- > 2.5.5 > Missed CC'ing to mpe@ellerman.id.au