diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grukservices.h')
-rw-r--r-- | drivers/misc/sgi-gru/grukservices.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/drivers/misc/sgi-gru/grukservices.h b/drivers/misc/sgi-gru/grukservices.h index eb17e0a3ac61..747ed315d56f 100644 --- a/drivers/misc/sgi-gru/grukservices.h +++ b/drivers/misc/sgi-gru/grukservices.h | |||
@@ -41,6 +41,15 @@ | |||
41 | * - gru_create_message_queue() needs interrupt vector info | 41 | * - gru_create_message_queue() needs interrupt vector info |
42 | */ | 42 | */ |
43 | 43 | ||
44 | struct gru_message_queue_desc { | ||
45 | void *mq; /* message queue vaddress */ | ||
46 | unsigned long mq_gpa; /* global address of mq */ | ||
47 | int qlines; /* queue size in CL */ | ||
48 | int interrupt_vector; /* interrupt vector */ | ||
49 | int interrupt_pnode; /* pnode for interrupt */ | ||
50 | int interrupt_apicid; /* lapicid for interrupt */ | ||
51 | }; | ||
52 | |||
44 | /* | 53 | /* |
45 | * Initialize a user allocated chunk of memory to be used as | 54 | * Initialize a user allocated chunk of memory to be used as |
46 | * a message queue. The caller must ensure that the queue is | 55 | * a message queue. The caller must ensure that the queue is |
@@ -51,14 +60,19 @@ | |||
51 | * to manage the queue. | 60 | * to manage the queue. |
52 | * | 61 | * |
53 | * Input: | 62 | * Input: |
54 | * p pointer to user allocated memory. | 63 | * mqd pointer to message queue descriptor |
64 | * p pointer to user allocated mesq memory. | ||
55 | * bytes size of message queue in bytes | 65 | * bytes size of message queue in bytes |
66 | * vector interrupt vector (zero if no interrupts) | ||
67 | * nasid nasid of blade where interrupt is delivered | ||
68 | * apicid apicid of cpu for interrupt | ||
56 | * | 69 | * |
57 | * Errors: | 70 | * Errors: |
58 | * 0 OK | 71 | * 0 OK |
59 | * >0 error | 72 | * >0 error |
60 | */ | 73 | */ |
61 | extern int gru_create_message_queue(void *p, unsigned int bytes); | 74 | extern int gru_create_message_queue(struct gru_message_queue_desc *mqd, |
75 | void *p, unsigned int bytes, int nasid, int vector, int apicid); | ||
62 | 76 | ||
63 | /* | 77 | /* |
64 | * Send a message to a message queue. | 78 | * Send a message to a message queue. |
@@ -68,7 +82,7 @@ extern int gru_create_message_queue(void *p, unsigned int bytes); | |||
68 | * | 82 | * |
69 | * | 83 | * |
70 | * Input: | 84 | * Input: |
71 | * xmq message queue - must be a UV global physical address | 85 | * mqd pointer to message queue descriptor |
72 | * mesg pointer to message. Must be 64-bit aligned | 86 | * mesg pointer to message. Must be 64-bit aligned |
73 | * bytes size of message in bytes | 87 | * bytes size of message in bytes |
74 | * | 88 | * |
@@ -77,8 +91,8 @@ extern int gru_create_message_queue(void *p, unsigned int bytes); | |||
77 | * >0 Send failure - see error codes below | 91 | * >0 Send failure - see error codes below |
78 | * | 92 | * |
79 | */ | 93 | */ |
80 | extern int gru_send_message_gpa(unsigned long mq_gpa, void *mesg, | 94 | extern int gru_send_message_gpa(struct gru_message_queue_desc *mqd, |
81 | unsigned int bytes); | 95 | void *mesg, unsigned int bytes); |
82 | 96 | ||
83 | /* Status values for gru_send_message() */ | 97 | /* Status values for gru_send_message() */ |
84 | #define MQE_OK 0 /* message sent successfully */ | 98 | #define MQE_OK 0 /* message sent successfully */ |
@@ -94,10 +108,11 @@ extern int gru_send_message_gpa(unsigned long mq_gpa, void *mesg, | |||
94 | * API extensions may allow for out-of-order freeing. | 108 | * API extensions may allow for out-of-order freeing. |
95 | * | 109 | * |
96 | * Input | 110 | * Input |
97 | * mq message queue | 111 | * mqd pointer to message queue descriptor |
98 | * mesq message being freed | 112 | * mesq message being freed |
99 | */ | 113 | */ |
100 | extern void gru_free_message(void *mq, void *mesq); | 114 | extern void gru_free_message(struct gru_message_queue_desc *mqd, |
115 | void *mesq); | ||
101 | 116 | ||
102 | /* | 117 | /* |
103 | * Get next message from message queue. Returns pointer to | 118 | * Get next message from message queue. Returns pointer to |
@@ -106,13 +121,13 @@ extern void gru_free_message(void *mq, void *mesq); | |||
106 | * in order to move the queue pointers to next message. | 121 | * in order to move the queue pointers to next message. |
107 | * | 122 | * |
108 | * Input | 123 | * Input |
109 | * mq message queue | 124 | * mqd pointer to message queue descriptor |
110 | * | 125 | * |
111 | * Output: | 126 | * Output: |
112 | * p pointer to message | 127 | * p pointer to message |
113 | * NULL no message available | 128 | * NULL no message available |
114 | */ | 129 | */ |
115 | extern void *gru_get_next_message(void *mq); | 130 | extern void *gru_get_next_message(struct gru_message_queue_desc *mqd); |
116 | 131 | ||
117 | 132 | ||
118 | /* | 133 | /* |