{"id":801003,"url":"http://patchwork.ozlabs.org/api/patches/801003/?format=json","web_url":"http://patchwork.ozlabs.org/project/skiboot/patch/20170813135959.23863-4-npiggin@gmail.com/","project":{"id":44,"url":"http://patchwork.ozlabs.org/api/projects/44/?format=json","name":"skiboot firmware development","link_name":"skiboot","list_id":"skiboot.lists.ozlabs.org","list_email":"skiboot@lists.ozlabs.org","web_url":"http://github.com/open-power/skiboot","scm_url":"http://github.com/open-power/skiboot","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170813135959.23863-4-npiggin@gmail.com>","list_archive_url":null,"date":"2017-08-13T13:59:58","name":"[RFC,3/4] cpu: idle move the minimum PM latency into the idle code","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"4d32c9d9ae67eeaaeb54200b386c158a88b2b147","submitter":{"id":69518,"url":"http://patchwork.ozlabs.org/api/people/69518/?format=json","name":"Nicholas Piggin","email":"npiggin@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/skiboot/patch/20170813135959.23863-4-npiggin@gmail.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/801003/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/801003/checks/","tags":{},"related":[],"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 [IPv6:2401:3900:2:1::3])\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 3xVgQ25XM0z9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 14 Aug 2017 00:01:14 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xVgQ23wNNzDr6q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 14 Aug 2017 00:01:14 +1000 (AEST)","from mail-pf0-x244.google.com (mail-pf0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c00::244])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xVgP44J21zDrCd\n\tfor <skiboot@lists.ozlabs.org>; Mon, 14 Aug 2017 00:00:24 +1000 (AEST)","by mail-pf0-x244.google.com with SMTP id c65so7722861pfl.0\n\tfor <skiboot@lists.ozlabs.org>; Sun, 13 Aug 2017 07:00:24 -0700 (PDT)","from roar.local0.net (203-219-56-202.tpgi.com.au. [203.219.56.202])\n\tby smtp.gmail.com with ESMTPSA id\n\t67sm9122283pfa.75.2017.08.13.07.00.19\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 13 Aug 2017 07:00:21 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"vYzRdTS7\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"vYzRdTS7\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"vYzRdTS7\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=VgetD4dJlzMTe4SQ5O6X3DdP881PpBTHglEPkDp5404=;\n\tb=vYzRdTS7aoXWRcGQX2PGCjtlq2A/5yyq1fPYPtDiaf0lv4Zpk2v6tF1pwdw5XCpe16\n\tyvq6zmguN1Kklm/O3WlKQwm3AyyVHvtuizRmxGUS5fWXbFLc2jcWEeTnQ2asMJdBSmNC\n\tLt2f5Dsz8ER+u6UAssBjZHPRIhtit60f8V+ZOrZaQ5+liT61bazNxoaY863E0cOLawmb\n\tEpCfZDQ6LvhOewugn7mPCkXZ6eBYQ+dxOb8Nj7OYNMnQEpyVpsAFPQ6XANPY5qFAPYaA\n\tpKb0JyaZv9qcAHiK6Svxh0KTQl0OWEBxnXgfLW7Gk6TdCDsOSKgO4ViyR8R2ujIvwukN\n\tWcZA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=VgetD4dJlzMTe4SQ5O6X3DdP881PpBTHglEPkDp5404=;\n\tb=bpwxJamEOG/K1ktCxAZLcNBOG2Vn1FL4r0/44ciuROXZkTZOMyIhvHChcSb6g5wLh9\n\tSUJdWg4Ei3tIfesrhOntnxYt2r5ErJA8V9hnxR219/h9UeRlv/0v0ZWS8MfAufqXa9gK\n\tGdeEbIOPvb47g6ZuG0/Y1V5uftN4YV/c3YlBiMHrHcYC22UIKFkICofWWyF11+Vjp3pK\n\tkEA/L4rNjav/dHMIvu2T8a4PtVsHfDqGL8iiNXZvw/B9Jvkj0/J69WX1RaK5FDWJCLT/\n\tZrXFzgySgJv/vG3sbGZuxD5WeBAbcaRoVFArpNY1JeHsnPpKT0QkpCjEn/sAHpaBrKqY\n\tEPnQ==","X-Gm-Message-State":"AHYfb5gP9Kc87RvRP6KPtZieXu2DjgGy27B69RoXag4/Pr8l1YZib73l\n\tAeFOxcw/nbaUr3ZL","X-Received":"by 10.99.181.29 with SMTP id y29mr21109814pge.135.1502632822692; \n\tSun, 13 Aug 2017 07:00:22 -0700 (PDT)","From":"Nicholas Piggin <npiggin@gmail.com>","To":"skiboot@lists.ozlabs.org","Date":"Sun, 13 Aug 2017 23:59:58 +1000","Message-Id":"<20170813135959.23863-4-npiggin@gmail.com>","X-Mailer":"git-send-email 2.13.3","In-Reply-To":"<20170813135959.23863-1-npiggin@gmail.com>","References":"<20170813135959.23863-1-npiggin@gmail.com>","Subject":"[Skiboot] [RFC PATCH 3/4] cpu: idle move the minimum PM latency\n\tinto the idle code","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>","MIME-Version":"1.0","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>"},"content":"The caller isn't in a position to know about PM heuristics, so\nmove the minimum timeout before power managmeent into the cpu idle\ncall. There is no functional change.\n\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n core/cpu.c      | 3 ++-\n core/timebase.c | 4 +---\n include/cpu.h   | 2 +-\n 3 files changed, 4 insertions(+), 5 deletions(-)","diff":"diff --git a/core/cpu.c b/core/cpu.c\nindex 0bdf8299..2a95dff6 100644\n--- a/core/cpu.c\n+++ b/core/cpu.c\n@@ -402,10 +402,11 @@ void cpu_idle_job(void)\n \t}\n }\n \n-void cpu_idle_delay(unsigned long delay, unsigned long min_pm)\n+void cpu_idle_delay(unsigned long delay)\n {\n \tunsigned long now = mftb();\n \tunsigned long end = now + delay;\n+\tunsigned long min_pm = usecs_to_tb(10);\n \n \tif (pm_enabled && delay > min_pm) {\n \t\tfor (;;) {\ndiff --git a/core/timebase.c b/core/timebase.c\nindex ca961c39..f2dff44b 100644\n--- a/core/timebase.c\n+++ b/core/timebase.c\n@@ -66,14 +66,12 @@ void time_wait(unsigned long duration)\n \n void time_wait_nopoll(unsigned long duration)\n {\n-\tunsigned long min_sleep = usecs_to_tb(10);\n-\n \tif (this_cpu()->tb_invalid) {\n \t\tcpu_relax();\n \t\treturn;\n \t}\n \n-\tcpu_idle_delay(duration, min_sleep);\n+\tcpu_idle_delay(duration);\n }\n \n void time_wait_ms(unsigned long ms)\ndiff --git a/include/cpu.h b/include/cpu.h\nindex fd3acf77..f08940f7 100644\n--- a/include/cpu.h\n+++ b/include/cpu.h\n@@ -268,7 +268,7 @@ extern unsigned long __attrconst cpu_stack_bottom(unsigned int pir);\n extern unsigned long __attrconst cpu_stack_top(unsigned int pir);\n \n extern void cpu_idle_job(void);\n-extern void cpu_idle_delay(unsigned long delay, unsigned long min_pm);\n+extern void cpu_idle_delay(unsigned long delay);\n \n extern void cpu_set_radix_mode(void);\n extern void cpu_fast_reboot_complete(void);\n","prefixes":["RFC","3/4"]}