Stephane Marchesin writes:

> Ok, it looks like drm cvs (core and non core) has been broken on ia64 
> since august. Patch attached.
> 
> Stephane
> 
> Index: linux/drm_bufs.h
> ===================================================================
> RCS file: /cvs/dri/drm/linux/drm_bufs.h,v
> retrieving revision 1.45
> diff -u -r1.45 drm_bufs.h
> --- linux/drm_bufs.h  16 Jan 2005 05:40:12 -0000      1.45
> +++ linux/drm_bufs.h  4 Mar 2005 14:10:26 -0000
> @@ -74,7 +74,7 @@
>  
>       if ( (offset & (~PAGE_MASK)) || (size & (~PAGE_MASK)) )
>               return -EINVAL;
> -#if !defined(__sparc__) && !defined(__alpha__)
> +#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__)
>       if ( offset + size < offset || offset < virt_to_phys(high_memory) )
>               return -EINVAL;
>  #endif

Note that that check is also wrong for ppc64.  I think it is going to
be wrong for most 64-bit platforms, since it is assuming that you can
never have ram at a higher physical address than any I/O devices.  On
64-bit platforms it is quite common to have some ram and some I/O
below 4GB, and some more ram above 4GB.

I don't see why we need the check anyway, unless some architecture
(x86?) will actually panic if you try to ioremap a physical address
that is below virt_to_phys(high_memory) or something.

Paul.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to