bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] i386: add io_map_cached


From: Justus Winter
Subject: Re: [PATCH 2/3] i386: add io_map_cached
Date: Tue, 01 Jul 2014 11:22:38 +0200
User-agent: alot/0.3.4

Quoting Samuel Thibault (2014-05-23 01:28:30)
> Justus Winter, le Thu 15 May 2014 12:32:41 +0200, a écrit :
> > Quoting Samuel Thibault (2014-05-15 02:13:13)
> > > Justus Winter, le Fri 02 May 2014 21:33:01 +0200, a écrit :
> > > > io_map_cached is like io_map, but reuses the old mapping if it is
> > > > applicable.
> > > 
> > > But AIUI, if it is not applicable, it does not unmap the previous
> > > mapping, so we lose virtual memory.
> > > 
> > > A really transparent io_map_cached seems not really feasible, since you
> > > never know what the caller will do with the pointer.
> > 
> > Right, I did this b/c I didn't know how to do this properly.
> 
> > accessing this physical address with phystokv() fails b/c it is
> > outside the mapped range
> 
> Ok. I'd say then to just use io_map once for accessing that (AIUI one
> knows the needed size), and then free the mapped memory region after
> that with kmem_free.

I don't believe one knows the size in advance.  Every acpi table has a
header with explicit size information.  From a quick search through
this internet thing it appears that Linux at some point just mapped a
page or so, but that turned out to be problematic.

Justus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]