diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-02-11 09:59:00 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-18 13:11:03 -0800 |
commit | df3493e0b3ba72f9b6192a91b24197cac41ce557 (patch) | |
tree | e283230b1baaa0f7cecccdfd595a92f313c3d7e8 /drivers/staging/hv/channel.c | |
parent | 7249e6a17bacbb18c4baf1b0d5ca70925409120d (diff) | |
download | op-kernel-dev-df3493e0b3ba72f9b6192a91b24197cac41ce557.zip op-kernel-dev-df3493e0b3ba72f9b6192a91b24197cac41ce557.tar.gz |
Staging: hv: Use native page allocation/free functions
In preperation for getting rid of the osd.[ch] files;
change all page allocation/free functions to use native interfaces.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/channel.c')
-rw-r--r-- | drivers/staging/hv/channel.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index ba9afda..6c292e6 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -180,8 +180,9 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, newchannel->channel_callback_context = context; /* Allocate the ring buffer */ - out = osd_page_alloc((send_ringbuffer_size + recv_ringbuffer_size) - >> PAGE_SHIFT); + out = (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, + get_order(send_ringbuffer_size + recv_ringbuffer_size)); + if (!out) return -ENOMEM; @@ -300,8 +301,8 @@ Cleanup: errorout: ringbuffer_cleanup(&newchannel->outbound); ringbuffer_cleanup(&newchannel->inbound); - osd_page_free(out, (send_ringbuffer_size + recv_ringbuffer_size) - >> PAGE_SHIFT); + free_pages((unsigned long)out, + get_order(send_ringbuffer_size + recv_ringbuffer_size)); kfree(openInfo); return err; } @@ -686,7 +687,8 @@ void vmbus_close(struct vmbus_channel *channel) ringbuffer_cleanup(&channel->outbound); ringbuffer_cleanup(&channel->inbound); - osd_page_free(channel->ringbuffer_pages, channel->ringbuffer_pagecount); + free_pages((unsigned long)channel->ringbuffer_pages, + get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); kfree(info); |