File tree Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,8 @@ void hyperv_vector_handler(struct pt_regs *regs)
59
59
void hv_setup_vmbus_irq (void (* handler )(void ))
60
60
{
61
61
vmbus_handler = handler ;
62
- /*
63
- * Setup the IDT for hypervisor callback. Prevent reallocation
64
- * at module reload.
65
- */
66
- if (!test_bit (HYPERVISOR_CALLBACK_VECTOR , used_vectors ))
67
- alloc_intr_gate (HYPERVISOR_CALLBACK_VECTOR ,
68
- hyperv_callback_vector );
62
+ /* Setup the IDT for hypervisor callback */
63
+ alloc_intr_gate (HYPERVISOR_CALLBACK_VECTOR , hyperv_callback_vector );
69
64
}
70
65
71
66
void hv_remove_vmbus_irq (void )
Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ void set_intr_gate(unsigned int n, const void *addr)
354
354
355
355
void alloc_intr_gate (unsigned int n , const void * addr )
356
356
{
357
- BUG_ON (test_bit ( n , used_vectors ) || n < FIRST_SYSTEM_VECTOR );
358
- set_bit ( n , used_vectors );
359
- set_intr_gate (n , addr );
357
+ BUG_ON (n < FIRST_SYSTEM_VECTOR );
358
+ if (! test_and_set_bit ( n , used_vectors ))
359
+ set_intr_gate (n , addr );
360
360
}
Original file line number Diff line number Diff line change @@ -1653,10 +1653,8 @@ void xen_callback_vector(void)
1653
1653
return ;
1654
1654
}
1655
1655
pr_info ("Xen HVM callback vector for event delivery is enabled\n" );
1656
- /* in the restore case the vector has already been allocated */
1657
- if (!test_bit (HYPERVISOR_CALLBACK_VECTOR , used_vectors ))
1658
- alloc_intr_gate (HYPERVISOR_CALLBACK_VECTOR ,
1659
- xen_hvm_callback_vector );
1656
+ alloc_intr_gate (HYPERVISOR_CALLBACK_VECTOR ,
1657
+ xen_hvm_callback_vector );
1660
1658
}
1661
1659
}
1662
1660
#else
You can’t perform that action at this time.
0 commit comments