Module: xenomai-3
Branch: next
Commit: 8469b45a6d6137cd223f0a833b42430a4e3a58f8
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=8469b45a6d6137cd223f0a833b42430a4e3a58f8

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun May 13 19:00:36 2018 +0200

drivers/ipc: align pool memory on native page size

---

 kernel/drivers/ipc/iddp.c |    2 +-
 kernel/drivers/ipc/xddp.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/drivers/ipc/iddp.c b/kernel/drivers/ipc/iddp.c
index 854a4b6..2a80eba 100644
--- a/kernel/drivers/ipc/iddp.c
+++ b/kernel/drivers/ipc/iddp.c
@@ -569,7 +569,7 @@ static int __iddp_bind_socket(struct rtdm_fd *fd,
         */
        poolsz = sk->poolsz;
        if (poolsz > 0) {
-               poolsz = xnheap_rounded_size(poolsz);
+               poolsz = PAGE_ALIGN(poolsz);
                poolmem = xnheap_vmalloc(poolsz);
                if (poolmem == NULL) {
                        ret = -ENOMEM;
diff --git a/kernel/drivers/ipc/xddp.c b/kernel/drivers/ipc/xddp.c
index 95bee57..57275d0 100644
--- a/kernel/drivers/ipc/xddp.c
+++ b/kernel/drivers/ipc/xddp.c
@@ -691,8 +691,8 @@ static int __xddp_bind_socket(struct rtipc_private *priv,
 
        poolsz = sk->poolsz;
        if (poolsz > 0) {
-               poolsz = xnheap_rounded_size(poolsz);
-               poolsz += xnheap_rounded_size(sk->reqbufsz);
+               poolsz = PAGE_ALIGN(poolsz);
+               poolsz += PAGE_ALIGN(sk->reqbufsz);
                poolmem = xnheap_vmalloc(poolsz);
                if (poolmem == NULL) {
                        ret = -ENOMEM;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to