Commit 9da197f1 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Greg Kroah-Hartman

hv_uio_generic: map ringbuffer phys addr

The ring buffer is contiguous IOVA and is mapped via phys addr
for sysfs file. Use same method for the UIO mapping.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bfddabfa
...@@ -224,10 +224,10 @@ hv_uio_probe(struct hv_device *dev, ...@@ -224,10 +224,10 @@ hv_uio_probe(struct hv_device *dev,
/* mem resources */ /* mem resources */
pdata->info.mem[TXRX_RING_MAP].name = "txrx_rings"; pdata->info.mem[TXRX_RING_MAP].name = "txrx_rings";
pdata->info.mem[TXRX_RING_MAP].addr pdata->info.mem[TXRX_RING_MAP].addr
= (uintptr_t)page_address(dev->channel->ringbuffer_page); = (uintptr_t)virt_to_phys(page_address(dev->channel->ringbuffer_page));
pdata->info.mem[TXRX_RING_MAP].size pdata->info.mem[TXRX_RING_MAP].size
= dev->channel->ringbuffer_pagecount << PAGE_SHIFT; = dev->channel->ringbuffer_pagecount << PAGE_SHIFT;
pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_LOGICAL; pdata->info.mem[TXRX_RING_MAP].memtype = UIO_MEM_IOVA;
pdata->info.mem[INT_PAGE_MAP].name = "int_page"; pdata->info.mem[INT_PAGE_MAP].name = "int_page";
pdata->info.mem[INT_PAGE_MAP].addr pdata->info.mem[INT_PAGE_MAP].addr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment