linux-mips
[Top] [All Lists]

Re: flush_anon_page for MIPS

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: flush_anon_page for MIPS
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 23 Mar 2007 15:36:21 +0000
Cc: Miklos Szeredi <miklos@szeredi.hu>, linux-mips@linux-mips.org, Ravi.Pratap@hillcrestlabs.com
In-reply-to: <cda58cb80703230801v5ce4baacr9b40119ff3342ac8@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <E1HUVlw-00034H-00@dorka.pomaz.szeredi.hu> <20070323141939.GB17311@linux-mips.org> <cda58cb80703230801v5ce4baacr9b40119ff3342ac8@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.2i
On Fri, Mar 23, 2007 at 04:01:04PM +0100, Franck Bui-Huu wrote:
> Date: Fri, 23 Mar 2007 16:01:04 +0100
> From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
> To:   "Ralf Baechle" <ralf@linux-mips.org>
> Subject: Re: flush_anon_page for MIPS
> Cc:   "Miklos Szeredi" <miklos@szeredi.hu>, linux-mips@linux-mips.org,
>       Ravi.Pratap@hillcrestlabs.com
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 3/23/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> >+#define ARCH_HAS_FLUSH_ANON_PAGE
> >+static inline void flush_anon_page(struct vm_area_struct *vma,
> >+       struct page *page, unsigned long vmaddr)
> >+{
> >+       extern void __flush_anon_page(struct vm_area_struct *vma,
> >+                                     struct page *, unsigned long);
> >+       if (PageAnon(page))
> >+               __flush_anon_page(vma, page, vmaddr);
> >+}
> >+
> 
> Shouldn't you add a test against cpu_has_dc_aliases here and thus
> avoid an useless call to __flush_anon_page() ?

Yes, that's one of the things left to do.  On alias-free processors where
cpu_has_dc_aliases was defined to 0 in cpu-feature-overrides.h this will
result in the entire function call to be eleminated by the compiler.  Of
course that will still leave the unused body of __flush_anon_page around,
how sad ;)

  Ralf

<Prev in Thread] Current Thread [Next in Thread>