Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752236AbdGEQjE (ORCPT ); Wed, 5 Jul 2017 12:39:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47639 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751987AbdGEQjB (ORCPT ); Wed, 5 Jul 2017 12:39:01 -0400 From: "Gautham R. Shenoy" To: Michael Ellerman , Michael Neuling , Nicholas Piggin , Vaidyanathan Srinivasan , Shilpasri G Bhat , "Rafael J. Wysocki" , Akshay Adiga Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, "Gautham R. Shenoy" Subject: [PATCH 0/5] powernv:idle: Cleanup idle states initialization Date: Wed, 5 Jul 2017 22:08:11 +0530 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 17070516-0016-0000-0000-0000071C303F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007324; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00883263; UDB=6.00440614; IPR=6.00663454; BA=6.00005454; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016094; XFM=3.00000015; UTC=2017-07-05 16:38:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17070516-0017-0000-0000-00003A6F98F6 Message-Id: <1499272696-28751-1-git-send-email-ego@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-05_10:,, 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-1703280000 definitions=main-1707050280 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1987 Lines: 50 From: "Gautham R. Shenoy" Hi, This patch set aims at cleaning up the powernv idle initialization code mainly covering the following a) Currently there is redundant code for parsing the device-tree for idle states. We do it in two places, once during the platform idle initialization, once more when the cpidle driver initializes. In this patchset the device-tree is parsed only once and we maintain an in-kernel data structure with the details of each platform idle state. The cpu-idle initialization code looks at this data structure for initializing cpuidle states. This makes the cpuidle driver initialization more streamlined. b) Currently the idle initialzation code for power8 and power9 are mixed up. In this patchset we segregate them into their respective functions for improved readability. c) The current code has a bug when the Sleep-Winkle-Engine is unable to restore the hypervisor states for the deep idle states that lose full hypervisor context, since in such cases we don't disable such deep states. Thus, the CPUs that enter such deep states don't wakeup correctly. Patch 1 in the series addresses a). Patches 2,3,4 address b) Patch 5 fixes the bug c) These patches are applied on top of next branch of the powerpc-linux git tree. The patches have been tested on POWER8 and POWER9. Gautham R. Shenoy (5): powernv:idle: Move device-tree parsing to one place. powernv:idle: Change return type of pnv_probe_idle_states to int powernv:idle: Define idle init function for power8 powernv:idle: Move initialization of sibling pacas to pnv_alloc_idle_core_states powernv:idle: Disable LOSE_FULL_CONTEXT states when stop-api fails. arch/powerpc/include/asm/cpuidle.h | 32 +- arch/powerpc/platforms/powernv/idle.c | 576 ++++++++++++++++++++++++++-------- drivers/cpuidle/cpuidle-powernv.c | 233 ++++---------- 3 files changed, 521 insertions(+), 320 deletions(-) -- 1.9.4