Lines Matching refs:msg
61 static void report_version(struct scmi_msg *msg) in report_version() argument
68 if (msg->in_size != 0) { in report_version()
69 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_version()
73 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_version()
76 static void report_attributes(struct scmi_msg *msg) in report_attributes() argument
85 if (msg->in_size != 0) { in report_attributes()
86 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_attributes()
90 return_values.attributes = plat_scmi_pd_count(msg->agent_id); in report_attributes()
91 len = plat_scmi_pd_statistics(msg->agent_id, &addr); in report_attributes()
98 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_attributes()
101 static void report_message_attributes(struct scmi_msg *msg) in report_message_attributes() argument
103 struct scmi_protocol_message_attributes_a2p *in_args = (void *)msg->in; in report_message_attributes()
110 if (msg->in_size != sizeof(*in_args)) { in report_message_attributes()
111 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in report_message_attributes()
116 scmi_status_response(msg, SCMI_NOT_FOUND); in report_message_attributes()
120 scmi_write_response(msg, &return_values, sizeof(return_values)); in report_message_attributes()
123 static void scmi_pd_attributes(struct scmi_msg *msg) in scmi_pd_attributes() argument
125 const struct scmi_pd_attributes_a2p *in_args = (void *)msg->in; in scmi_pd_attributes()
132 if (msg->in_size != sizeof(*in_args)) { in scmi_pd_attributes()
133 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in scmi_pd_attributes()
139 if (pd_id >= plat_scmi_pd_count(msg->agent_id)) { in scmi_pd_attributes()
140 scmi_status_response(msg, SCMI_INVALID_PARAMETERS); in scmi_pd_attributes()
144 name = plat_scmi_pd_get_name(msg->agent_id, pd_id); in scmi_pd_attributes()
146 scmi_status_response(msg, SCMI_NOT_FOUND); in scmi_pd_attributes()
152 return_values.attributes = plat_scmi_pd_get_attributes(msg->agent_id, pd_id); in scmi_pd_attributes()
154 scmi_write_response(msg, &return_values, sizeof(return_values)); in scmi_pd_attributes()
157 static void scmi_pd_state_get(struct scmi_msg *msg) in scmi_pd_state_get() argument
159 const struct scmi_pd_state_get_a2p *in_args = (void *)msg->in; in scmi_pd_state_get()
166 if (msg->in_size != sizeof(*in_args)) { in scmi_pd_state_get()
167 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in scmi_pd_state_get()
173 if (pd_id >= plat_scmi_pd_count(msg->agent_id)) { in scmi_pd_state_get()
174 scmi_status_response(msg, SCMI_INVALID_PARAMETERS); in scmi_pd_state_get()
178 state = plat_scmi_pd_get_state(msg->agent_id, pd_id); in scmi_pd_state_get()
182 scmi_write_response(msg, &return_values, sizeof(return_values)); in scmi_pd_state_get()
185 static void scmi_pd_state_set(struct scmi_msg *msg) in scmi_pd_state_set() argument
187 const struct scmi_pd_state_set_a2p *in_args = (void *)msg->in; in scmi_pd_state_set()
193 if (msg->in_size != sizeof(*in_args)) { in scmi_pd_state_set()
194 scmi_status_response(msg, SCMI_PROTOCOL_ERROR); in scmi_pd_state_set()
200 if (pd_id >= plat_scmi_pd_count(msg->agent_id)) { in scmi_pd_state_set()
201 scmi_status_response(msg, SCMI_INVALID_PARAMETERS); in scmi_pd_state_set()
208 status = plat_scmi_pd_set_state(msg->agent_id, flags, pd_id, state); in scmi_pd_state_set()
210 scmi_status_response(msg, status); in scmi_pd_state_set()
228 scmi_msg_handler_t scmi_msg_get_pd_handler(struct scmi_msg *msg) in scmi_msg_get_pd_handler() argument
231 unsigned int message_id = SPECULATION_SAFE_VALUE(msg->message_id); in scmi_msg_get_pd_handler()
234 VERBOSE("pd handle not found %u", msg->message_id); in scmi_msg_get_pd_handler()