Module: xenomai-3 Branch: wip/dovetail Commit: 5ddefc0c9641b237bab674cf2f8a3c61bb21627f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=5ddefc0c9641b237bab674cf2f8a3c61bb21627f
Author: Philippe Gerum <[email protected]> Date: Sun Feb 28 08:19:47 2016 +0100 drivers/ipc: bufp: get buffer memory from vmalloc() --- kernel/drivers/ipc/bufp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/ipc/bufp.c b/kernel/drivers/ipc/bufp.c index ecce4f9..6fc51d4 100644 --- a/kernel/drivers/ipc/bufp.c +++ b/kernel/drivers/ipc/bufp.c @@ -20,12 +20,11 @@ #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> #include <cobalt/kernel/map.h> #include <cobalt/kernel/bufd.h> -#include <linux/poll.h> #include <rtdm/ipc.h> #include "internal.h" @@ -149,7 +148,7 @@ static void bufp_close(struct rtdm_fd *fd) xnregistry_remove(sk->handle); if (sk->bufmem) - free_pages_exact(sk->bufmem, sk->bufsz); + xnheap_vfree(sk->bufmem); kfree(sk); } @@ -704,7 +703,7 @@ static int __bufp_bind_socket(struct rtipc_private *priv, if (sk->bufsz == 0) return -ENOBUFS; - sk->bufmem = alloc_pages_exact(sk->bufsz, GFP_KERNEL); + sk->bufmem = xnheap_vmalloc(sk->bufsz); if (sk->bufmem == NULL) { ret = -ENOMEM; goto fail; @@ -719,7 +718,7 @@ static int __bufp_bind_socket(struct rtipc_private *priv, ret = xnregistry_enter(sk->label, sk, &sk->handle, &__bufp_pnode.node); if (ret) { - free_pages_exact(sk->bufmem, sk->bufsz); + xnheap_vfree(sk->bufmem); goto fail; } } _______________________________________________ Xenomai-git mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai-git
