File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ EXPORT_SYMBOL_GPL(hw_breakpoint_restore);
487
487
*/
488
488
static int hw_breakpoint_handler (struct die_args * args )
489
489
{
490
- int i , cpu , rc = NOTIFY_STOP ;
490
+ int i , rc = NOTIFY_STOP ;
491
491
struct perf_event * bp ;
492
492
unsigned long dr6 ;
493
493
unsigned long * dr6_p ;
@@ -505,12 +505,10 @@ static int hw_breakpoint_handler(struct die_args *args)
505
505
return NOTIFY_DONE ;
506
506
507
507
/*
508
- * Assert that local interrupts are disabled
509
508
* Reset the DRn bits in the virtualized register value.
510
509
* The ptrace trigger routine will add in whatever is needed.
511
510
*/
512
511
current -> thread .debugreg6 &= ~DR_TRAP_BITS ;
513
- cpu = get_cpu ();
514
512
515
513
/* Handle all the breakpoints that were triggered */
516
514
for (i = 0 ; i < HBP_NUM ; ++ i ) {
@@ -525,7 +523,7 @@ static int hw_breakpoint_handler(struct die_args *args)
525
523
*/
526
524
rcu_read_lock ();
527
525
528
- bp = per_cpu (bp_per_reg [i ], cpu );
526
+ bp = this_cpu_read (bp_per_reg [i ]);
529
527
/*
530
528
* Reset the 'i'th TRAP bit in dr6 to denote completion of
531
529
* exception handling
@@ -560,8 +558,6 @@ static int hw_breakpoint_handler(struct die_args *args)
560
558
(dr6 & (~DR_TRAP_BITS )))
561
559
rc = NOTIFY_DONE ;
562
560
563
- put_cpu ();
564
-
565
561
return rc ;
566
562
}
567
563
You can’t perform that action at this time.
0 commit comments