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@xxxxxxxxx> > To: "Ralf Baechle" <ralf@xxxxxxxxxxxxxx> > Subject: Re: flush_anon_page for MIPS > Cc: "Miklos Szeredi" <miklos@xxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxx, > Ravi.Pratap@xxxxxxxxxxxxxxxxx > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 3/23/07, Ralf Baechle <ralf@xxxxxxxxxxxxxx> 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