On Sun, 2008-10-19 at 00:32 +0200, Ingo Molnar wrote: > Mind sending patches for this? :-)
Here's what these functions would look like as wrappers on top of the existing APIs: /* x86_64 style */ static inline struct io_reserve * iomap_reserve(unsigned long base, unsigned long size) { return (struct io_reserve *) ioremap_wc(base, size); } static inline void * iomap_atomic(struct io_reserve *reserve, unsigned long offset) { return ((char *) reserve) + offset; } static inline void iounmap_atomic(void *vaddr) { } static inline void iomap_unreserve(struct io_reserve *reserve) { iounmap(reserve); } /* HIGHMEM style */ #if 0 static inline struct io_reserve * iomap_reserve(unsigned long base, unsigned long size) { return (struct io_reserve *) base; } static inline void * iomap_atomic(struct io_reserve *reserve, unsigned long offset) { offset += (unsigned long) reserve; return kmap_atomic(offset >> PAGE_SHIFT, KM_USER0); } static inline void iounmap_atomic(void *vaddr) { kunmap_atomic(vaddr, KM_USER0); } static inline void iomap_unreserve(struct io_reserve *reserve) { } #endif /* 32-bit non-HIGHMEM style */ #if 0 static inline struct io_reserve * iomap_reserve(unsigned long base, unsigned long size) { return NULL; } static inline void * iomap_atomic(struct io_reserve *reserve, unsigned long offset) { return NULL; } static inline void iounmap_atomic(void *vaddr) { } static inline void iomap_unreserve(struct io_reserve *reserve) { } #endif > > Ingo -- [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
-- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel