summaryrefslogtreecommitdiffstats
path: root/src/sys/prof
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-07-17 21:57:58 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-28 13:04:48 -0500
commitb866f4173f605d8dcdf83b3239dd7fb9a5a8768b (patch)
treeabb7ddef100518198c44202293d9042b8922ae50 /src/sys/prof
parentac9ad22f261cd391c0d5163e82ff02ae4929f820 (diff)
downloadtalos-hostboot-b866f4173f605d8dcdf83b3239dd7fb9a5a8768b.tar.gz
talos-hostboot-b866f4173f605d8dcdf83b3239dd7fb9a5a8768b.zip
Execute 'doze' in idle loop.
Change-Id: Ifd611129c2d7173b5e0dec36c870e06a4d851009 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1384 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/sys/prof')
-rw-r--r--src/sys/prof/idletask.C59
1 files changed, 35 insertions, 24 deletions
diff --git a/src/sys/prof/idletask.C b/src/sys/prof/idletask.C
index 843f26628..da568f955 100644
--- a/src/sys/prof/idletask.C
+++ b/src/sys/prof/idletask.C
@@ -1,26 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/sys/prof/idletask.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
-
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/sys/prof/idletask.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/** @file idletask.C
* @brief Code for the kernel idle-loop.
*
@@ -31,11 +31,22 @@
#include <kernel/taskmgr.H>
#include <arch/ppc.H>
+#include <sys/syscall.h>
+
+using namespace Systemcalls;
void TaskManager::idleTaskLoop(void* unused)
{
while(1)
{
- setThreadPriorityLow();
+ // Lower priority (and yield simics thread).
+ setThreadPriorityLow();
+
+ // Request privilege escalation for doze.
+ register uint64_t syscall = MISC_CPUDOZE;
+ asm volatile("or 3, %0, %0; sc" :: "r" (syscall) : "r3");
+
+ // Execute doze.
+ doze();
}
}
OpenPOWER on IntegriCloud