From 321ce4299b31ad8f54172079b32d20ead5d24a30 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Mon, 1 Apr 2013 10:29:05 -0500 Subject: Allow winkle of all threads for multi-drawer add. RTC: 63124 Change-Id: I1ad1d6bdf6a2848b686b25504fabddddb701d440 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3813 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert Reviewed-by: Daniel M. Crowell Reviewed-by: Michael Baiocchi Reviewed-by: A. Patrick Williams III --- src/include/kernel/misc.H | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'src/include/kernel/misc.H') diff --git a/src/include/kernel/misc.H b/src/include/kernel/misc.H index 11677d250..f0fe0ffd0 100644 --- a/src/include/kernel/misc.H +++ b/src/include/kernel/misc.H @@ -90,6 +90,37 @@ namespace KernelMisc uint64_t iv_timebase; }; + /** @class WinkleAll + * + * @brief DeferredWork class for implementing cpu_all_winkle. + */ + class WinkleAll : public ::DeferredWork + { + public: + /** ctor + * + * @param i_caller - Task calling cpu_all_winkle to be restored + * after winkle is complete. + * + */ + WinkleAll(task_t* i_caller) : + iv_caller(i_caller), iv_timebase(0), iv_firstThread(0) {}; + + void masterPreWork(); + void activeMainWork(); + void masterPostWork(); + void nonactiveMainWork(); + + private: + /** Caller of cpu_all_winkle() */ + task_t* iv_caller; + /** Current time-base value for restore after winkle. */ + uint64_t iv_timebase; + /** Sync value for first thread to wake up. */ + uint64_t iv_firstThread; + + }; + /** @fn expand_full_cache * * @brief Expands the image footprint from a half-cache to full-cache @@ -123,14 +154,13 @@ namespace KernelMisc * * NOTE: This function is a wrapper function for writeScratchReg that * takes care of modifying the scratch register address value depending - * on the getCPUType. The writeScratchReg takes the scratch address + * on the getCPUType. The writeScratchReg takes the scratch address * passed in and puts that date in that register using assembly code * * @param[in] uint64_t - scratch_addr - * @param[in] uint64_t - Data + * @param[in] uint64_t - Data */ void updateScratchReg(MMIO_Scratch_Register scratch_addr, uint64_t data); - }; #endif -- cgit v1.2.1