Lines Matching refs:msg

83 	u64 msg;  member
106 u64 msg) in apple_rtkit_management_send() argument
108 msg &= ~APPLE_RTKIT_MGMT_TYPE; in apple_rtkit_management_send()
109 msg |= FIELD_PREP(APPLE_RTKIT_MGMT_TYPE, type); in apple_rtkit_management_send()
110 apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_MGMT, msg, NULL, false); in apple_rtkit_management_send()
113 static void apple_rtkit_management_rx_hello(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_management_rx_hello() argument
117 int min_ver = FIELD_GET(APPLE_RTKIT_MGMT_HELLO_MINVER, msg); in apple_rtkit_management_rx_hello()
118 int max_ver = FIELD_GET(APPLE_RTKIT_MGMT_HELLO_MAXVER, msg); in apple_rtkit_management_rx_hello()
150 static void apple_rtkit_management_rx_epmap(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_management_rx_epmap() argument
154 unsigned long bitmap = FIELD_GET(APPLE_RTKIT_MGMT_EPMAP_BITMAP, msg); in apple_rtkit_management_rx_epmap()
155 u32 base = FIELD_GET(APPLE_RTKIT_MGMT_EPMAP_BASE, msg); in apple_rtkit_management_rx_epmap()
168 if (msg & APPLE_RTKIT_MGMT_EPMAP_LAST) in apple_rtkit_management_rx_epmap()
175 if (!(msg & APPLE_RTKIT_MGMT_EPMAP_LAST)) in apple_rtkit_management_rx_epmap()
207 u64 msg) in apple_rtkit_management_rx_iop_pwr_ack() argument
209 unsigned int new_state = FIELD_GET(APPLE_RTKIT_MGMT_PWR_STATE, msg); in apple_rtkit_management_rx_iop_pwr_ack()
219 u64 msg) in apple_rtkit_management_rx_ap_pwr_ack() argument
221 unsigned int new_state = FIELD_GET(APPLE_RTKIT_MGMT_PWR_STATE, msg); in apple_rtkit_management_rx_ap_pwr_ack()
230 static void apple_rtkit_management_rx(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_management_rx() argument
232 u8 type = FIELD_GET(APPLE_RTKIT_MGMT_TYPE, msg); in apple_rtkit_management_rx()
236 apple_rtkit_management_rx_hello(rtk, msg); in apple_rtkit_management_rx()
239 apple_rtkit_management_rx_epmap(rtk, msg); in apple_rtkit_management_rx()
242 apple_rtkit_management_rx_iop_pwr_ack(rtk, msg); in apple_rtkit_management_rx()
245 apple_rtkit_management_rx_ap_pwr_ack(rtk, msg); in apple_rtkit_management_rx()
251 msg, type); in apple_rtkit_management_rx()
257 u8 ep, u64 msg) in apple_rtkit_common_rx_get_buffer() argument
259 size_t n_4kpages = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg); in apple_rtkit_common_rx_get_buffer()
266 buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg); in apple_rtkit_common_rx_get_buffer()
339 static void apple_rtkit_crashlog_rx(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_crashlog_rx() argument
341 u8 type = FIELD_GET(APPLE_RTKIT_SYSLOG_TYPE, msg); in apple_rtkit_crashlog_rx()
346 msg); in apple_rtkit_crashlog_rx()
352 APPLE_RTKIT_EP_CRASHLOG, msg); in apple_rtkit_crashlog_rx()
379 static void apple_rtkit_ioreport_rx(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_ioreport_rx() argument
381 u8 type = FIELD_GET(APPLE_RTKIT_SYSLOG_TYPE, msg); in apple_rtkit_ioreport_rx()
386 APPLE_RTKIT_EP_IOREPORT, msg); in apple_rtkit_ioreport_rx()
391 apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_IOREPORT, msg, in apple_rtkit_ioreport_rx()
396 msg); in apple_rtkit_ioreport_rx()
400 static void apple_rtkit_syslog_rx_init(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_syslog_rx_init() argument
402 rtk->syslog_n_entries = FIELD_GET(APPLE_RTKIT_SYSLOG_N_ENTRIES, msg); in apple_rtkit_syslog_rx_init()
403 rtk->syslog_msg_size = FIELD_GET(APPLE_RTKIT_SYSLOG_MSG_SIZE, msg); in apple_rtkit_syslog_rx_init()
417 static void apple_rtkit_syslog_rx_log(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_syslog_rx_log() argument
419 u8 idx = msg & 0xff; in apple_rtkit_syslog_rx_log()
466 apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_SYSLOG, msg, NULL, false); in apple_rtkit_syslog_rx_log()
469 static void apple_rtkit_syslog_rx(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_syslog_rx() argument
471 u8 type = FIELD_GET(APPLE_RTKIT_SYSLOG_TYPE, msg); in apple_rtkit_syslog_rx()
476 APPLE_RTKIT_EP_SYSLOG, msg); in apple_rtkit_syslog_rx()
479 apple_rtkit_syslog_rx_init(rtk, msg); in apple_rtkit_syslog_rx()
482 apple_rtkit_syslog_rx_log(rtk, msg); in apple_rtkit_syslog_rx()
486 msg); in apple_rtkit_syslog_rx()
490 static void apple_rtkit_oslog_rx_init(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_oslog_rx_init() argument
494 dev_dbg(rtk->dev, "RTKit: oslog init: msg: 0x%llx\n", msg); in apple_rtkit_oslog_rx_init()
499 static void apple_rtkit_oslog_rx(struct apple_rtkit *rtk, u64 msg) in apple_rtkit_oslog_rx() argument
501 u8 type = FIELD_GET(APPLE_RTKIT_OSLOG_TYPE, msg); in apple_rtkit_oslog_rx()
505 apple_rtkit_oslog_rx_init(rtk, msg); in apple_rtkit_oslog_rx()
508 dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n", msg); in apple_rtkit_oslog_rx()
520 apple_rtkit_management_rx(rtk, rtk_work->msg); in apple_rtkit_rx_work()
523 apple_rtkit_crashlog_rx(rtk, rtk_work->msg); in apple_rtkit_rx_work()
526 apple_rtkit_syslog_rx(rtk, rtk_work->msg); in apple_rtkit_rx_work()
529 apple_rtkit_ioreport_rx(rtk, rtk_work->msg); in apple_rtkit_rx_work()
532 apple_rtkit_oslog_rx(rtk, rtk_work->msg); in apple_rtkit_rx_work()
537 rtk_work->msg); in apple_rtkit_rx_work()
542 rtk_work->ep, rtk_work->msg); in apple_rtkit_rx_work()
547 rtk_work->ep, rtk_work->msg); in apple_rtkit_rx_work()
556 struct apple_mbox_msg *msg = mssg; in apple_rtkit_rx() local
558 u8 ep = msg->msg1; in apple_rtkit_rx()
574 rtk->ops->recv_message_early(rtk->cookie, ep, msg->msg0)) in apple_rtkit_rx()
583 work->msg = msg->msg0; in apple_rtkit_rx()
590 struct apple_rtkit_msg *msg = in apple_rtkit_tx_done() local
596 if (msg->completion) in apple_rtkit_tx_done()
597 complete(msg->completion); in apple_rtkit_tx_done()
598 kfree(msg); in apple_rtkit_tx_done()
604 struct apple_rtkit_msg *msg; in apple_rtkit_send_message() local
619 msg = kzalloc(sizeof(*msg), flags); in apple_rtkit_send_message()
620 if (!msg) in apple_rtkit_send_message()
623 msg->mbox_msg.msg0 = message; in apple_rtkit_send_message()
624 msg->mbox_msg.msg1 = ep; in apple_rtkit_send_message()
625 msg->completion = completion; in apple_rtkit_send_message()
634 ret = mbox_send_message(rtk->mbox_chan, &msg->mbox_msg); in apple_rtkit_send_message()
636 kfree(msg); in apple_rtkit_send_message()
684 u64 msg; in apple_rtkit_start_ep() local
692 msg = FIELD_PREP(APPLE_RTKIT_MGMT_STARTEP_EP, endpoint); in apple_rtkit_start_ep()
693 msg |= APPLE_RTKIT_MGMT_STARTEP_FLAG; in apple_rtkit_start_ep()
694 apple_rtkit_management_send(rtk, APPLE_RTKIT_MGMT_STARTEP, msg); in apple_rtkit_start_ep()
816 u64 msg; in apple_rtkit_set_ap_power_state() local
821 msg = FIELD_PREP(APPLE_RTKIT_MGMT_PWR_STATE, state); in apple_rtkit_set_ap_power_state()
823 msg); in apple_rtkit_set_ap_power_state()
837 u64 msg; in apple_rtkit_set_iop_power_state() local
842 msg = FIELD_PREP(APPLE_RTKIT_MGMT_PWR_STATE, state); in apple_rtkit_set_iop_power_state()
844 msg); in apple_rtkit_set_iop_power_state()
944 u64 msg; in apple_rtkit_wake() local
955 msg = FIELD_PREP(APPLE_RTKIT_MGMT_PWR_STATE, APPLE_RTKIT_PWR_STATE_ON); in apple_rtkit_wake()
957 msg); in apple_rtkit_wake()