X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fpower_manager.h;h=b52fb4c744e9629682d51e554a3b546e2cdd3f8d;hb=52960057f1d4958b541331ccba88c3241ebe9613;hp=1b45babfdfda6707290f9dbfe35131d2678f4110;hpb=d26c18c93260242328f85927660d1cb2236ada60;p=dpdk.git diff --git a/examples/vm_power_manager/power_manager.h b/examples/vm_power_manager/power_manager.h index 1b45babfdf..b52fb4c744 100644 --- a/examples/vm_power_manager/power_manager.h +++ b/examples/vm_power_manager/power_manager.h @@ -112,6 +112,32 @@ int power_manager_scale_mask_min(uint64_t core_mask); */ int power_manager_scale_mask_max(uint64_t core_mask); +/** + * Enable Turbo Boost on the cores specified in core_mask. + * It is thread-safe. + * + * @param core_mask + * The uint64_t bit-mask of cores to change frequency. + * + * @return + * - 1 on success. + * - Negative on error. + */ +int power_manager_enable_turbo_mask(uint64_t core_mask); + +/** + * Disable Turbo Boost on the cores specified in core_mask. + * It is thread-safe. + * + * @param core_mask + * The uint64_t bit-mask of cores to change frequency. + * + * @return + * - 1 on success. + * - Negative on error. + */ +int power_manager_disable_turbo_mask(uint64_t core_mask); + /** * Scale up frequency for the core specified by core_num. * It is thread-safe. @@ -167,6 +193,32 @@ int power_manager_scale_core_min(unsigned core_num); */ int power_manager_scale_core_max(unsigned core_num); +/** + * Enable Turbo Boost for the core specified by core_num. + * It is thread-safe. + * + * @param core_num + * The core number to boost + * + * @return + * - 1 on success. + * - Negative on error. + */ +int power_manager_enable_turbo_core(unsigned int core_num); + +/** + * Disable Turbo Boost for the core specified by core_num. + * It is thread-safe. + * + * @param core_num + * The core number to boost + * + * @return + * - 1 on success. + * - Negative on error. + */ +int power_manager_disable_turbo_core(unsigned int core_num); + /** * Get the current freuency of the core specified by core_num * @@ -179,6 +231,19 @@ int power_manager_scale_core_max(unsigned core_num); */ uint32_t power_manager_get_current_frequency(unsigned core_num); +/** + * Scale to medium frequency for the core specified by core_num. + * It is thread-safe. + * + * @param core_num + * The core number to change frequency + * + * @return + * - 1 on success. + * - 0 if frequency not changed. + * - Negative on error. + */ +int power_manager_scale_core_med(unsigned int core_num); #ifdef __cplusplus }