lkml.org 
[lkml]   [2003]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Improved DRM support for cant_use_aperture platforms
From
Date
On Die, 2003-05-13 at 09:43, David Mosberger wrote: 
> >>>>> On 13 May 2003 02:34:41 +0200, Michel Dänzer <michel@daenzer.net> said:
>
> >> It should be possible to add vmap() and vunmap() to kernel/vmalloc.c
> >> on older kernels. I think those are the only dependencies
>
> Michel> There are a couple more, like pte_offset_kernel(), pte_pfn(),
> Michel> pfn_to_page() and flush_tlb_kernel_range(). Getting this working with
> Michel> 2.4 seems like a lot of work and/or ugly. :\
>
> Actually, it turns out I'm really not well positioned to do this,
> because the ia64 agp patch for 2.4 looks very different from the 2.5
> and your tree looks rather different from the DRM stuff that's in the
> official Linux tree (correct me if I'm wrong here).
>
> Anyhow, this should get you close to compiling (and working,
> hopefully), modulo vmap/vunmap:
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
> # define pte_offset_kernel(dir, address) pte_offset(dir, address)
> # define pte_pfn(pte) (pte_page(pte) - mem_map)
> # define flush_tlb_kernel_range(s,e) flush_tlb_all()
> #endif

[...]

> The above definition of pte_pfn() is not truly platform-independent,
> but I believe it works on all platforms that support AGP.

Looks like it should work on sane PPC systems as well. :)

# define pfn_to_page(pfn) (mem_map + (pfn))

is also needed.


After some more thinking, the way to go for deciding whether or not to
use the new code probably isn't by checking the version but by using
some Makefile trickery as there is already for do_munmap and
remap_page_range. Once that is in place, it looks like I can finally
commit it. :)


--
Earthling Michel Dänzer \ Debian (powerpc), XFree86 and DRI developer
Software libre enthusiast \ http://svcs.affero.net/rm.php?r=daenzer

-
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: 2005-03-22 13:35    [W:0.126 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site