[Dri-devel] PPC Lockup (ati-pcigart-branch)

Ralph Metzler rjkm at convergence.de
Tue Jan 23 15:40:11 EST 2001


Dan Malek writes:
 > Takashi Oe wrote:
 >
 > > Is it really true that virt_to_phys on vmalloc'd memory is broken 6xx?
 >
 > Yep.  The virt_to_phys (except for APUS), only does address - KERNELBASE.
 > I posted a message about this a few days ago during my "mmu cleanup"
 > while merging new code.  I have discovered that architectures are
 > implementing private versions of functions/macros for things like
 > this that are all slightly different.  There is no sense to this,
 > as there should be generic Linux functions for many more memory
 > management functions (and cache management, and dma management,...).
 >
 > > .....  I
 > > wonder why planb works at all....
 >
 > Probably because no one stumbles across the memory it is trashing?
 > Currently, bad_thing_will_happen = vmalloc + virt_to_bus + dma.
 > It could be with the right memory size, modulo addressing, memory
 > controller configuration, timing of the vmalloc, it just may
 > accidently work.  If this is the case, I would be out buying
 > lottery tickets........


A few years back I wasted a lot of hours going through the kernel mm
functions to come to that same conclusion. The conversion routines I
implemented for my Bt848 driver (bttv) already got copied in all kinds
of other frame grabber drivers. Other drivers implemented their
own versions of this.
In the meantime they got modified and improved by others. I
don't know how machine independent they are now. But I guess if the Bt848
driver works on your platform the routines in:

linux/drivers/media/video/bttv_driver.c

in the lines following:

/*******************************/
/* Memory management functions */
/*******************************/

should work for you.

There really should be standard kernel functions for all of this, or
are there now?


Ralph


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list