diff options
-rw-r--r-- | drivers/hv/hv.c | 4 | ||||
-rw-r--r-- | drivers/hv/hyperv_vmbus.h | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 12aa97f31f93..15956bd48b48 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c | |||
@@ -155,9 +155,9 @@ int hv_init(void) | |||
155 | union hv_x64_msr_hypercall_contents hypercall_msr; | 155 | union hv_x64_msr_hypercall_contents hypercall_msr; |
156 | void *virtaddr = NULL; | 156 | void *virtaddr = NULL; |
157 | 157 | ||
158 | memset(hv_context.synic_event_page, 0, sizeof(void *) * MAX_NUM_CPUS); | 158 | memset(hv_context.synic_event_page, 0, sizeof(void *) * NR_CPUS); |
159 | memset(hv_context.synic_message_page, 0, | 159 | memset(hv_context.synic_message_page, 0, |
160 | sizeof(void *) * MAX_NUM_CPUS); | 160 | sizeof(void *) * NR_CPUS); |
161 | 161 | ||
162 | if (!query_hypervisor_presence()) | 162 | if (!query_hypervisor_presence()) |
163 | goto cleanup; | 163 | goto cleanup; |
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 6d7d286d5440..699f0d8e59ed 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h | |||
@@ -457,7 +457,6 @@ static const uuid_le VMBUS_SERVICE_ID = { | |||
457 | }, | 457 | }, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | #define MAX_NUM_CPUS 32 | ||
461 | 460 | ||
462 | 461 | ||
463 | struct hv_input_signal_event_buffer { | 462 | struct hv_input_signal_event_buffer { |
@@ -483,8 +482,8 @@ struct hv_context { | |||
483 | /* 8-bytes aligned of the buffer above */ | 482 | /* 8-bytes aligned of the buffer above */ |
484 | struct hv_input_signal_event *signal_event_param; | 483 | struct hv_input_signal_event *signal_event_param; |
485 | 484 | ||
486 | void *synic_message_page[MAX_NUM_CPUS]; | 485 | void *synic_message_page[NR_CPUS]; |
487 | void *synic_event_page[MAX_NUM_CPUS]; | 486 | void *synic_event_page[NR_CPUS]; |
488 | }; | 487 | }; |
489 | 488 | ||
490 | extern struct hv_context hv_context; | 489 | extern struct hv_context hv_context; |