diff options
Diffstat (limited to 'drivers/staging/hv/Vmbus.c')
-rw-r--r-- | drivers/staging/hv/Vmbus.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index a4dd06f6d45..35a023e9f9d 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c | |||
@@ -129,7 +129,7 @@ static int VmbusOnDeviceAdd(struct hv_device *dev, void *AdditionalInfo) | |||
129 | 129 | ||
130 | /* strcpy(dev->name, "vmbus"); */ | 130 | /* strcpy(dev->name, "vmbus"); */ |
131 | /* SynIC setup... */ | 131 | /* SynIC setup... */ |
132 | ret = HvSynicInit(*irqvector); | 132 | on_each_cpu(HvSynicInit, (void *)irqvector, 1); |
133 | 133 | ||
134 | /* Connect to VMBus in the root partition */ | 134 | /* Connect to VMBus in the root partition */ |
135 | ret = VmbusConnect(); | 135 | ret = VmbusConnect(); |
@@ -150,7 +150,7 @@ static int VmbusOnDeviceRemove(struct hv_device *dev) | |||
150 | DPRINT_ENTER(VMBUS); | 150 | DPRINT_ENTER(VMBUS); |
151 | VmbusChannelReleaseUnattachedChannels(); | 151 | VmbusChannelReleaseUnattachedChannels(); |
152 | VmbusDisconnect(); | 152 | VmbusDisconnect(); |
153 | HvSynicCleanup(); | 153 | on_each_cpu(HvSynicCleanup, NULL, 1); |
154 | DPRINT_EXIT(VMBUS); | 154 | DPRINT_EXIT(VMBUS); |
155 | 155 | ||
156 | return ret; | 156 | return ret; |
@@ -173,7 +173,8 @@ static void VmbusOnCleanup(struct hv_driver *drv) | |||
173 | */ | 173 | */ |
174 | static void VmbusOnMsgDPC(struct hv_driver *drv) | 174 | static void VmbusOnMsgDPC(struct hv_driver *drv) |
175 | { | 175 | { |
176 | void *page_addr = gHvContext.synICMessagePage[0]; | 176 | int cpu = smp_processor_id(); |
177 | void *page_addr = gHvContext.synICMessagePage[cpu]; | ||
177 | struct hv_message *msg = (struct hv_message *)page_addr + | 178 | struct hv_message *msg = (struct hv_message *)page_addr + |
178 | VMBUS_MESSAGE_SINT; | 179 | VMBUS_MESSAGE_SINT; |
179 | struct hv_message *copied; | 180 | struct hv_message *copied; |
@@ -230,11 +231,12 @@ static void VmbusOnEventDPC(struct hv_driver *drv) | |||
230 | static int VmbusOnISR(struct hv_driver *drv) | 231 | static int VmbusOnISR(struct hv_driver *drv) |
231 | { | 232 | { |
232 | int ret = 0; | 233 | int ret = 0; |
234 | int cpu = smp_processor_id(); | ||
233 | void *page_addr; | 235 | void *page_addr; |
234 | struct hv_message *msg; | 236 | struct hv_message *msg; |
235 | union hv_synic_event_flags *event; | 237 | union hv_synic_event_flags *event; |
236 | 238 | ||
237 | page_addr = gHvContext.synICMessagePage[0]; | 239 | page_addr = gHvContext.synICMessagePage[cpu]; |
238 | msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; | 240 | msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; |
239 | 241 | ||
240 | DPRINT_ENTER(VMBUS); | 242 | DPRINT_ENTER(VMBUS); |
@@ -248,7 +250,7 @@ static int VmbusOnISR(struct hv_driver *drv) | |||
248 | } | 250 | } |
249 | 251 | ||
250 | /* TODO: Check if there are events to be process */ | 252 | /* TODO: Check if there are events to be process */ |
251 | page_addr = gHvContext.synICEventPage[0]; | 253 | page_addr = gHvContext.synICEventPage[cpu]; |
252 | event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT; | 254 | event = (union hv_synic_event_flags *)page_addr + VMBUS_MESSAGE_SINT; |
253 | 255 | ||
254 | /* Since we are a child, we only need to check bit 0 */ | 256 | /* Since we are a child, we only need to check bit 0 */ |