On Tuesday, August 24, 2010 19:09:43 Gavin Lambert wrote: > Quoth David Howells: > > Stub out vm_get_page_prot() if there's no MMU. > > [...] > > > in the fbmem video driver, but the function doesn't exist on NOMMU, > > resulting in an undefined symbol at link time. > > [...] > > > +#ifdef CONFIG_MMU > > > > pgprot_t vm_get_page_prot(unsigned long vm_flags); > > > > +#else > > +static inline pgprot_t vm_get_page_prot(unsigned long vm_flags) > > +{ > > + return __pgprot(0); > > +} > > +#endif > > Wouldn't it be better to define this in the .c for !CONFIG_MMU, rather than > stub it out in the headers? After all, it's possible that some arches > (eg. Blackfin, since it has an MPU) might want to actually implement it.
even in the MPU case, i think we'd still want a header change. #if defined(CONFIG_MMU) || defined(CONFIG_MPU) pgprot_t vm_get_page_prot(unsigned long vm_flags); #else /* stub */ #endif none of the MPU code today uses this vm field, so there'd be a bit more work before we could handle it and worry about the function. which is why i think we should go with this change today, and worry about the rest tomorrow. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev