[{"id":1769041,"web_url":"http://patchwork.ozlabs.org/comment/1769041/","msgid":"<20170915083413.GG5432@drishya.in.ibm.com>","list_archive_url":null,"date":"2017-09-15T08:34:13","subject":"Re: [Skiboot] [PATCH v4 6/8] SLW: Allow deep states if homer\n\taddress is known","submitter":{"id":497,"url":"http://patchwork.ozlabs.org/api/people/497/","name":"Vaidyanathan Srinivasan","email":"svaidy@linux.vnet.ibm.com"},"content":"* Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> [2017-09-15 13:04:34]:\n\n> Use a common variable has_wakeup_engine instead of has_slw to tell if\n> the\n> a) SLW image is populated in case of power8\n> b) CME image is populated in case of power9\n> \n> Currently we expect CME to be loaded if homer address is known ( except\n> for simulators)\n> \n> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>\n\nReviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>\n\n> ---\n>  hw/slw.c | 23 +++++++++++++++++------\n>  1 file changed, 17 insertions(+), 6 deletions(-)\n> \n> diff --git a/hw/slw.c b/hw/slw.c\n> index 39aa4d0..1ce7608 100644\n> --- a/hw/slw.c\n> +++ b/hw/slw.c\n> @@ -813,7 +813,7 @@ void add_cpu_idle_state_properties(void)\n>  \tint nr_states;\n> \n>  \tbool can_sleep = true;\n> -\tbool has_slw = true;\n> +\tbool has_wakeup_engine = true;\n>  \tbool has_stop_inst = false;\n>  \tu8 i;\n> \n> @@ -906,9 +906,20 @@ void add_cpu_idle_state_properties(void)\n>  \t\tnr_states = ARRAY_SIZE(power7_cpu_idle_states);\n>  \t}\n> \n> -\t/* Enable deep idle states only if slw image is intact */\n> -\thas_slw = (chip->slw_base && chip->slw_bar_size &&\n> -\t\t\tchip->slw_image_size);\n> +\t/*\n> +\t * Enable deep idle states only if :\n> +\t * P8 : slw image is intact\n> +\t * P9 : homer_base is set\n> +\t */\n> +\tif (!(proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)) {\n> +\t\tif (proc_gen == proc_gen_p9)\n> +\t\t\thas_wakeup_engine = !!(chip->homer_base);\n> +\t\telse /* (proc_gen == proc_gen_p8) */\n> +\t\t\thas_wakeup_engine = (chip->slw_base && chip->slw_bar_size &&\n> +\t\t\t\t\tchip->slw_image_size);\n> +\t} else {\n> +\t\thas_wakeup_engine = false;\n> +\t}\n> \n>  \t/*\n>  \t * Currently we can't append strings and cells to dt properties.\n> @@ -936,7 +947,7 @@ void add_cpu_idle_state_properties(void)\n>  \tif (has_stop_inst) {\n>  \t\t/* Power 9 / POWER ISA 3.0 */\n>  \t\tsupported_states_mask = OPAL_PM_STOP_INST_FAST;\n> -\t\tif (has_slw)\n> +\t\tif (has_wakeup_engine)\n>  \t\t\tsupported_states_mask |= OPAL_PM_STOP_INST_DEEP;\n>  \t} else {\n>  \t\t/* Power 7 and Power 8 */\n> @@ -944,7 +955,7 @@ void add_cpu_idle_state_properties(void)\n>  \t\tif (can_sleep)\n>  \t\t\tsupported_states_mask |= OPAL_PM_SLEEP_ENABLED |\n>  \t\t\t\t\t\tOPAL_PM_SLEEP_ENABLED_ER1;\n> -\t\tif (has_slw)\n> +\t\tif (has_wakeup_engine)\n>  \t\t\tsupported_states_mask |= OPAL_PM_WINKLE_ENABLED;\n>  \t}\n>  \tfor (i = 0; i < nr_states; i++) {\n> -- \n> 2.5.5\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 3xtpcX3SnYz9sPr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 18:35:08 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xtpcX2R8yzDrXM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 18:35:08 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\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 3xtpcS5H5pzDrWR\n\tfor <skiboot@lists.ozlabs.org>; Fri, 15 Sep 2017 18:35:04 +1000 (AEST)","from pps.filterd (m0098416.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8F8Yv2X063131\n\tfor <skiboot@lists.ozlabs.org>; Fri, 15 Sep 2017 04:35:02 -0400","from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d086bgpgs-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Fri, 15 Sep 2017 04:34:57 -0400","from localhost\n\tby e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <svaidy@linux.vnet.ibm.com>;\n\tFri, 15 Sep 2017 18:34:22 +1000","from d23relay08.au.ibm.com (202.81.31.227)\n\tby e23smtp04.au.ibm.com (202.81.31.210) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 15 Sep 2017 18:34:21 +1000","from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119])\n\tby d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tv8F8YLtu41484440\n\tfor <skiboot@lists.ozlabs.org>; Fri, 15 Sep 2017 18:34:21 +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\tv8F8YKgr027342\n\tfor <skiboot@lists.ozlabs.org>; Fri, 15 Sep 2017 18:34:20 +1000","from drishya.in.ibm.com ([9.102.2.33])\n\tby d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tv8F8YEmY027251\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=NO); Fri, 15 Sep 2017 18:34:17 +1000"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com\n\t(client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=svaidy@linux.vnet.ibm.com; receiver=<UNKNOWN>)","Date":"Fri, 15 Sep 2017 14:04:13 +0530","From":"Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>","To":"Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>","References":"<1505460876-7303-1-git-send-email-akshay.adiga@linux.vnet.ibm.com>\n\t<1505460876-7303-7-git-send-email-akshay.adiga@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1505460876-7303-7-git-send-email-akshay.adiga@linux.vnet.ibm.com>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-TM-AS-MML":"disable","x-cbid":"17091508-0012-0000-0000-0000025E0B66","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091508-0013-0000-0000-0000077C15C9","Message-Id":"<20170915083413.GG5432@drishya.in.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-15_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-1709150130","Subject":"Re: [Skiboot] [PATCH v4 6/8] SLW: Allow deep states if homer\n\taddress is known","X-BeenThere":"skiboot@lists.ozlabs.org","X-Mailman-Version":"2.1.24","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>","Reply-To":"svaidy@linux.vnet.ibm.com","Cc":"ego@linux.vnet.ibm.com, shriyak@linux.vnet.ibm.com,\n\tskiboot@lists.ozlabs.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}}]