* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_curr_governor(struct pass_resource *res, char *governor)
+int pass_hal_get_curr_governor(struct pass_resource *res, char *governor)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_curr_governor(struct pass_resource *res, char *governor)
+int pass_hal_set_curr_governor(struct pass_resource *res, char *governor)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_curr_freq(struct pass_resource *res)
+int pass_hal_get_curr_freq(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_min_freq(struct pass_resource *res)
+int pass_hal_get_min_freq(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_min_freq(struct pass_resource *res, int freq)
+int pass_hal_set_min_freq(struct pass_resource *res, int freq)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_max_freq(struct pass_resource *res)
+int pass_hal_get_max_freq(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_max_freq(struct pass_resource *res, int freq)
+int pass_hal_set_max_freq(struct pass_resource *res, int freq)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_available_min_freq(struct pass_resource *res)
+int pass_hal_get_available_min_freq(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_available_max_freq(struct pass_resource *res)
+int pass_hal_get_available_max_freq(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_up_threshold(struct pass_resource *res)
+int pass_hal_get_up_threshold(struct pass_resource *res)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_up_threshold(struct pass_resource *res, int up_threshold)
+int pass_hal_set_up_threshold(struct pass_resource *res, int up_threshold)
{
struct pass_resource_dvfs_ops *dvfs;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_online_state(struct pass_resource *res, int cpu)
+int pass_hal_get_online_state(struct pass_resource *res, int cpu)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_online_state(struct pass_resource *res, int cpu, int on)
+int pass_hal_set_online_state(struct pass_resource *res, int cpu, int on)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_online_min_num(struct pass_resource *res)
+int pass_hal_get_online_min_num(struct pass_resource *res)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_online_min_num(struct pass_resource *res, int num)
+int pass_hal_set_online_min_num(struct pass_resource *res, int num)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_online_max_num(struct pass_resource *res)
+int pass_hal_get_online_max_num(struct pass_resource *res)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_online_max_num(struct pass_resource *res, int num)
+int pass_hal_set_online_max_num(struct pass_resource *res, int num)
{
struct pass_resource_hotplug_ops *hotplug;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_temp(struct pass_resource *res)
+int pass_hal_get_temp(struct pass_resource *res)
{
struct pass_resource_tmu_ops *tmu;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_tmu_policy(struct pass_resource *res, char *policy)
+int pass_hal_get_tmu_policy(struct pass_resource *res, char *policy)
{
struct pass_resource_tmu_ops *tmu;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_fault_around_bytes(struct pass_resource *res,
+int pass_hal_set_fault_around_bytes(struct pass_resource *res,
int fault_around_bytes)
{
struct pass_resource_memory *memory;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_get_fault_around_bytes(struct pass_resource *res)
+int pass_hal_get_fault_around_bytes(struct pass_resource *res)
{
struct pass_resource_memory *memory;
* @retval -1 Operation not permitted (-EPERM)
* @retval -19 Operation not supported (-ENODEV)
*/
-int pass_set_pmqos_data(struct pass_resource *res, void *data)
+int pass_hal_set_pmqos_data(struct pass_resource *res, void *data)
{
struct pass_resource_nonstandard *nonstandard = NULL;
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_save_dvfs_initdata(struct pass_resource *res)
+static int pass_hal_save_dvfs_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
int ret;
- ret = pass_get_curr_governor(res, initdata->dvfs.governor);
+ ret = pass_hal_get_curr_governor(res, initdata->dvfs.governor);
if (ret < 0)
initdata->dvfs.governor = NULL;
- initdata->dvfs.min_freq = pass_get_min_freq(res);
+ initdata->dvfs.min_freq = pass_hal_get_min_freq(res);
/*
* Since the current maximum frequency can be affected by other
* in order to restore default maximum frequency we save available
* maximum frequency instead of current maximum frequency.
*/
- initdata->dvfs.max_freq = pass_get_available_max_freq(res);
+ initdata->dvfs.max_freq = pass_hal_get_available_max_freq(res);
- initdata->dvfs.up_threshold = pass_get_up_threshold(res);
+ initdata->dvfs.up_threshold = pass_hal_get_up_threshold(res);
return 0;
}
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_save_hotplug_initdata(struct pass_resource *res)
+static int pass_hal_save_hotplug_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
struct pass_resource_config_data *config_data = &res->config_data;
int i;
int ret;
- initdata->hotplug.online_min_num = pass_get_online_min_num(res);
- initdata->hotplug.online_max_num = pass_get_online_max_num(res);
+ initdata->hotplug.online_min_num = pass_hal_get_online_min_num(res);
+ initdata->hotplug.online_max_num = pass_hal_get_online_max_num(res);
online_state = (int *)calloc(num_cpus, sizeof(int));
if (!online_state)
return -ENOMEM;
for (i = 0; i < num_cpus; i++) {
- ret = pass_get_online_state(res, first_cpu + i);
+ ret = pass_hal_get_online_state(res, first_cpu + i);
if (ret < 0) {
free(online_state);
return 0;
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_save_memory_initdata(struct pass_resource *res)
+static int pass_hal_save_memory_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
- initdata->memory.fault_around_bytes = pass_get_fault_around_bytes(res);
+ initdata->memory.fault_around_bytes
+ = pass_hal_get_fault_around_bytes(res);
return 0;
}
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_restore_dvfs_initdata(struct pass_resource *res)
+static int pass_hal_restore_dvfs_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
int ret;
if (initdata->dvfs.governor) {
- ret = pass_set_curr_governor(res, initdata->dvfs.governor);
+ ret = pass_hal_set_curr_governor(res, initdata->dvfs.governor);
if (ret < 0)
return ret;
}
if (initdata->dvfs.min_freq >= 0) {
- ret = pass_set_min_freq(res, initdata->dvfs.min_freq);
+ ret = pass_hal_set_min_freq(res, initdata->dvfs.min_freq);
if (ret < 0)
return ret;
}
if (initdata->dvfs.max_freq >= 0) {
- ret = pass_set_max_freq(res, initdata->dvfs.max_freq);
+ ret = pass_hal_set_max_freq(res, initdata->dvfs.max_freq);
if (ret < 0)
return ret;
}
if (initdata->dvfs.up_threshold >= 0) {
- ret = pass_set_up_threshold(res, initdata->dvfs.up_threshold);
+ ret = pass_hal_set_up_threshold(res, initdata->dvfs.up_threshold);
if (ret < 0)
return ret;
}
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_restore_hotplug_initdata(struct pass_resource *res)
+static int pass_hal_restore_hotplug_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
struct pass_resource_config_data *config_data = &res->config_data;
if (online_state) {
for (i = 0; i < num_cpus; i++) {
- ret = pass_set_online_state(res, first_cpu + i,
+ ret = pass_hal_set_online_state(res, first_cpu + i,
online_state[i]);
if (ret < 0) {
free(online_state);
}
if (online_min_num >= 0) {
- ret = pass_set_online_min_num(res, online_min_num);
+ ret = pass_hal_set_online_min_num(res, online_min_num);
if (ret < 0)
return ret;
}
if (online_max_num >= 0) {
- ret = pass_set_online_max_num(res, online_max_num);
+ ret = pass_hal_set_online_max_num(res, online_max_num);
if (ret < 0)
return ret;
}
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-static int pass_restore_memory_initdata(struct pass_resource *res)
+static int pass_hal_restore_memory_initdata(struct pass_resource *res)
{
struct pass_resource_init_data *initdata = &res->init_data;
int fault_around_bytes = initdata->memory.fault_around_bytes;
int ret;
if (fault_around_bytes >= 0) {
- ret = pass_set_fault_around_bytes(res, fault_around_bytes);
+ ret = pass_hal_set_fault_around_bytes(res, fault_around_bytes);
if (ret < 0)
return ret;
}
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-int pass_save_initdata(struct pass_resource *res)
+int pass_hal_save_initdata(struct pass_resource *res)
{
int ret;
switch (res->config_data.res_type) {
case PASS_RESOURCE_CPU_ID:
- ret = pass_save_hotplug_initdata(res);
+ ret = pass_hal_save_hotplug_initdata(res);
if (ret < 0) {
_E("Failed to save hp initdata for '%s' resource",
res->config_data.res_name);
/* fall through */
case PASS_RESOURCE_BUS_ID:
case PASS_RESOURCE_GPU_ID:
- ret = pass_save_dvfs_initdata(res);
+ ret = pass_hal_save_dvfs_initdata(res);
if (ret < 0) {
_E("Failed to save dvfs initdata for '%s' resource",
res->config_data.res_name);
}
break;
case PASS_RESOURCE_MEMORY_ID:
- ret = pass_save_memory_initdata(res);
+ ret = pass_hal_save_memory_initdata(res);
if (ret < 0) {
_E("Failed to save memory initdata for '%s' resource",
res->config_data.res_name);
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-int pass_restore_initdata(struct pass_resource *res)
+int pass_hal_restore_initdata(struct pass_resource *res)
{
int ret;
switch (res->config_data.res_type) {
case PASS_RESOURCE_CPU_ID:
- ret = pass_restore_hotplug_initdata(res);
+ ret = pass_hal_restore_hotplug_initdata(res);
if (ret < 0) {
_E("Failed to restore hp initdata for '%s' resource",
res->config_data.res_name);
/* fall through */
case PASS_RESOURCE_BUS_ID:
case PASS_RESOURCE_GPU_ID:
- ret = pass_restore_dvfs_initdata(res);
+ ret = pass_hal_restore_dvfs_initdata(res);
if (ret < 0) {
_E("Failed to restore dvfs initdata for '%s' resource",
res->config_data.res_name);
}
break;
case PASS_RESOURCE_MEMORY_ID:
- ret = pass_restore_memory_initdata(res);
+ ret = pass_hal_restore_memory_initdata(res);
if (ret < 0) {
_E("Failed to restore memory data for '%s' resource",
res->config_data.res_name);
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-int pass_get_resource(struct pass_resource *res)
+int pass_hal_get_resource(struct pass_resource *res)
{
struct pass_resource_info *info;
const char *name;
* @param [in] res Instance of h/w resource
* @return @c 0 on success, otherwise error value
*/
-int pass_put_resource(struct pass_resource *res)
+int pass_hal_put_resource(struct pass_resource *res)
{
struct pass_resource_common *common;
struct pass_resource_info *info;
* Functions for all H/W resources
*/
/* Get and put the h/w resource. */
-int pass_get_resource(struct pass_resource *res);
-int pass_put_resource(struct pass_resource *res);
+int pass_hal_get_resource(struct pass_resource *res);
+int pass_hal_put_resource(struct pass_resource *res);
/* Save and restore the initial data of the h/w resource. */
-int pass_save_initdata(struct pass_resource *pass_res);
-int pass_restore_initdata(struct pass_resource *pass_res);
+int pass_hal_save_initdata(struct pass_resource *pass_res);
+int pass_hal_restore_initdata(struct pass_resource *pass_res);
/***
* Functions for CPU/BUS/GPU H/W resources
*/
/* Get and the current governor. */
-int pass_get_curr_governor(struct pass_resource *res, char *governor);
-int pass_set_curr_governor(struct pass_resource *res, char *governor);
+int pass_hal_get_curr_governor(struct pass_resource *res, char *governor);
+int pass_hal_set_curr_governor(struct pass_resource *res, char *governor);
/* Get the current frequency. */
-int pass_get_curr_freq(struct pass_resource *res);
+int pass_hal_get_curr_freq(struct pass_resource *res);
/* Get and set the minimum frequency. */
-int pass_get_min_freq(struct pass_resource *res);
-int pass_set_min_freq(struct pass_resource *res, int freq);
+int pass_hal_get_min_freq(struct pass_resource *res);
+int pass_hal_set_min_freq(struct pass_resource *res, int freq);
/* Get and set the maximum frequency. */
-int pass_get_max_freq(struct pass_resource *res);
-int pass_set_max_freq(struct pass_resource *res, int freq);
+int pass_hal_get_max_freq(struct pass_resource *res);
+int pass_hal_set_max_freq(struct pass_resource *res, int freq);
/* Get the minimum/maximum frequency which can be set to resource. */
-int pass_get_available_min_freq(struct pass_resource *res);
-int pass_get_available_max_freq(struct pass_resource *res);
+int pass_hal_get_available_min_freq(struct pass_resource *res);
+int pass_hal_get_available_max_freq(struct pass_resource *res);
/* Get and set the up_threshold to support boosting. */
-int pass_get_up_threshold(struct pass_resource *res);
-int pass_set_up_threshold(struct pass_resource *res, int up_threshold);
+int pass_hal_get_up_threshold(struct pass_resource *res);
+int pass_hal_set_up_threshold(struct pass_resource *res, int up_threshold);
/* Get the temperature and policy of thermal unit on specific h/w. */
-int pass_get_temp(struct pass_resource *res);
-int pass_get_tmu_policy(struct pass_resource *res, char *policy);
+int pass_hal_get_temp(struct pass_resource *res);
+int pass_hal_get_tmu_policy(struct pass_resource *res, char *policy);
/***
* Functions for CPU H/W resources
*/
/* Get and set online state of cpu. */
-int pass_get_online_state(struct pass_resource *res, int cpu);
-int pass_set_online_state(struct pass_resource *res, int cpu, int on);
+int pass_hal_get_online_state(struct pass_resource *res, int cpu);
+int pass_hal_set_online_state(struct pass_resource *res, int cpu, int on);
/* Get and set the minimum number of online CPUs */
-int pass_get_online_min_num(struct pass_resource *res);
-int pass_set_online_min_num(struct pass_resource *res, int num);
+int pass_hal_get_online_min_num(struct pass_resource *res);
+int pass_hal_set_online_min_num(struct pass_resource *res, int num);
/* Get and set the maximum number of online CPUs */
-int pass_get_online_max_num(struct pass_resource *res);
-int pass_set_online_max_num(struct pass_resource *res, int num);
+int pass_hal_get_online_max_num(struct pass_resource *res);
+int pass_hal_set_online_max_num(struct pass_resource *res, int num);
/***
* Functions for Memory h/w resource
*/
/* Get and set the /sys/kernel/debug/fault_around_bytes */
-int pass_get_fault_around_bytes(struct pass_resource *res);
-int pass_set_fault_around_bytes(struct pass_resource *res,
+int pass_hal_get_fault_around_bytes(struct pass_resource *res);
+int pass_hal_set_fault_around_bytes(struct pass_resource *res,
int fault_around_bytes);
/***
*
* This function will be removed after finding the proper method.
*/
-int pass_set_pmqos_data(struct pass_resource *res, void *data);
+int pass_hal_set_pmqos_data(struct pass_resource *res, void *data);
#endif /* __PASS_HAL__ */
if (limit_min_cpu > limit_max_cpu)
limit_min_cpu = limit_max_cpu;
- ret = pass_set_online_min_num(res, limit_min_cpu);
+ ret = pass_hal_set_online_min_num(res, limit_min_cpu);
if (ret == -EPERM || ret == -ENODEV) {
/*
* If -EPERM, function is not supported according to
failed = 1;
}
- ret = pass_set_online_max_num(res, limit_max_cpu);
+ ret = pass_hal_set_online_max_num(res, limit_max_cpu);
if (ret == -EPERM || ret == -ENODEV) {
;
} else if (ret < 0) {
}
for (i = 0; i < limit_max_cpu; i++) {
- ret = pass_set_online_state(res,
+ ret = pass_hal_set_online_state(res,
res->config_data.cpu + i,
(i < limit_min_cpu) ? 1 : 0);
if (ret == -EPERM || ret == -ENODEV) {
/* Set minimum and maximum frequency */
if (limit_max_freq > 0 && limit_min_freq > 0) {
- int curr_min_freq = pass_get_min_freq(res);
- int curr_max_freq = pass_get_max_freq(res);
+ int curr_min_freq = pass_hal_get_min_freq(res);
+ int curr_max_freq = pass_hal_get_max_freq(res);
int ret_min;
int ret_max;
if ((limit_max_freq > curr_min_freq)
&& (limit_min_freq > curr_max_freq)) {
- ret_max = pass_set_max_freq(res, limit_max_freq);
- ret_min = pass_set_min_freq(res, limit_min_freq);
+ ret_max = pass_hal_set_max_freq(res, limit_max_freq);
+ ret_min = pass_hal_set_min_freq(res, limit_min_freq);
} else {
- ret_min = pass_set_min_freq(res, limit_min_freq);
- ret_max = pass_set_max_freq(res, limit_max_freq);
+ ret_min = pass_hal_set_min_freq(res, limit_min_freq);
+ ret_max = pass_hal_set_max_freq(res, limit_max_freq);
}
if (ret_max < 0) {
/* Set fault_around_bytes for the memory h/w */
if (fault_around_bytes > 0) {
- ret = pass_set_fault_around_bytes(res, fault_around_bytes);
+ ret = pass_hal_set_fault_around_bytes(res, fault_around_bytes);
if (ret < 0) {
_W("failed to set the fault_around_bytes(%d) of %s",
fault_around_bytes,
* be removed after finding the proper method.
*/
if (data)
- pass_set_pmqos_data(res, data);
+ pass_hal_set_pmqos_data(res, data);
rescon_set_scenario_level(res, scenario_level);
* be removed after finding the proper method.
*/
if (data)
- pass_set_pmqos_data(res, data);
+ pass_hal_set_pmqos_data(res, data);
rescon_unset_scenario_level(res, scenario_level);
* Save the current data of h/w resource. The saved data
* will be used for restoring the h/w resource on exit().
*/
- ret = pass_save_initdata(res);
+ ret = pass_hal_save_initdata(res);
if (ret < 0) {
_E("failed to save initdata of '%s' resource (%d)\n",
res->config_data.res_name, ret);
rescon = &res->rescon;
/* Restore the h/w resource by using the saved data */
- ret = pass_restore_initdata(res);
+ ret = pass_hal_restore_initdata(res);
if (ret < 0)
_E("failed to restore initdata of '%s' resource (%d)\n",
res->config_data.res_name, ret);
* resource monitor for thermal is ticked, get current temperature
* in advance.
*/
- result->temp = pass_get_temp(res);
+ result->temp = pass_hal_get_temp(res);
monitor->result = result;
return -ENOMEM;
/* Get temperature of h/w resource */
- temp = pass_get_temp(res);
+ temp = pass_hal_get_temp(res);
if (temp < 0)
return temp;
return -ENOMEM;
/* Get temperature of h/w resource */
- temp = pass_get_temp(res);
+ temp = pass_hal_get_temp(res);
if (temp < 0)
return temp;
struct pass_resource_config_data *config_data =
&g_pass.res[i].config_data;
- ret = pass_get_resource(res);
+ ret = pass_hal_get_resource(res);
if (ret < 0) {
_E("Cannot get the pass '%s' resource (%d)\n",
config_data->res_name, ret);
_E("Cannot initialize the pass '%s' resource (%d)\n",
config_data->res_name, ret);
- ret = pass_put_resource(res);
+ ret = pass_hal_put_resource(res);
if (ret < 0)
_E("Cannot put the pass '%s' resource (%d)\n",
config_data->res_name, ret);
_E("Cannot exit the pass '%s' resource (%d)\n",
config_data->res_name, ret);
- ret = pass_put_resource(res);
+ ret = pass_hal_put_resource(res);
if (ret < 0) {
_E("Cannot put the pass '%s' resource (%d)\n",
config_data->res_name, ret);
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_resource(res);
+ ret = pass_hal_get_resource(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetResourceConfig Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_curr_governor(res, governor);
+ ret = pass_hal_get_curr_governor(res, governor);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetCurrGovernor Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_curr_governor(res, governor);
+ ret = pass_hal_get_curr_governor(res, governor);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetCurrGovernor Failed";
}
- ret = pass_set_curr_governor(res, governor);
+ ret = pass_hal_set_curr_governor(res, governor);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetCurrGovernor Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_curr_freq(res);
+ ret = pass_hal_get_curr_freq(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetCurrFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_min_freq(res);
+ ret = pass_hal_get_min_freq(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetMinFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- min_freq = pass_get_available_min_freq(res);
+ min_freq = pass_hal_get_available_min_freq(res);
if (haltest_is_failed(res, min_freq)) {
ASSERT_EQ(min_freq, 0) << "GetAvailableMinFreq Failed";
}
if (min_freq >= 0) {
- ret = pass_set_min_freq(res, min_freq);
+ ret = pass_hal_set_min_freq(res, min_freq);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetMinFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_max_freq(res);
+ ret = pass_hal_get_max_freq(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetMaxFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- max_freq = pass_get_available_max_freq(res);
+ max_freq = pass_hal_get_available_max_freq(res);
if (haltest_is_failed(res, max_freq)) {
ASSERT_EQ(max_freq, 0) << "GetAvailableMaxFreq Failed";
}
if (max_freq >= 0) {
- ret = pass_set_max_freq(res, max_freq);
+ ret = pass_hal_set_max_freq(res, max_freq);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetMaxFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_available_min_freq(res);
+ ret = pass_hal_get_available_min_freq(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetAvailableMinFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_available_max_freq(res);
+ ret = pass_hal_get_available_max_freq(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetAvailableMaxFreq Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_up_threshold(res);
+ ret = pass_hal_get_up_threshold(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetUpThreshold Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- up_threshold = pass_get_up_threshold(res);
+ up_threshold = pass_hal_get_up_threshold(res);
if (haltest_is_failed(res, up_threshold)) {
ASSERT_EQ(up_threshold, 0) << "GetUpThreshold Failed";
}
if (up_threshold >= 0) {
- ret = pass_set_up_threshold(res, up_threshold);
+ ret = pass_hal_set_up_threshold(res, up_threshold);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetUpThreshold Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_temp(res);
+ ret = pass_hal_get_temp(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetTemperature Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_tmu_policy(res, policy);
+ ret = pass_hal_get_tmu_policy(res, policy);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetTmuPolicy Failed";
}
struct pass_resource *res = &g_pass.res[i];
for (j = 0; j < res->config_data.num_cpus; j++) {
- ret = pass_get_online_state(res, j);
+ ret = pass_hal_get_online_state(res, j);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetOnlineState Failed";
}
struct pass_resource *res = &g_pass.res[i];
for (j = 0; j < res->config_data.num_cpus; j++) {
- online_state = pass_get_online_state(res, j);
+ online_state = pass_hal_get_online_state(res, j);
if (haltest_is_failed(res, online_state)) {
ASSERT_EQ(online_state, 0) << "GetOnlineState Failed";
}
if (online_state >= 0) {
- ret = pass_set_online_state(res, j, online_state);
+ ret = pass_hal_set_online_state(res, j, online_state);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetOnlineState Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_online_min_num(res);
+ ret = pass_hal_get_online_min_num(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetOnlineMinNum Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- online_min_num = pass_get_online_min_num(res);
+ online_min_num = pass_hal_get_online_min_num(res);
if (haltest_is_failed(res, online_min_num)) {
ASSERT_EQ(online_min_num, 0) << "GetOnlineMinNum Failed";
}
if (online_min_num >= 0) {
- ret = pass_set_online_min_num(res, online_min_num);
+ ret = pass_hal_set_online_min_num(res, online_min_num);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetOnlineMinNum Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_online_max_num(res);
+ ret = pass_hal_get_online_max_num(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetOnlineMaxNum Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- online_max_num = pass_get_online_max_num(res);
+ online_max_num = pass_hal_get_online_max_num(res);
if (haltest_is_failed(res, online_max_num)) {
ASSERT_EQ(online_max_num, 0) << "GetOnlineMaxNum Failed";
}
if (online_max_num >= 0) {
- ret = pass_set_online_max_num(res, online_max_num);
+ ret = pass_hal_set_online_max_num(res, online_max_num);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetOnlineMaxNum Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_get_fault_around_bytes(res);
+ ret = pass_hal_get_fault_around_bytes(res);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "GetFaultAroundBytes Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- fault_around_bytes = pass_get_fault_around_bytes(res);
+ fault_around_bytes = pass_hal_get_fault_around_bytes(res);
if (haltest_is_failed(res, fault_around_bytes)) {
ASSERT_EQ(fault_around_bytes, 0) << "GetFaultAroundBytes Failed";
}
if (fault_around_bytes >= 0) {
- ret = pass_set_fault_around_bytes(res, fault_around_bytes);
+ ret = pass_hal_set_fault_around_bytes(res, fault_around_bytes);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetFaultAroundBytes Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_set_pmqos_data(res, applaunch_scenario);
+ ret = pass_hal_set_pmqos_data(res, applaunch_scenario);
if (haltest_is_failed(res, ret)) {
ASSERT_EQ(ret, 0) << "SetPmqosData Failed";
}
for (i = 0; i < g_pass.num_resources; i++) {
struct pass_resource *res = &g_pass.res[i];
- ret = pass_put_resource(res);
+ ret = pass_hal_put_resource(res);
if (ret < 0) {
pass_put_resource_config(&g_pass);
ASSERT_EQ(ret, 0) << "PutResourceConfig Failed";