static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
static int
-check_cur_freq(unsigned lcore_id, uint32_t idx)
+check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
{
#define TEST_POWER_CONVERT_TO_DECIMAL 10
#define MAX_LOOP 100
/ TEST_ROUND_FREQ_TO_N_100000;
freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
- ret = (freqs[idx] == freq_conv ? 0 : -1);
+ if (turbo)
+ ret = (freqs[idx] <= freq_conv ? 0 : -1);
+ else
+ ret = (freqs[idx] == freq_conv ? 0 : -1);
if (ret == 0)
break;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, count);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, count, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
if (ret < 0)
return -1;
}
/* Check the current frequency */
- ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);
+ ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
if (ret < 0)
return -1;