aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-cmd-queue.h')
-rw-r--r--arch/mips/include/asm/octeon/cvmx-cmd-queue.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
index fed91125317f..024a71b2bff9 100644
--- a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
+++ b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h
@@ -244,33 +244,33 @@ static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id,
244 ".set noreorder\n" 244 ".set noreorder\n"
245 "1:\n" 245 "1:\n"
246 /* Atomic add one to ticket_ptr */ 246 /* Atomic add one to ticket_ptr */
247 "ll %[my_ticket], %[ticket_ptr]\n" 247 "ll %[my_ticket], %[ticket_ptr]\n"
248 /* and store the original value */ 248 /* and store the original value */
249 "li %[ticket], 1\n" 249 "li %[ticket], 1\n"
250 /* in my_ticket */ 250 /* in my_ticket */
251 "baddu %[ticket], %[my_ticket]\n" 251 "baddu %[ticket], %[my_ticket]\n"
252 "sc %[ticket], %[ticket_ptr]\n" 252 "sc %[ticket], %[ticket_ptr]\n"
253 "beqz %[ticket], 1b\n" 253 "beqz %[ticket], 1b\n"
254 " nop\n" 254 " nop\n"
255 /* Load the current now_serving ticket */ 255 /* Load the current now_serving ticket */
256 "lbu %[ticket], %[now_serving]\n" 256 "lbu %[ticket], %[now_serving]\n"
257 "2:\n" 257 "2:\n"
258 /* Jump out if now_serving == my_ticket */ 258 /* Jump out if now_serving == my_ticket */
259 "beq %[ticket], %[my_ticket], 4f\n" 259 "beq %[ticket], %[my_ticket], 4f\n"
260 /* Find out how many tickets are in front of me */ 260 /* Find out how many tickets are in front of me */
261 " subu %[ticket], %[my_ticket], %[ticket]\n" 261 " subu %[ticket], %[my_ticket], %[ticket]\n"
262 /* Use tickets in front of me minus one to delay */ 262 /* Use tickets in front of me minus one to delay */
263 "subu %[ticket], 1\n" 263 "subu %[ticket], 1\n"
264 /* Delay will be ((tickets in front)-1)*32 loops */ 264 /* Delay will be ((tickets in front)-1)*32 loops */
265 "cins %[ticket], %[ticket], 5, 7\n" 265 "cins %[ticket], %[ticket], 5, 7\n"
266 "3:\n" 266 "3:\n"
267 /* Loop here until our ticket might be up */ 267 /* Loop here until our ticket might be up */
268 "bnez %[ticket], 3b\n" 268 "bnez %[ticket], 3b\n"
269 " subu %[ticket], 1\n" 269 " subu %[ticket], 1\n"
270 /* Jump back up to check out ticket again */ 270 /* Jump back up to check out ticket again */
271 "b 2b\n" 271 "b 2b\n"
272 /* Load the current now_serving ticket */ 272 /* Load the current now_serving ticket */
273 " lbu %[ticket], %[now_serving]\n" 273 " lbu %[ticket], %[now_serving]\n"
274 "4:\n" 274 "4:\n"
275 ".set pop\n" : 275 ".set pop\n" :
276 [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]), 276 [ticket_ptr] "=m"(__cvmx_cmd_queue_state_ptr->ticket[__cvmx_cmd_queue_get_index(queue_id)]),
@@ -313,9 +313,9 @@ static inline __cvmx_cmd_queue_state_t
313 * 313 *
314 * @queue_id: Hardware command queue to write to 314 * @queue_id: Hardware command queue to write to
315 * @use_locking: 315 * @use_locking:
316 * Use internal locking to ensure exclusive access for queue 316 * Use internal locking to ensure exclusive access for queue
317 * updates. If you don't use this locking you must ensure 317 * updates. If you don't use this locking you must ensure
318 * exclusivity some other way. Locking is strongly recommended. 318 * exclusivity some other way. Locking is strongly recommended.
319 * @cmd_count: Number of command words to write 319 * @cmd_count: Number of command words to write
320 * @cmds: Array of commands to write 320 * @cmds: Array of commands to write
321 * 321 *
@@ -411,9 +411,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write(cvmx_cmd_queue_id_t
411 * 411 *
412 * @queue_id: Hardware command queue to write to 412 * @queue_id: Hardware command queue to write to
413 * @use_locking: 413 * @use_locking:
414 * Use internal locking to ensure exclusive access for queue 414 * Use internal locking to ensure exclusive access for queue
415 * updates. If you don't use this locking you must ensure 415 * updates. If you don't use this locking you must ensure
416 * exclusivity some other way. Locking is strongly recommended. 416 * exclusivity some other way. Locking is strongly recommended.
417 * @cmd1: Command 417 * @cmd1: Command
418 * @cmd2: Command 418 * @cmd2: Command
419 * 419 *
@@ -510,9 +510,9 @@ static inline cvmx_cmd_queue_result_t cvmx_cmd_queue_write2(cvmx_cmd_queue_id_t
510 * 510 *
511 * @queue_id: Hardware command queue to write to 511 * @queue_id: Hardware command queue to write to
512 * @use_locking: 512 * @use_locking:
513 * Use internal locking to ensure exclusive access for queue 513 * Use internal locking to ensure exclusive access for queue
514 * updates. If you don't use this locking you must ensure 514 * updates. If you don't use this locking you must ensure
515 * exclusivity some other way. Locking is strongly recommended. 515 * exclusivity some other way. Locking is strongly recommended.
516 * @cmd1: Command 516 * @cmd1: Command
517 * @cmd2: Command 517 * @cmd2: Command
518 * @cmd3: Command 518 * @cmd3: Command