Re: [PATCH] rvmalloc and rvfree

From: James A Simmons (jsimmons@acsu.buffalo.edu)
Date: Fri Feb 11 2000 - 13:38:51 EST


On Fri, 11 Feb 2000, David S. Miller wrote:

> Date: Thu, 10 Feb 2000 20:10:19 -0500 (EST)
> From: James Simmons <jsimmons@acsu.buffalo.edu>
>
> It was bothering me so much about the discussion we had about
> rvmalloc I made a patch for it. This patch places the code inside
> vmalloc.c and I changed vmalloc.h so drivers can use rvmalloc,
> rvfree, kvirt_to_bus, and kvirt_to_pa. I removed the duplicated
> code out of bttv.c and the USB drivers using it. I don't know if my
> solution is correct but its a start. Modify it at will. It's
> against 2.3.43-8 and it compiles but I couldn't test it. I don't
> have any drivers that use this code. So please test it as well.
>
> Please use the new portable pci_{map,unmap}_*() interfaces or
> your code will not work on Alpha and Sparc PCI systems. (hint:
> Add a "pci_dev *" argument to your publicly exported entry points)
>
> In fact on Sparc, virt_to_bus() no longer exists and therefore
> the kernel won't even build if you try to reference it. (we don't
> support any ISA devices on Sparc64, so this is OK)

Your right. Actually only the bttv.c driver uses that function. This
means the bttv driver doesn't work on Sparc stations. Anyone actually
tried it on a Sparc/Alpha station? Of course using the new pci interface
means it doesn't belong in vmalloc.c. This means also that different
versions would need to exist for each type of bus. Now will other drivers
need this code? Right now only bttv.c needs it. So should those function
be placed in bttv.c and fixed with what you suggested or develope a bunch
of interfaces to kvirt_to_{pci,zorro,etc} and place this in the bus code.

Codito, ergo sum - "I code, therefore I am"
James Simmons (o_
fbdev/gfx developer (o_ (o_ //\
http://www.linux-fbdev.org (/)_ (/)_ V_/_
http://linuxgfx.sourceforge.net

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



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:21 EST