From patchwork Thu Feb 23 05:37:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shilpasri G Bhat X-Patchwork-Id: 731398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vTNMD319Wz9s7c for ; Thu, 23 Feb 2017 16:38:48 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vTNMD2D8czDqGV for ; Thu, 23 Feb 2017 16:38:48 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vTNM94Y7wzDq5x for ; Thu, 23 Feb 2017 16:38:45 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1N5cgW3016992 for ; Thu, 23 Feb 2017 00:38:43 -0500 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 28srg4acej-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 23 Feb 2017 00:38:43 -0500 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Feb 2017 15:38:31 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 23 Feb 2017 15:38:29 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 4A6D03578053 for ; Thu, 23 Feb 2017 16:38:29 +1100 (EST) Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1N5cLW150397220 for ; Thu, 23 Feb 2017 16:38:29 +1100 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1N5buSj028101 for ; Thu, 23 Feb 2017 16:37:57 +1100 Received: from oc4502181600.ibm.com ([9.79.201.194]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1N5bsi4027532; Thu, 23 Feb 2017 16:37:55 +1100 From: Shilpasri G Bhat To: mikey@neuling.org Date: Thu, 23 Feb 2017 11:07:36 +0530 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022305-0008-0000-0000-0000010DF38C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022305-0009-0000-0000-0000091BC7FD Message-Id: <1487828256-13999-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-23_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702230054 Subject: [Skiboot] [PATCH V2] slw: use only lite stop states for P9 DD1 X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot@lists.ozlabs.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" POWER9 DD1 chip can work with lite stop states now. These STOP states have ESL=EC=0 and provide fast entry/exit. Signed-off-by: Shilpasri G Bhat Signed-off-by: Vaidyanathan Srinivasan --- Changes from V1: - Removed only_lite variable. - Moved the ESL check inside "if (has_stop_inst)" hw/slw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/slw.c b/hw/slw.c index 97d4758..45ea1d3 100644 --- a/hw/slw.c +++ b/hw/slw.c @@ -765,6 +765,11 @@ void add_cpu_idle_state_properties(void) if (has_stop_inst) { u32 level = 31 - (states[i].pm_ctrl_reg_val & OPAL_PM_PSSCR_RL_MASK); + u64 esl = states[i].pm_ctrl_reg_val & + OPAL_PM_PSSCR_ESL; + + if (chip->ec_level == 0x10 && esl) + continue; if (!(stop_levels & (1ul << level))) continue;