Boqun Feng d02a26991e HID: hyperv: Use VMBUS_RING_SIZE() for ringbuffer sizes
For a Hyper-V vmbus, the size of the ringbuffer has two requirements:

1) it has to take one PAGE_SIZE for the header

2) it has to be PAGE_SIZE aligned so that double-mapping can work

VMBUS_RING_SIZE() could calculate a correct ringbuffer size which
fulfills both requirements, therefore use it to make sure vmbus work
when PAGE_SIZE != HV_HYP_PAGE_SIZE (4K).

Note that since the argument for VMBUS_RING_SIZE() is the size of
payload (data part), so it will be minus 4k (the size of header when
PAGE_SIZE = 4k) than the original value to keep the ringbuffer total
size unchanged when PAGE_SIZE = 4k.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200916034817.30282-10-boqun.feng@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
2020-09-28 08:57:28 +00:00
..
2020-08-15 08:18:22 -07:00
2020-08-06 18:09:34 -07:00
2020-08-02 18:26:51 +03:00
2020-08-15 20:36:42 -07:00
2020-08-06 10:54:07 -07:00
2020-08-11 11:58:31 +10:00
2020-08-15 08:18:22 -07:00
2020-08-15 08:09:38 -07:00
2020-08-07 10:33:50 -07:00
2020-08-11 14:34:17 -07:00
2020-08-11 10:59:19 -07:00
2020-07-27 11:49:37 +02:00
2020-08-14 16:00:09 -07:00
2020-08-14 16:00:09 -07:00
2020-08-15 08:18:22 -07:00
2020-08-05 19:24:27 -07:00
2020-08-07 10:33:50 -07:00
2020-08-15 20:36:42 -07:00
2020-08-11 14:13:24 -07:00
2020-08-11 14:13:24 -07:00
2020-08-05 13:23:24 -07:00
2020-08-15 08:09:38 -07:00
2020-08-14 19:56:56 -07:00
2020-08-05 11:12:34 -07:00
2020-08-06 10:54:07 -07:00
2020-08-07 18:48:15 -07:00
2020-08-12 12:13:44 -07:00
2020-08-14 16:00:09 -07:00
2020-08-11 11:17:45 -07:00
2020-08-12 17:17:00 -07:00
2020-08-14 16:01:59 -07:00
2020-08-06 14:27:31 -07:00
2020-08-07 18:48:15 -07:00
2020-08-14 16:01:59 -07:00
2020-08-15 08:09:38 -07:00
2020-08-06 14:56:11 -07:00
2020-08-07 13:00:53 -07:00
2020-08-11 14:34:17 -07:00
2020-08-12 12:09:36 -07:00
2020-08-11 14:34:17 -07:00
2020-08-14 16:00:09 -07:00
2020-08-12 12:13:44 -07:00
2020-08-14 13:34:37 -07:00