@@ -910,9 +910,9 @@ void vmbus_reset_channel_cb(struct vmbus_channel *channel)
tasklet_disable(&channel->callback_event);
/* See the inline comments in vmbus_chan_sched(). */
- spin_lock_irqsave(&channel->sched_lock, flags);
+ raw_spin_lock_irqsave(&channel->sched_lock, flags);
channel->onchannel_callback = NULL;
- spin_unlock_irqrestore(&channel->sched_lock, flags);
+ raw_spin_unlock_irqrestore(&channel->sched_lock, flags);
channel->sc_creation_callback = NULL;
@@ -348,7 +348,7 @@ static struct vmbus_channel *alloc_channel(void)
if (!channel)
return NULL;
- spin_lock_init(&channel->sched_lock);
+ raw_spin_lock_init(&channel->sched_lock);
init_completion(&channel->rescind_event);
INIT_LIST_HEAD(&channel->sc_list);
@@ -1257,7 +1257,7 @@ static void vmbus_chan_sched(struct hv_per_cpu_context *hv_cpu)
* sched_lock critical section. See also the inline comments
* in vmbus_reset_channel_cb().
*/
- spin_lock(&channel->sched_lock);
+ raw_spin_lock(&channel->sched_lock);
callback_fn = channel->onchannel_callback;
if (unlikely(callback_fn == NULL))
@@ -1280,7 +1280,7 @@ static void vmbus_chan_sched(struct hv_per_cpu_context *hv_cpu)
}
sched_unlock:
- spin_unlock(&channel->sched_lock);
+ raw_spin_unlock(&channel->sched_lock);
sched_unlock_rcu:
rcu_read_unlock();
}
@@ -1995,13 +1995,13 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
* sched_lock critical section. See also the inline comments
* in vmbus_reset_channel_cb().
*/
- spin_lock_irqsave(&channel->sched_lock, flags);
+ raw_spin_lock_irqsave(&channel->sched_lock, flags);
if (unlikely(channel->onchannel_callback == NULL)) {
- spin_unlock_irqrestore(&channel->sched_lock, flags);
+ raw_spin_unlock_irqrestore(&channel->sched_lock, flags);
goto enable_tasklet;
}
hv_pci_onchannelcallback(hbus);
- spin_unlock_irqrestore(&channel->sched_lock, flags);
+ raw_spin_unlock_irqrestore(&channel->sched_lock, flags);
udelay(100);
}
@@ -873,7 +873,7 @@ struct vmbus_channel {
* Synchronize channel scheduling and channel removal; see the inline
* comments in vmbus_chan_sched() and vmbus_reset_channel_cb().
*/
- spinlock_t sched_lock;
+ raw_spinlock_t sched_lock;
/*
* A channel can be marked for one of three modes of reading:
From: Mitchell Levy <levymitchell0@gmail.com> In vmbus_drv.c, vmbus_channel.sched_lock is acquired while holding an rcu_read_lock. Since this is not a sleepable context, change sched_lock to be a raw_spinlock_t to avoid sleeping when PREEMPT_RT is enabled. --- drivers/hv/channel.c | 4 ++-- drivers/hv/channel_mgmt.c | 2 +- drivers/hv/vmbus_drv.c | 4 ++-- drivers/pci/controller/pci-hyperv.c | 6 +++--- include/linux/hyperv.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)