flush_dcache_page from user space.
I mmap'ed mmory allocated by kmalloc , to userspace. I can modify data ( in that memory region ) from kernel space or userspace and call flush_dcache_page to get it refected in both kernel and userspace. 1) if i modify a value from userspace, is there any other way to flush dcache page from userspace. What i am looking is to avoid context switch ( to get into kernel only to call flush_dcache_page ) ? Thanks, Ratheesh
Hi Ratheesh, On Tue, Apr 1, 2014 at 9:28 AM, ratheesh kannoth <ratheesh.ksz@gmail.com> wrote:
I mmap'ed mmory allocated by kmalloc , to userspace. I can modify data ( in that memory region ) from kernel space or userspace and call flush_dcache_page to get it refected in both kernel and userspace.
This requirement depends on what cache your hardware has. Can you give more details about your processor? If you have VIPT non aliasing cache or PIPT cache, you don't need to do anything.
1) if i modify a value from userspace, is there any other way to flush dcache page from userspace. What i am looking is to avoid context switch ( to get into kernel only to call flush_dcache_page ) ?
Use __clear_cache. But this will result in a system call and do a v7_coherent_user_range in case of armv architectures. Thanks, Arun
Thanks, Ratheesh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, Apr 1, 2014 at 11:50 AM, Arun KS <getarunks@gmail.com> wrote:
This requirement depends on what cache your hardware has. Can you give more details about your processor?
If you have VIPT non aliasing cache or PIPT cache, you don't need to do anything.
How can i find which cache hw on my machine ? Thanks, Ratheesh
Hi Ratheesh, On Tue, Apr 1, 2014 at 11:54 AM, ratheesh kannoth <ratheesh.ksz@gmail.com> wrote:
On Tue, Apr 1, 2014 at 11:50 AM, Arun KS <getarunks@gmail.com> wrote:
This requirement depends on what cache your hardware has. Can you give more details about your processor?
If you have VIPT non aliasing cache or PIPT cache, you don't need to do anything.
How can i find which cache hw on my machine ? Usually prints while booting.
Thanks, Arun
Thanks, Ratheesh
participants (2)
-
Arun KS -
ratheesh kannoth