[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081019110022.6780923f@infradead.org>
Date: Sun, 19 Oct 2008 11:00:22 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Keith Packard <keithp@...thp.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
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: io resources and cached mappings (was: [git pull] drm patches
for 2.6.27-rc1)
On Sun, 19 Oct 2008 19:53:20 +0200
Ingo Molnar <mingo@...e.hu> wrote:
>
> struct resource {
> resource_size_t start;
> resource_size_t end;
> const char *name;
> unsigned long flags;
> struct resource *parent, *sibling, *child;
> + void *mapping;
> };
>
> The APIs would be:
>
> int io_resource_init_mapping(struct resource *res);
> void io_resource_free_mapping(struct resource *res);
> void * io_resource_map(struct resource *res, pfn_t pfn, unsigned
> long offset); void io_resource_unmap(struct resource *res, void
> *kaddr);
>
> Note how simple and consistent it all gets: IO resources already know
> their physical location and their size limits. Being able to cache an
> ioremap in a mapping [and being able to use atomic kmaps on 32-bit]
> is a relatively simple and natural extension to the concept.
and making a simple wrapper around this that turns "struct pci_dev,
barnr" into a resource would make sense too, but yes.
We need one more
io_resource_force_cachability(struct resource, cachetype)
or maybe only
io_resource_force_writecombine(struct resource)
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists