Module: xenomai-3 Branch: wip/prioceil Commit: eb1be425b3322abec5c1ad780d79ba83232900e7 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=eb1be425b3322abec5c1ad780d79ba83232900e7
Author: Philippe Gerum <[email protected]> Date: Sun Feb 28 08:20:45 2016 +0100 drivers/ipc: iddp: get buffer memory from vmalloc() --- kernel/drivers/ipc/iddp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/ipc/iddp.c b/kernel/drivers/ipc/iddp.c index ed09f76..59508f6 100644 --- a/kernel/drivers/ipc/iddp.c +++ b/kernel/drivers/ipc/iddp.c @@ -20,7 +20,6 @@ #include <linux/module.h> #include <linux/list.h> #include <linux/kernel.h> -#include <linux/vmalloc.h> #include <linux/slab.h> #include <linux/poll.h> #include <cobalt/kernel/heap.h> @@ -209,7 +208,7 @@ static void iddp_close(struct rtdm_fd *fd) poolmem = xnheap_get_membase(&sk->privpool); poolsz = xnheap_get_size(&sk->privpool); xnheap_destroy(&sk->privpool); - free_pages_exact(poolmem, poolsz); + xnheap_vfree(poolmem); return; } @@ -567,7 +566,7 @@ static int __iddp_bind_socket(struct rtdm_fd *fd, poolsz = sk->poolsz; if (poolsz > 0) { poolsz = xnheap_rounded_size(poolsz); - poolmem = alloc_pages_exact(poolsz, GFP_KERNEL); + poolmem = xnheap_vmalloc(poolsz); if (poolmem == NULL) { ret = -ENOMEM; goto fail; @@ -575,7 +574,7 @@ static int __iddp_bind_socket(struct rtdm_fd *fd, ret = xnheap_init(&sk->privpool, poolmem, poolsz); if (ret) { - free_pages_exact(poolmem, poolsz); + xnheap_vfree(poolmem); goto fail; } xnheap_set_name(&sk->privpool, "iddp-pool@%d", port); @@ -594,7 +593,7 @@ static int __iddp_bind_socket(struct rtdm_fd *fd, if (ret) { if (poolsz > 0) { xnheap_destroy(&sk->privpool); - free_pages_exact(poolmem, poolsz); + xnheap_vfree(poolmem); } goto fail; } _______________________________________________ Xenomai-git mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai-git
