[{"id":1761571,"web_url":"http://patchwork.ozlabs.org/comment/1761571/","msgid":"<76edbbdf-660f-06ad-f1b1-145c3ff8106f@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-01T10:34:51","subject":"Re: [Skiboot] [PATCH 1/3] idle: user context state loss flags fix\n\tfor stop states","submitter":{"id":68766,"url":"http://patchwork.ozlabs.org/api/people/68766/","name":"Akshay Adiga","email":"akshay.adiga@linux.vnet.ibm.com"},"content":"On 08/30/2017 11:50 AM, Nicholas Piggin wrote:\n> The \"lite\" stop variants with PSSCR[ESL]=PSSCR[EC]=1 do not lose user\n> context, while the non-lite variants do (ESL: enable state loss).\n>\n> Some of the POWER9 idle states had these wrong.\n>\n> These are not used by Linux yet.\nThanks Nick for correcting. The patch looks good.\nIt's good to have this patch, in case someone uses this flag in the future.\n\nReviewed-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>\n>\n> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>\n\n> ---\n>  hw/slw.c | 8 ++++----\n>  1 file changed, 4 insertions(+), 4 deletions(-)\n>\n> diff --git a/hw/slw.c b/hw/slw.c\n> index 98040e6e..0720545c 100644\n> --- a/hw/slw.c\n> +++ b/hw/slw.c\n> @@ -526,7 +526,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {\n>  \t\t.residency_ns = 20000,\n>  \t\t.flags = 0*OPAL_PM_DEC_STOP \\\n>  \t\t       | 0*OPAL_PM_TIMEBASE_STOP  \\\n> -\t\t       | 0*OPAL_PM_LOSE_USER_CONTEXT \\\n> +\t\t       | 1*OPAL_PM_LOSE_USER_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_HYP_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_FULL_CONTEXT \\\n>  \t\t       | 1*OPAL_PM_STOP_INST_FAST,\n> @@ -542,7 +542,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {\n>  \t\t.residency_ns = 49000,\n>  \t\t.flags = 0*OPAL_PM_DEC_STOP \\\n>  \t\t       | 0*OPAL_PM_TIMEBASE_STOP  \\\n> -\t\t       | 1*OPAL_PM_LOSE_USER_CONTEXT \\\n> +\t\t       | 0*OPAL_PM_LOSE_USER_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_HYP_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_FULL_CONTEXT \\\n>  \t\t       | 1*OPAL_PM_STOP_INST_FAST,\n> @@ -572,7 +572,7 @@ static struct cpu_idle_states power9_cpu_idle_states[] = {\n>  \t\t.residency_ns = 99000,\n>  \t\t.flags = 0*OPAL_PM_DEC_STOP \\\n>  \t\t       | 0*OPAL_PM_TIMEBASE_STOP  \\\n> -\t\t       | 1*OPAL_PM_LOSE_USER_CONTEXT \\\n> +\t\t       | 0*OPAL_PM_LOSE_USER_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_HYP_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_FULL_CONTEXT \\\n>  \t\t       | 1*OPAL_PM_STOP_INST_FAST,\n> @@ -671,7 +671,7 @@ static struct cpu_idle_states power9_ndd1_cpu_idle_states[] = {\n>  \t\t.residency_ns = 49000,\n>  \t\t.flags = 0*OPAL_PM_DEC_STOP \\\n>  \t\t       | 0*OPAL_PM_TIMEBASE_STOP  \\\n> -\t\t       | 1*OPAL_PM_LOSE_USER_CONTEXT \\\n> +\t\t       | 0*OPAL_PM_LOSE_USER_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_HYP_CONTEXT \\\n>  \t\t       | 0*OPAL_PM_LOSE_FULL_CONTEXT \\\n>  \t\t       | 1*OPAL_PM_STOP_INST_FAST,\n>","headers":{"Return-Path":"<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","skiboot@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","skiboot@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkFxY5Q2lz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 20:35:13 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xkFxY4g0szDqjC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 20:35:13 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xkFxN5RmMzDqXy\n\tfor <skiboot@lists.ozlabs.org>; Fri,  1 Sep 2017 20:35:04 +1000 (AEST)","from pps.filterd (m0098409.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv81AXpf3106040\n\tfor <skiboot@lists.ozlabs.org>; Fri, 1 Sep 2017 06:35:02 -0400","from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cq2e9vmrb-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Fri, 01 Sep 2017 06:34:59 -0400","from localhost\n\tby e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <akshay.adiga@linux.vnet.ibm.com>;\n\tFri, 1 Sep 2017 20:34:57 +1000","from d23relay06.au.ibm.com (202.81.31.225)\n\tby e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 1 Sep 2017 20:34:55 +1000","from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119])\n\tby d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv81AYsVa35651826\n\tfor <skiboot@lists.ozlabs.org>; Fri, 1 Sep 2017 20:34:55 +1000","from d23av05.au.ibm.com (localhost [127.0.0.1])\n\tby d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tv81AYs42019657\n\tfor <skiboot@lists.ozlabs.org>; Fri, 1 Sep 2017 20:34:54 +1000","from aksadiga.ibm ([9.79.197.25])\n\tby d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tv81AYpbA019488; Fri, 1 Sep 2017 20:34:53 +1000"],"To":"Nicholas Piggin <npiggin@gmail.com>, skiboot@lists.ozlabs.org","References":"<20170830062011.15199-1-npiggin@gmail.com>\n\t<20170830062011.15199-2-npiggin@gmail.com>","From":"Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>","Date":"Fri, 1 Sep 2017 16:04:51 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.4.0","MIME-Version":"1.0","In-Reply-To":"<20170830062011.15199-2-npiggin@gmail.com>","X-TM-AS-MML":"disable","x-cbid":"17090110-0044-0000-0000-00000284750C","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17090110-0045-0000-0000-0000071801B3","Message-Id":"<76edbbdf-660f-06ad-f1b1-145c3ff8106f@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-01_03:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709010153","Subject":"Re: [Skiboot] [PATCH 1/3] idle: user context state loss flags fix\n\tfor stop states","X-BeenThere":"skiboot@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Mailing list for skiboot development <skiboot.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/skiboot/>","List-Post":"<mailto:skiboot@lists.ozlabs.org>","List-Help":"<mailto:skiboot-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>","Cc":"\"Gautham R . Shenoy\" <ego@linux.vnet.ibm.com>","Content-Transfer-Encoding":"base64","Content-Type":"text/plain; charset=\"utf-8\"; Format=\"flowed\"","Errors-To":"skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}}]