[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1224389697.4384.118.camel@koto.keithp.com>
Date: Sat, 18 Oct 2008 21:14:57 -0700
From: Keith Packard <keithp@...thp.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: keithp@...thp.com, Linus Torvalds <torvalds@...ux-foundation.org>,
Nick Piggin <nickpiggin@...oo.com.au>,
Dave Airlie <airlied@...ux.ie>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel@...ts.sf.net, Andrew Morton <akpm@...ux-foundation.org>,
Yinghai Lu <yinghai@...nel.org>
Subject: Re: [git pull] drm patches for 2.6.27-rc1
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
--
keith.packard@...el.com
Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists