From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [2/9] Define XNARCH_SHARED_HEAP_FLAGS
Date: Thu, 24 Apr 2008 08:21:35 +0200 [thread overview]
Message-ID: <18448.9967.355128.570111@domain.hid> (raw)
In-Reply-To: <18448.9901.799115.445182@domain.hid>
This patch defines the macro XNARCH_SHARED_HEAP_FLAGS to be set to
XNHEAP_GFP_NONCACHED on ARM with VIVT cache. I assumed that ARM with VIPT cache
would not need non-cached mappings when sharing memory between kernel and
user-space. Please correct me if I am wrong.
---
asm-arm/hal.h | 3 ++-
asm-generic/system.h | 6 ++++++
2 files changed, 8 insertions(+), 1 deletion(-)
Index: include/asm-generic/system.h
===================================================================
--- include/asm-generic/system.h (revision 3718)
+++ include/asm-generic/system.h (working copy)
@@ -238,6 +238,12 @@ static inline int xnlock_dbg_release(xnl
#define xnarch_logerr(fmt, args...) printk(KERN_ERR XNARCH_PROMPT fmt, ##args)
#define xnarch_printf(fmt, args...) printk(KERN_INFO XNARCH_PROMPT fmt, ##args)
+#ifndef RTHAL_SHARED_HEAP_FLAGS
+#define XNARCH_SHARED_HEAP_FLAGS 0
+#else /* !RTHAL_SHARED_HEAP_FLAGS */
+#define XNARCH_SHARED_HEAP_FLAGS RTHAL_SHARED_HEAP_FLAGS
+#endif /* !RTHAL_SHARED_HEAP_FLAGS */
+
typedef cpumask_t xnarch_cpumask_t;
#ifdef CONFIG_SMP
Index: include/asm-arm/hal.h
===================================================================
--- include/asm-arm/hal.h (revision 3718)
+++ include/asm-arm/hal.h (working copy)
@@ -108,10 +108,11 @@ static inline __attribute_const__ unsign
#include <asm/processor.h>
#include <asm/ipipe.h>
#include <asm/mach/irq.h>
+#include <asm/cacheflush.h>
#define RTHAL_TIMER_IRQ __ipipe_mach_timerint
-#define RTHAL_SHARED_HEAP_FLAGS XNHEAP_GFP_NONCACHED
+#define RTHAL_SHARED_HEAP_FLAGS (cache_is_vivt() ? XNHEAP_GFP_NONCACHED : 0)
#define rthal_grab_control() do { } while(0)
#define rthal_release_control() do { } while(0)
--
Gilles.
next prev parent reply other threads:[~2008-04-24 6:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 6:16 [Xenomai-core] [0/9] Posix skin user-space mutexes Gilles Chanteperdrix
2008-04-24 6:20 ` [Xenomai-core] [1/9] Support for non cached memory mappings Gilles Chanteperdrix
2008-04-24 6:21 ` Gilles Chanteperdrix [this message]
2008-04-24 6:22 ` [Xenomai-core] [3/9] Define more atomic operations in user-space Gilles Chanteperdrix
2008-04-24 6:24 ` [Xenomai-core] [4/9] Define ARM " Gilles Chanteperdrix
2008-04-24 6:25 ` [Xenomai-core] [5/9] Define new syscalls for the posix skin Gilles Chanteperdrix
2008-04-24 6:27 ` [Xenomai-core] [6/9] Rework posix skin shared heaps support, add per-process shared heap Gilles Chanteperdrix
2008-04-24 6:30 ` [Xenomai-core] [7/9] Poor man's object control block read-write lock Gilles Chanteperdrix
2008-04-24 6:32 ` [Xenomai-core] [8/9] Re-implementation of mutexes, kernel-space support Gilles Chanteperdrix
2008-04-24 6:33 ` [Xenomai-core] [9/9] Re-implementation of mutex, user-space support Gilles Chanteperdrix
2008-04-25 8:03 ` [Xenomai-core] [6/9] Rework posix skin shared heaps support, add per-process shared heap Philippe Gerum
2008-04-25 7:59 ` [Xenomai-core] [5/9] Define new syscalls for the posix skin Philippe Gerum
2008-04-25 7:51 ` [Xenomai-core] [4/9] Define ARM atomic operations in user-space Philippe Gerum
2008-04-25 7:48 ` [Xenomai-core] [3/9] Define more " Philippe Gerum
2008-04-25 13:26 ` Gilles Chanteperdrix
2008-04-25 13:42 ` Philippe Gerum
2008-04-25 13:50 ` Gilles Chanteperdrix
2008-04-25 14:01 ` Philippe Gerum
2008-04-25 14:13 ` Gilles Chanteperdrix
2008-04-25 14:20 ` Philippe Gerum
2008-04-25 22:09 ` Gilles Chanteperdrix
2008-04-26 7:02 ` Philippe Gerum
2008-04-24 7:09 ` [Xenomai-core] [0/9] Posix skin user-space mutexes Jan Kiszka
2008-04-24 7:37 ` Gilles Chanteperdrix
2008-04-24 8:23 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18448.9967.355128.570111@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.