@@ -465,13 +465,13 @@ int idxd_device_init_reset(struct idxd_device *idxd)
465465 memset (& cmd , 0 , sizeof (cmd ));
466466 cmd .cmd = IDXD_CMD_RESET_DEVICE ;
467467 dev_dbg (dev , "%s: sending reset for init.\n" , __func__ );
468- spin_lock_irqsave (& idxd -> dev_lock , flags );
468+ spin_lock_irqsave (& idxd -> cmd_lock , flags );
469469 iowrite32 (cmd .bits , idxd -> reg_base + IDXD_CMD_OFFSET );
470470
471471 while (ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET ) &
472472 IDXD_CMDSTS_ACTIVE )
473473 cpu_relax ();
474- spin_unlock_irqrestore (& idxd -> dev_lock , flags );
474+ spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
475475 return 0 ;
476476}
477477
@@ -494,10 +494,10 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
494494 cmd .operand = operand ;
495495 cmd .int_req = 1 ;
496496
497- spin_lock_irqsave (& idxd -> dev_lock , flags );
497+ spin_lock_irqsave (& idxd -> cmd_lock , flags );
498498 wait_event_lock_irq (idxd -> cmd_waitq ,
499499 !test_bit (IDXD_FLAG_CMD_RUNNING , & idxd -> flags ),
500- idxd -> dev_lock );
500+ idxd -> cmd_lock );
501501
502502 dev_dbg (& idxd -> pdev -> dev , "%s: sending cmd: %#x op: %#x\n" ,
503503 __func__ , cmd_code , operand );
@@ -511,9 +511,9 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
511511 * After command submitted, release lock and go to sleep until
512512 * the command completes via interrupt.
513513 */
514- spin_unlock_irqrestore (& idxd -> dev_lock , flags );
514+ spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
515515 wait_for_completion (& done );
516- spin_lock_irqsave (& idxd -> dev_lock , flags );
516+ spin_lock_irqsave (& idxd -> cmd_lock , flags );
517517 if (status ) {
518518 * status = ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET );
519519 idxd -> cmd_status = * status & GENMASK (7 , 0 );
@@ -522,7 +522,7 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
522522 __clear_bit (IDXD_FLAG_CMD_RUNNING , & idxd -> flags );
523523 /* Wake up other pending commands */
524524 wake_up (& idxd -> cmd_waitq );
525- spin_unlock_irqrestore (& idxd -> dev_lock , flags );
525+ spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
526526}
527527
528528int idxd_device_enable (struct idxd_device * idxd )
@@ -667,13 +667,13 @@ int idxd_device_release_int_handle(struct idxd_device *idxd, int handle,
667667
668668 dev_dbg (dev , "cmd: %u operand: %#x\n" , IDXD_CMD_RELEASE_INT_HANDLE , operand );
669669
670- spin_lock_irqsave (& idxd -> dev_lock , flags );
670+ spin_lock_irqsave (& idxd -> cmd_lock , flags );
671671 iowrite32 (cmd .bits , idxd -> reg_base + IDXD_CMD_OFFSET );
672672
673673 while (ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET ) & IDXD_CMDSTS_ACTIVE )
674674 cpu_relax ();
675675 status = ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET );
676- spin_unlock_irqrestore (& idxd -> dev_lock , flags );
676+ spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
677677
678678 if ((status & IDXD_CMDSTS_ERR_MASK ) != IDXD_CMDSTS_SUCCESS ) {
679679 dev_dbg (dev , "release int handle failed: %#x\n" , status );
0 commit comments