summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/kernel/cpu.H3
-rw-r--r--src/include/kernel/doorbell.H7
-rw-r--r--src/include/kernel/workitem.H12
3 files changed, 22 insertions, 0 deletions
diff --git a/src/include/kernel/cpu.H b/src/include/kernel/cpu.H
index f218e3e45..e6dc4a1fa 100644
--- a/src/include/kernel/cpu.H
+++ b/src/include/kernel/cpu.H
@@ -104,6 +104,9 @@ struct cpu_t
/** Sequence ID of CPU initialization. */
uint64_t cpu_start_seqid;
+ /** Timebase Restore Value (used during core wakeup) */
+ uint64_t cpu_restore_tb;
+
/** Stack of WorkItems to be executed during doorbell wakeup */
Util::Lockfree::Stack<KernelWorkItem> doorbell_actions;
};
diff --git a/src/include/kernel/doorbell.H b/src/include/kernel/doorbell.H
index 1d01ce119..d9a613672 100644
--- a/src/include/kernel/doorbell.H
+++ b/src/include/kernel/doorbell.H
@@ -56,6 +56,13 @@ void send_doorbell_wakeup(uint64_t i_pir);
*/
void send_doorbell_ipc(uint64_t i_pir);
+/** Send a doorbell and also restore the thread's timebase
+ *
+ * @param i_pir - PIR to send doorbell to wakeup
+ * @param i_tb - Timebase value to restore during wakeup
+ */
+void send_doorbell_restore_tb(uint64_t i_pir, uint64_t i_tb);
+
enum
{
_DOORBELL_MSG_TYPE = 0x0000000028000000, /// Comes from the ISA.
diff --git a/src/include/kernel/workitem.H b/src/include/kernel/workitem.H
index 856f5b365..027f3626f 100644
--- a/src/include/kernel/workitem.H
+++ b/src/include/kernel/workitem.H
@@ -53,6 +53,18 @@ class CpuWakeupDoorbellWorkItem : public KernelWorkItem
~CpuWakeupDoorbellWorkItem() = default;
};
+//A work item to be created/executed during a Master CPU
+// wakeup scenario, it will also restore the timebase
+// on the threads being woken up
+class CpuTbRestoreDoorbellWorkItem : public KernelWorkItem
+{
+ public:
+ //Implement operator() function
+ void operator() (void);
+
+ //No data to clean up, use default destructor
+ ~CpuTbRestoreDoorbellWorkItem() = default;
+};
#endif
OpenPOWER on IntegriCloud