![]() | |||||||||||||
Messages in this thread |
On Tuesday, February 28, 2006 9:44 am, Jesse Barnes wrote: > Something like this would be really handy. Check out fbmem.c:fb_mmap > for a bad example of what can happen w/o it. > > In fact, I think it might make sense to export WC functionality via an > mmap flag (on an advisory basis since the platform may not support it > or there may be aliasing issues that prevent it); having an arch > independent routine to request it would make that addition easy to do > in generic code. (In particular I wanted this for the sysfs PCI > interface. Userspace apps can map PCI resources there and it would be > nice if they could map them with WC semantics if requested.) Oh, forgot to mention fallback semantics. Instead of almost every driver doing: if (!(iocookie = ioremap_writecombine(addr, size))) iocookie = ioremap(addr, size); /* fallback to uncached */ maybe it would be best to have something like iocookie = ioremap_wc_or_uc(addr, size); that tries write combine first but silently falls back to UC if the former is impossible (or a new ioremap with flags or priority args or whatever). OTOH some drivers may want to be notified if the WC mapping fails? Just a thought... Jesse - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2006-02-28 18:53 [from the cache] ©2003-2008 | |||||||||||||