Module: xenomai-head
Branch: master
Commit: 876840b8925bfff75c6703842d9b9d8cd6928fb3
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=876840b8925bfff75c6703842d9b9d8cd6928fb3

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Aug 23 20:12:55 2009 +0200

Map all heaps with XNARCH_SHARED_HEAP_FLAGS to avoid cache aliasing issues on 
ARM

---

 ksrc/skins/native/queue.c |    3 ++-
 ksrc/skins/psos+/rn.c     |    3 ++-
 ksrc/skins/rtai/shm.c     |    3 ++-
 ksrc/skins/vrtx/heap.c    |    3 ++-
 ksrc/skins/vrtx/syscall.c |    2 +-
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ksrc/skins/native/queue.c b/ksrc/skins/native/queue.c
index 8b7c43e..60d5a49 100644
--- a/ksrc/skins/native/queue.c
+++ b/ksrc/skins/native/queue.c
@@ -228,7 +228,8 @@ int rt_queue_create(RT_QUEUE *q,
 
                err = xnheap_init_mapped(&q->bufpool,
                                         poolsize,
-                                        (mode & Q_DMA) ? GFP_DMA : 0);
+                                        ((mode & Q_DMA) ? GFP_DMA 
+                                         : XNARCH_SHARED_HEAP_FLAGS));
                if (err)
                        return err;
 
diff --git a/ksrc/skins/psos+/rn.c b/ksrc/skins/psos+/rn.c
index e6ac21f..98f4500 100644
--- a/ksrc/skins/psos+/rn.c
+++ b/ksrc/skins/psos+/rn.c
@@ -190,7 +190,8 @@ u_long rn_create(const char *name,
                u_long err;
 
                rnsize = xnheap_rounded_size(rnsize, PAGE_SIZE),
-               err = xnheap_init_mapped(&rn->heapbase, rnsize, 0);
+               err = xnheap_init_mapped(&rn->heapbase, rnsize, 
+                                        XNARCH_SHARED_HEAP_FLAGS);
 
                if (err)
                        return err;
diff --git a/ksrc/skins/rtai/shm.c b/ksrc/skins/rtai/shm.c
index 76dfdb5..81de434 100644
--- a/ksrc/skins/rtai/shm.c
+++ b/ksrc/skins/rtai/shm.c
@@ -150,7 +150,8 @@ static xnshm_a_t *create_new_heap(unsigned long name, int 
heapsize, int suprt)
 
        err = xnheap_init_mapped(p->heap,
                                 heapsize,
-                                suprt == USE_GFP_KERNEL ? GFP_KERNEL : 0);
+                                (suprt == USE_GFP_KERNEL ? GFP_KERNEL : 0)
+                                | XNARCH_SHARED_HEAP_FLAGS);
 #else /* !CONFIG_XENO_OPT_PERVASIVE */
        {
                void *heapmem;
diff --git a/ksrc/skins/vrtx/heap.c b/ksrc/skins/vrtx/heap.c
index c94b6b3..de60792 100644
--- a/ksrc/skins/vrtx/heap.c
+++ b/ksrc/skins/vrtx/heap.c
@@ -164,7 +164,8 @@ int sc_hcreate(char *heapaddr, u_long heapsize, unsigned 
log2psize, int *errp)
        if (heapaddr == NULL) {
 #ifdef CONFIG_XENO_OPT_PERVASIVE
                heapsize = xnheap_rounded_size(heapsize, PAGE_SIZE);
-               err = xnheap_init_mapped(&heap->sysheap, heapsize, 0);
+               err = xnheap_init_mapped(&heap->sysheap, heapsize, 
+                                        XNARCH_SHARED_HEAP_FLAGS);
 
                if (err) {
                        *errp = ER_MEM;
diff --git a/ksrc/skins/vrtx/syscall.c b/ksrc/skins/vrtx/syscall.c
index 5de625b..1623066 100644
--- a/ksrc/skins/vrtx/syscall.c
+++ b/ksrc/skins/vrtx/syscall.c
@@ -1052,7 +1052,7 @@ static int __sc_pcreate(struct pt_regs *regs)
        /* Block size. */
        bsize = __xn_reg_arg3(regs);
 
-       err = xnheap_init_mapped(ptheap, ptsize, 0);
+       err = xnheap_init_mapped(ptheap, ptsize, XNARCH_SHARED_HEAP_FLAGS);
 
        if (err)
                goto free_heap;


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

Reply via email to