@@ -462,7 +462,6 @@ int idxd_device_init_reset(struct idxd_device *idxd)
462
462
{
463
463
struct device * dev = & idxd -> pdev -> dev ;
464
464
union idxd_command_reg cmd ;
465
- unsigned long flags ;
466
465
467
466
if (idxd_device_is_halted (idxd )) {
468
467
dev_warn (& idxd -> pdev -> dev , "Device is HALTED!\n" );
@@ -472,13 +471,13 @@ int idxd_device_init_reset(struct idxd_device *idxd)
472
471
memset (& cmd , 0 , sizeof (cmd ));
473
472
cmd .cmd = IDXD_CMD_RESET_DEVICE ;
474
473
dev_dbg (dev , "%s: sending reset for init.\n" , __func__ );
475
- spin_lock_irqsave (& idxd -> cmd_lock , flags );
474
+ spin_lock (& idxd -> cmd_lock );
476
475
iowrite32 (cmd .bits , idxd -> reg_base + IDXD_CMD_OFFSET );
477
476
478
477
while (ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET ) &
479
478
IDXD_CMDSTS_ACTIVE )
480
479
cpu_relax ();
481
- spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
480
+ spin_unlock (& idxd -> cmd_lock );
482
481
return 0 ;
483
482
}
484
483
@@ -487,7 +486,6 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
487
486
{
488
487
union idxd_command_reg cmd ;
489
488
DECLARE_COMPLETION_ONSTACK (done );
490
- unsigned long flags ;
491
489
u32 stat ;
492
490
493
491
if (idxd_device_is_halted (idxd )) {
@@ -502,7 +500,7 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
502
500
cmd .operand = operand ;
503
501
cmd .int_req = 1 ;
504
502
505
- spin_lock_irqsave (& idxd -> cmd_lock , flags );
503
+ spin_lock (& idxd -> cmd_lock );
506
504
wait_event_lock_irq (idxd -> cmd_waitq ,
507
505
!test_bit (IDXD_FLAG_CMD_RUNNING , & idxd -> flags ),
508
506
idxd -> cmd_lock );
@@ -519,18 +517,18 @@ static void idxd_cmd_exec(struct idxd_device *idxd, int cmd_code, u32 operand,
519
517
* After command submitted, release lock and go to sleep until
520
518
* the command completes via interrupt.
521
519
*/
522
- spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
520
+ spin_unlock (& idxd -> cmd_lock );
523
521
wait_for_completion (& done );
524
522
stat = ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET );
525
- spin_lock_irqsave (& idxd -> cmd_lock , flags );
523
+ spin_lock (& idxd -> cmd_lock );
526
524
if (status )
527
525
* status = stat ;
528
526
idxd -> cmd_status = stat & GENMASK (7 , 0 );
529
527
530
528
__clear_bit (IDXD_FLAG_CMD_RUNNING , & idxd -> flags );
531
529
/* Wake up other pending commands */
532
530
wake_up (& idxd -> cmd_waitq );
533
- spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
531
+ spin_unlock (& idxd -> cmd_lock );
534
532
}
535
533
536
534
int idxd_device_enable (struct idxd_device * idxd )
@@ -641,7 +639,6 @@ int idxd_device_release_int_handle(struct idxd_device *idxd, int handle,
641
639
struct device * dev = & idxd -> pdev -> dev ;
642
640
u32 operand , status ;
643
641
union idxd_command_reg cmd ;
644
- unsigned long flags ;
645
642
646
643
if (!(idxd -> hw .cmd_cap & BIT (IDXD_CMD_RELEASE_INT_HANDLE )))
647
644
return - EOPNOTSUPP ;
@@ -659,13 +656,13 @@ int idxd_device_release_int_handle(struct idxd_device *idxd, int handle,
659
656
660
657
dev_dbg (dev , "cmd: %u operand: %#x\n" , IDXD_CMD_RELEASE_INT_HANDLE , operand );
661
658
662
- spin_lock_irqsave (& idxd -> cmd_lock , flags );
659
+ spin_lock (& idxd -> cmd_lock );
663
660
iowrite32 (cmd .bits , idxd -> reg_base + IDXD_CMD_OFFSET );
664
661
665
662
while (ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET ) & IDXD_CMDSTS_ACTIVE )
666
663
cpu_relax ();
667
664
status = ioread32 (idxd -> reg_base + IDXD_CMDSTS_OFFSET );
668
- spin_unlock_irqrestore (& idxd -> cmd_lock , flags );
665
+ spin_unlock (& idxd -> cmd_lock );
669
666
670
667
if ((status & IDXD_CMDSTS_ERR_MASK ) != IDXD_CMDSTS_SUCCESS ) {
671
668
dev_dbg (dev , "release int handle failed: %#x\n" , status );
0 commit comments