Skip to content

Commit 83527ef

Browse files
fishavoreKAGA-KOKO
authored andcommitted
drivers: hv: vmbus: Replace page definition with Hyper-V specific one
Replace PAGE_SIZE with HV_HYP_PAGE_SIZE because the guest page size may not be 4096 on all architectures and Hyper-V always runs with a page size of 4096. Signed-off-by: Maya Nakamura <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Acked-by: Sasha Levin <[email protected]> Link: https://lkml.kernel.org/r/0d9e80ecabcc950dc279fdd2e39bea4060123ba4.1562916939.git.m.maya.nakamura@gmail.com
1 parent 8c3e44b commit 83527ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/hv/hyperv_vmbus.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
192192
u64 *requestid, bool raw);
193193

194194
/*
195-
* Maximum channels is determined by the size of the interrupt page
196-
* which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt
197-
* and the other is receive endpoint interrupt
195+
* The Maximum number of channels (16348) is determined by the size of the
196+
* interrupt page, which is HV_HYP_PAGE_SIZE. 1/2 of HV_HYP_PAGE_SIZE is to
197+
* send endpoint interrupts, and the other is to receive endpoint interrupts.
198198
*/
199-
#define MAX_NUM_CHANNELS ((PAGE_SIZE >> 1) << 3) /* 16348 channels */
199+
#define MAX_NUM_CHANNELS ((HV_HYP_PAGE_SIZE >> 1) << 3)
200200

201201
/* The value here must be in multiple of 32 */
202202
/* TODO: Need to make this configurable */

0 commit comments

Comments
 (0)