From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Porting xenomai 2.6.3 and ipipe to 3.12 kernel
Date: Mon, 31 Mar 2014 21:44:44 +0200 [thread overview]
Message-ID: <5339C5AC.4040409@xenomai.org> (raw)
In-Reply-To: <20140331193742.GS17765@csclub.uwaterloo.ca>
On 03/31/2014 09:37 PM, Lennart Sorensen wrote:
> On Mon, Mar 31, 2014 at 03:18:49PM -0400, Lennart Sorensen wrote:
>> On Mon, Mar 31, 2014 at 09:17:16PM +0200, Gilles Chanteperdrix wrote:
>>> Are you sure you are loking at the right tree? I am talking about the
>>> raw/for-ipipe-3.12.0 tree in ipipe-gch.git, not the raw/ipipe-3.12.0
>>> tree in ipipe.git
>>
>> Oh, then no, wrong tree.
>>
>> Let me check the other one.
>
> Ok that looks better.
>
> Couple of things:
>
> I think this is wrong:
>
> @@ -268,13 +298,22 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr
> * Harvard caches are synchronised for the user space address range.
> * This is used for the ARM private sys_cacheflush system call.
> */
> -#define flush_cache_user_range(s,e) __cpuc_coherent_user_range(s,e)
> +#define flush_cache_user_range(s, e) \
> + ({ \
> + struct mm_struct *_mm = current->mm; \
> + unsigned long _s, _e; \
> + _s = fcse_va_to_mva(_mm, s) & PAGE_MASK; \
> + _e = PAGE_ALIGN(fcse_va_to_mva(_mm, e)); \
> + __cpuc_coherent_user_range(_s, _e); \
> + })
>
> /*
> * Perform necessary cache operations to ensure that data previously
>
> The kernel specificly did NOT want the PAGE_MASK and PAGE_ALIGN and got
> rid of it. At last that's what the commit that changed it said. So I
> think the ipipe patch should follow that change too. ie:
>
> @@ -268,13 +298,22 @@ extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr
> * Harvard caches are synchronised for the user space address range.
> * This is used for the ARM private sys_cacheflush system call.
> */
> -#define flush_cache_user_range(s,e) __cpuc_coherent_user_range(s,e)
> +#define flush_cache_user_range(s, e) \
> + ({ \
> + struct mm_struct *_mm = current->mm; \
> + unsigned long _s, _e; \
> + _s = fcse_va_to_mva(_mm, s); \
> + _e = fcse_va_to_mva(_mm, e); \
> + __cpuc_coherent_user_range(_s, _e); \
> + })
>
> /*
> * Perform necessary cache operations to ensure that data previously
Ok, thanks, will fix in 3.14 patch.
>
> Also my version of arch/arm/include/asm/barrier.h turned out a bit
> different (I was trying to avoid changing the kernel code as much as
> possible). Diff versus yours is:
I do not really see differences...
> +#define dmb(option) __asm__ __volatile__("" #option : : : "memory")
...except this which is wrong (ish, shst are probably not valid
instructions, and only make sense as suffixes after dmb). It should not
even compile.
--
Gilles.
next prev parent reply other threads:[~2014-03-31 19:44 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 17:45 [Xenomai] Porting xenomai 2.6.3 and ipipe to 3.12 kernel Lennart Sorensen
2014-03-31 18:12 ` Gilles Chanteperdrix
2014-03-31 18:24 ` Lennart Sorensen
2014-03-31 19:15 ` Lennart Sorensen
2014-03-31 19:17 ` Gilles Chanteperdrix
2014-03-31 19:18 ` Lennart Sorensen
2014-03-31 19:37 ` Lennart Sorensen
2014-03-31 19:44 ` Gilles Chanteperdrix [this message]
2014-03-31 20:42 ` Lennart Sorensen
2014-03-31 20:53 ` Lennart Sorensen
2014-03-31 20:57 ` Lennart Sorensen
2014-03-31 21:06 ` Gilles Chanteperdrix
2014-03-31 21:25 ` Lennart Sorensen
2014-03-31 21:49 ` Gilles Chanteperdrix
2014-03-31 21:53 ` Lennart Sorensen
2014-03-31 21:59 ` Lennart Sorensen
2014-03-31 22:04 ` Lennart Sorensen
2014-03-31 22:11 ` Gilles Chanteperdrix
2014-03-31 22:27 ` Gilles Chanteperdrix
2014-04-01 1:32 ` Lennart Sorensen
2014-04-01 10:52 ` Gilles Chanteperdrix
2014-04-01 13:12 ` Lennart Sorensen
2014-04-01 19:35 ` Gilles Chanteperdrix
2014-04-01 19:40 ` Lennart Sorensen
2014-04-01 20:52 ` Gilles Chanteperdrix
2014-04-01 21:45 ` Lennart Sorensen
2014-04-01 22:01 ` Gilles Chanteperdrix
2014-04-02 2:35 ` Lennart Sorensen
2014-04-02 7:11 ` Gilles Chanteperdrix
2014-04-02 13:24 ` Lennart Sorensen
2014-04-02 13:26 ` Gilles Chanteperdrix
2014-04-02 13:40 ` Lennart Sorensen
2014-04-02 13:41 ` Lennart Sorensen
2014-04-02 13:46 ` Lennart Sorensen
2014-04-02 13:56 ` Gilles Chanteperdrix
2014-04-02 14:38 ` Lennart Sorensen
2014-04-02 14:41 ` Gilles Chanteperdrix
2014-04-03 13:46 ` Lennart Sorensen
2014-04-03 13:56 ` Gilles Chanteperdrix
2014-04-03 14:16 ` Lennart Sorensen
2014-04-14 21:06 ` Lennart Sorensen
2014-04-15 11:39 ` Gilles Chanteperdrix
2014-06-13 18:15 ` Lennart Sorensen
2014-03-31 19:19 ` Gilles Chanteperdrix
[not found] <mailman.33.1396388743.2839.xenomai@xenomai.org>
2014-04-02 9:21 ` Andreas Glatz
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=5339C5AC.4040409@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=lsorense@csclub.uwaterloo.ca \
--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.