lkml.org 
[lkml]   [2014]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 16/28] nios2: System calls handling
From
On Fri, Apr 18, 2014 at 2:26 PM, Ley Foon Tan <lftan@altera.com> wrote:
> +/* sys_cacheflush -- flush the processor cache. */
> +asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len,
> + unsigned int op)
> +{
> + struct vm_area_struct *vma;
> +
> + if (len == 0)
> + return 0;
> +
> + /* Check for overflow */
> + if (addr + len < addr)
> + return -EFAULT;
> +
> + /*
> + * Verify that the specified address region actually belongs
> + * to this process.
> + */
> + vma = find_vma(current->mm, addr);
> + if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end)
> + return -EFAULT;
> +
> + /* Ignore the scope and cache arguments. */

This function doesn't have scope and cache arguments
(sys_cacheflush() on m68k does have them ;-)

On Sat, Apr 19, 2014 at 6:09 PM, Pavel Machek <pavel@denx.de> wrote:
> Also... explanation why you need this syscall while other
> architectures live happily without it would be nice.

12 our of 28 architectures provide such a syscall...

Is flushing the cache a privileged operation on nios2?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


\
 
 \ /
  Last update: 2014-04-19 22:41    [W:0.562 / U:24.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site