Linux-kernel mailing list archive 1999-25,: Re: [linux-fbdev] Re: bug in fbmem.c,

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

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Tue, 22 Jun 1999 14:54:30 +0200 (CEST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: All Linux Mailing List: "nfs, samba or ncpfs"
- Previous message: Henning P. Schmiedehausen: "forked files (was: Re: (reiserfs) Re: I discussed reading directories as files with jra, Stallman, and)"

On Tue, 22 Jun 1999, Jeff Garzik wrote:
> 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.
>
> Good catch! I guess I shouldn't only use the sight of a penguin and
> running XF86_FBDev as tests. ;-)
>
> You cannot eliminate the copy_to_user() and copy_from_user() calls. I
> don't recall what type of addresses copy_xxx_user() wants, but I suspect
> you either need a copy buffer
>
> memcpy_fromio (bufruf, base_addr+p, copy_size);
> if (copy_to_user(buf, bufruf, copy_size)) ...
>
> or maybe you can get away with some variant of
>
> if (copy_to_user(buf, __phys_to_virt (base_addr+p), copy_size) ...

On most platforms we can, but not on AXP: we have to use readl/writel and
friends there.

Greetings,

Geert

    --
    Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
    Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
    Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

    -
    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/

- Next message: All Linux Mailing List: "nfs, samba or ncpfs"
- Previous message: Henning P. Schmiedehausen: "forked files (was: Re: (reiserfs) Re: I discussed reading directories as files with jra, Stallman, and)"

"start" -->