@@ -635,7 +635,7 @@ static int vmbus_alloc_requestor(struct vmbus_requestor *rqstor, u32 size)
rqstor->req_bitmap = bitmap;
rqstor->size = size;
rqstor->next_request_id = 0;
- spin_lock_init(&rqstor->req_lock);
+ raw_spin_lock_init(&rqstor->req_lock);
return 0;
}
@@ -787,7 +787,7 @@ struct vmbus_requestor {
unsigned long *req_bitmap; /* is a given slot available? */
u32 size;
u64 next_request_id;
- spinlock_t req_lock; /* provides atomicity */
+ raw_spinlock_t req_lock; /* provides atomicity */
};
#define VMBUS_NO_RQSTOR U64_MAX
@@ -1050,7 +1050,7 @@ struct vmbus_channel {
do { \
struct vmbus_requestor *rqstor = &(channel)->requestor; \
\
- spin_lock_irqsave(&rqstor->req_lock, flags); \
+ raw_spin_lock_irqsave(&rqstor->req_lock, flags); \
} while (0)
static __always_inline void unlock_requestor(struct vmbus_channel *channel,
@@ -1058,7 +1058,7 @@ static __always_inline void unlock_requestor(struct vmbus_channel *channel,
{
struct vmbus_requestor *rqstor = &channel->requestor;
- spin_unlock_irqrestore(&rqstor->req_lock, flags);
+ raw_spin_unlock_irqrestore(&rqstor->req_lock, flags);
}
u64 vmbus_next_request_id(struct vmbus_channel *channel, u64 rqst_addr);
From: Mitchell Levy <levymitchell0@gmail.com> Because hv_pci_onchannelcallback is called with irq disabled in hv_compose_msi_msg, any locks held in that function must not be sleepable. Therefore, change vmbus_requestor to use raw_spinlock_t. --- drivers/hv/channel.c | 2 +- include/linux/hyperv.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)