Lines Matching refs:mqd
557 int gru_create_message_queue(struct gru_message_queue_desc *mqd, in gru_create_message_queue() argument
573 mqd->mq = mq; in gru_create_message_queue()
574 mqd->mq_gpa = uv_gpa(mq); in gru_create_message_queue()
575 mqd->qlines = qlines; in gru_create_message_queue()
576 mqd->interrupt_pnode = nasid >> 1; in gru_create_message_queue()
577 mqd->interrupt_vector = vector; in gru_create_message_queue()
578 mqd->interrupt_apicid = apicid; in gru_create_message_queue()
591 static int send_noop_message(void *cb, struct gru_message_queue_desc *mqd, in send_noop_message() argument
603 gru_mesq(cb, mqd->mq_gpa, gru_get_tri(mhdr), 1, IMA); in send_noop_message()
627 m = mqd->mq_gpa + (gru_get_amo_value_head(cb) << 6); in send_noop_message()
649 static int send_message_queue_full(void *cb, struct gru_message_queue_desc *mqd, in send_message_queue_full() argument
662 qlines = mqd->qlines; in send_message_queue_full()
671 gru_gamir(cb, EOP_IR_CLR, HSTATUS(mqd->mq_gpa, half), XTYPE_DW, IMA); in send_message_queue_full()
681 if (send_noop_message(cb, mqd, mesg)) { in send_message_queue_full()
682 gru_gamir(cb, EOP_IR_INC, HSTATUS(mqd->mq_gpa, half), in send_message_queue_full()
693 gru_gamer(cb, EOP_ERR_CSWAP, mqd->mq_gpa, XTYPE_DW, mqh.val, avalue, in send_message_queue_full()
701 gru_gamir(cb, EOP_IR_INC, HSTATUS(mqd->mq_gpa, half), XTYPE_DW, in send_message_queue_full()
718 static int send_message_put_nacked(void *cb, struct gru_message_queue_desc *mqd, in send_message_put_nacked() argument
724 m = mqd->mq_gpa + (gru_get_amo_value_head(cb) << 6); in send_message_put_nacked()
734 if (!mqd->interrupt_vector) in send_message_put_nacked()
746 ret = send_noop_message(cb, mqd, mesg); in send_message_put_nacked()
766 static int send_message_failure(void *cb, struct gru_message_queue_desc *mqd, in send_message_failure() argument
783 ret = send_message_queue_full(cb, mqd, mesg, lines); in send_message_failure()
791 ret = send_message_put_nacked(cb, mqd, mesg, lines); in send_message_failure()
808 int gru_send_message_gpa(struct gru_message_queue_desc *mqd, void *mesg, in gru_send_message_gpa() argument
833 gru_mesq(cb, mqd->mq_gpa, gru_get_tri(mhdr), clines, IMA); in gru_send_message_gpa()
836 ret = send_message_failure(cb, mqd, dsr, clines); in gru_send_message_gpa()
849 void gru_free_message(struct gru_message_queue_desc *mqd, void *mesg) in gru_free_message() argument
851 struct message_queue *mq = mqd->mq; in gru_free_message()
881 void *gru_get_next_message(struct gru_message_queue_desc *mqd) in gru_get_next_message() argument
883 struct message_queue *mq = mqd->mq; in gru_get_next_message()
889 gru_free_message(mqd, mhdr); in gru_get_next_message()
1009 struct gru_message_queue_desc mqd; in quicktest1() local
1021 gru_create_message_queue(&mqd, mq, 8 * GRU_CACHE_LINE_BYTES, 0, 0, 0); in quicktest1()
1025 ret = gru_send_message_gpa(&mqd, mes, sizeof(mes)); in quicktest1()
1037 m = gru_get_next_message(&mqd); in quicktest1()
1040 gru_free_message(&mqd, m); in quicktest1()