mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 02:05:29 +07:00
cd4c076306
The resolution of the idle injection is limited to 1ms. If there is a need for an injection of 1.2 ms, it is not possible. The idle injection API is not yet used, so it is safe to convert the existing API to the new time unit instead of adding more functions. Convert to microsecond in order to use a finer grain time unit when injecting idle cycles. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
30 lines
832 B
C
30 lines
832 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2018 Linaro Ltd
|
|
*
|
|
* Author: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
*
|
|
*/
|
|
#ifndef __IDLE_INJECT_H__
|
|
#define __IDLE_INJECT_H__
|
|
|
|
/* private idle injection device structure */
|
|
struct idle_inject_device;
|
|
|
|
struct idle_inject_device *idle_inject_register(struct cpumask *cpumask);
|
|
|
|
void idle_inject_unregister(struct idle_inject_device *ii_dev);
|
|
|
|
int idle_inject_start(struct idle_inject_device *ii_dev);
|
|
|
|
void idle_inject_stop(struct idle_inject_device *ii_dev);
|
|
|
|
void idle_inject_set_duration(struct idle_inject_device *ii_dev,
|
|
unsigned int run_duration_us,
|
|
unsigned int idle_duration_us);
|
|
|
|
void idle_inject_get_duration(struct idle_inject_device *ii_dev,
|
|
unsigned int *run_duration_us,
|
|
unsigned int *idle_duration_us);
|
|
#endif /* __IDLE_INJECT_H__ */
|