Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1909857imm; Wed, 16 May 2018 05:04:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpAgSW8Zrt7OoKgxI7RcCb/CiJEEpq6lk0QjKuP8jCOuOqxlDQzDTB6bS0WxKcVKtMf7tAo X-Received: by 2002:a63:6016:: with SMTP id u22-v6mr545373pgb.284.1526472265949; Wed, 16 May 2018 05:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526472265; cv=none; d=google.com; s=arc-20160816; b=vqF2PlfQR7Tp0xUJ7KWXvrjUYBcpyPdku8DPVMI4XxOZhxZoyIZVB7bKEY2n+iMUUw pEzMjVOW03DatTj5dSZFbDwZfo17pUc4fseSiQZQWO+r7Pv4uPnTU95BigI324JuFOLA oHx9TMK/cWVWhf1tsLS14CyQ4BhTD4RlyIpGO+eTp8TiYouEV4U5kWHigAEa1KgeQoOt 6Y2wOxPdIReVdIdXpPSoF6e2lNVjlgqI3jMCaMBncng+b1WfGQAbq6TC6gBDycW4D7SH c3auGB70ZDX/alHDJxPN9KIui4AYZpBw6g0TpqH9GHJbmAis+B9sefc3c+2sjYEUbOPn YFFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7mfDKpTly7CiGAUWRCqKPqKj6Kll8Y4Uwe6MAL2fVOQ=; b=tSOhCZWv/pqqMeClyTjBc4R/ZsNz4ATytQlw8BZr43vEqQ2GB737X6vi4xu6oRhRWR Ids6FiCtn93sWLterPSlx54J1M/BKL0L6zI0Z/DjzM+8tfpNNEcFw0xPTvya5MTqwsE/ AOO3601swnApIjiLMypUw1uKoYVUk5MbREI9fb4DMauzl6yqCQ4VFZbc4FWEtGJhlkM5 LmZ8OTBAXxmyEKA9FnW/OSP3VHfd+IMkrXS+lCRtLQc92GAFrYXeedUIRb9p7gL+QaJJ 4HcOKzqg08U76XHWC5RRZIlOKCGHrlui+WIYghHCBuSVkhN3BRGQcew7S9c82SKKvr3V MyRQ== 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 f1-v6si2504777plf.453.2018.05.16.05.03.48; Wed, 16 May 2018 05:04:25 -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 S1752585AbeEPMCb (ORCPT + 99 others); Wed, 16 May 2018 08:02:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43068 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751786AbeEPMC2 (ORCPT ); Wed, 16 May 2018 08:02:28 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4GBxkiG053496 for ; Wed, 16 May 2018 08:02:28 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j0jx73utw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 May 2018 08:02:26 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 16 May 2018 13:02:25 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 16 May 2018 13:02:21 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4GC2Kiu11993590; Wed, 16 May 2018 12:02:20 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D0CB42049; Wed, 16 May 2018 12:53:12 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4024242052; Wed, 16 May 2018 12:53:10 +0100 (BST) Received: from aksadiga.ibm (unknown [9.195.35.103]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 16 May 2018 12:53:09 +0100 (BST) From: Akshay Adiga To: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: npiggin@gmail.com, mpe@ellerman.id.au, ego@linux.vnet.ibm.com, Akshay Adiga Subject: [PATCH] cpuidle/powernv : init all present cpus for deep states Date: Wed, 16 May 2018 17:32:14 +0530 X-Mailer: git-send-email 2.5.5 X-TM-AS-GCONF: 00 x-cbid: 18051612-0040-0000-0000-0000043A62DB X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051612-0041-0000-0000-0000263F79BD Message-Id: <1526472134-23757-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-16_05:,, 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-1805160123 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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