Re: flush_dcache_page from user space.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ratheesh,

On Tue, Apr 1, 2014 at 9:28 AM, ratheesh kannoth <ratheesh.ksz@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux