Added AMDSMI_CHECK_INIT to esmi library wrappers
Change-Id: Id187a9152399cdefec21a0d310bdb78f593426af
Este commit está contenido en:
@@ -2137,6 +2137,8 @@ amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_cpusocket_handle socket_han
|
||||
amdsmi_status_t status;
|
||||
uint32_t hsmp_proto_ver;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2160,6 +2162,8 @@ amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_cpusocket_handle socket_han
|
||||
amdsmi_status_t status;
|
||||
struct smu_fw_version smu_fw;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2186,6 +2190,8 @@ amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_han
|
||||
amdsmi_status_t status;
|
||||
uint64_t core_input;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (processor_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2210,6 +2216,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_cpusocket_handle socket_hand
|
||||
amdsmi_status_t status;
|
||||
uint64_t pkg_input;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2233,6 +2241,8 @@ amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_cpusocket_handle socket_han
|
||||
amdsmi_status_t status;
|
||||
uint32_t phot;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2256,6 +2266,8 @@ amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_cpusocket_handle socket_handle,
|
||||
amdsmi_status_t status;
|
||||
uint32_t f_clk, m_clk;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2280,6 +2292,8 @@ amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_cpusocket_handle socket_handle,
|
||||
amdsmi_status_t status;
|
||||
uint32_t c_clk;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2303,6 +2317,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_cpusocket
|
||||
amdsmi_status_t status;
|
||||
uint16_t limit;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2327,6 +2343,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_cpusocket_handle socket_
|
||||
uint16_t f_max;
|
||||
uint16_t f_min;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2351,6 +2369,8 @@ amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle p
|
||||
amdsmi_status_t status;
|
||||
uint32_t c_clk;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (processor_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2375,6 +2395,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_cpusocket_handle socket_handl
|
||||
amdsmi_status_t status;
|
||||
uint32_t avg_power;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2398,6 +2420,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_h
|
||||
amdsmi_status_t status;
|
||||
uint32_t p_cap;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2421,6 +2445,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_cpusocket_handle sock
|
||||
amdsmi_status_t status;
|
||||
uint32_t p_max;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2444,6 +2470,8 @@ amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_cpusocket_hand
|
||||
amdsmi_status_t status;
|
||||
uint32_t pow;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2466,6 +2494,8 @@ amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_h
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2487,6 +2517,8 @@ amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_cpusocket_handle socke
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2509,6 +2541,8 @@ amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor
|
||||
amdsmi_status_t status;
|
||||
uint32_t boostlimit;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (processor_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2532,6 +2566,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_cpusocket_handle socke
|
||||
amdsmi_status_t status;
|
||||
uint32_t res;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2554,6 +2590,8 @@ amdsmi_status_t amdsmi_set_cpu_core_boostlimit(amdsmi_processor_handle processor
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (processor_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2575,6 +2613,8 @@ amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_cpusocket_handle socket_
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2597,6 +2637,8 @@ amdsmi_status_t amdsmi_get_cpu_ddr_bw(amdsmi_cpusocket_handle socket_handle,
|
||||
amdsmi_status_t status;
|
||||
struct ddr_bw_metrics ddr;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2622,6 +2664,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_cpusocket_handle socket
|
||||
amdsmi_status_t status;
|
||||
uint32_t tmon;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2646,6 +2690,8 @@ amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(
|
||||
amdsmi_status_t status;
|
||||
struct temp_range_refresh_rate dimm_rate;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2671,6 +2717,8 @@ amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_cpusocket_handle so
|
||||
amdsmi_status_t status;
|
||||
struct dimm_power d_power;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2697,6 +2745,8 @@ amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_cpusocket_handle socke
|
||||
amdsmi_status_t status;
|
||||
struct dimm_thermal d_sensor;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2722,6 +2772,8 @@ amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_cpusocket_handle socket_handle,
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2742,6 +2794,8 @@ amdsmi_status_t amdsmi_set_cpu_gmi3_link_width_range(amdsmi_cpusocket_handle soc
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2762,6 +2816,8 @@ amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_cpusocket_handle socket_handle, uin
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2782,6 +2838,8 @@ amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_cpusocket_handle socket_handle,
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2802,6 +2860,8 @@ amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle soc
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2823,6 +2883,8 @@ amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle soc
|
||||
amdsmi_status_t status;
|
||||
struct dpm_level nb;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2847,6 +2909,8 @@ amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_cpusocket_handle socket_han
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2868,6 +2932,8 @@ amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_cpusocket_handle socket_ha
|
||||
{
|
||||
amdsmi_status_t status;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2891,6 +2957,8 @@ amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_cpusocket_handle sock
|
||||
uint32_t bw;
|
||||
struct link_id_bw_type io_link;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2918,6 +2986,8 @@ amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_cpusocket_handle socket_ha
|
||||
uint32_t bw;
|
||||
struct link_id_bw_type io_link;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2943,6 +3013,8 @@ amdsmi_status_t amdsmi_get_metrics_table_version(amdsmi_cpusocket_handle socket_
|
||||
amdsmi_status_t status;
|
||||
uint32_t metrics_tbl_ver;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2966,6 +3038,8 @@ amdsmi_status_t amdsmi_get_metrics_table(amdsmi_cpusocket_handle socket_handle,
|
||||
amdsmi_status_t status;
|
||||
struct hsmp_metric_table metrics_tbl;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
@@ -2989,6 +3063,8 @@ amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_cpusocket_handle s
|
||||
amdsmi_status_t status;
|
||||
uint32_t online_core;
|
||||
|
||||
AMDSMI_CHECK_INIT();
|
||||
|
||||
if (socket_handle == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
|
||||
Referencia en una nueva incidencia
Block a user