Re: [linux-fbdev] Re: bug in fbmem.c,

Jes Sorensen (Jes.Sorensen@cern.ch)
08 Jul 1999 19:46:34 +0200


>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> writes:

Jeff> Vignaud Jean-Baptiste wrote:
>> I'v traced a little bug in the fbmem code. i don't know if it's the
>> right way to correct it, but on my SX164 alpha this seems to work.

Jeff> Good catch! I guess I shouldn't only use the sight of a penguin
Jeff> and running XF86_FBDev as tests. ;-)

Jeff> You cannot eliminate the copy_to_user() and copy_from_user()
Jeff> calls. I don't recall what type of addresses copy_xxx_user()
Jeff> wants, but I suspect you either need a copy buffer

Jeff> memcpy_fromio (bufruf, base_addr+p, copy_size); if
Jeff> (copy_to_user(buf, bufruf, copy_size)) ...

Jeff> or maybe you can get away with some variant of

Jeff> if (copy_to_user(buf, __phys_to_virt (base_addr+p), copy_size)
Jeff> ...

You generally cannot apply phys_to_virt to frame buffer memory
addresses, you are not guaranteed a 1->1 mapping of it.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/