memcpy_toio, values returned by ioremap and so on

Petr Vandrovec Ing. VTEI (VANDROVE@vc.cvut.cz)
Thu, 15 Apr 1999 17:48:28 MET-1


Hi,
I have one small question: Long time ago I was asked by some Alpha
guy to change vaddr_t type, used in matroxfb to represent (virtual)
address returned from ioremap, from 'void*' to 'unsigned long'.
So I'd like to know, what is better, 'void*' or 'unsigned long'?
It looks like that 'void*' is better, because of 'sparc64' and 'ppc'
uses this as type of parameters passed to 'memcpy_toio' without
typecasts and 'void*' is also returned by 'ioremap' and passed to
'iounmap' on all architectures.
But, on other side, almost all functions from readl/writel group
converts passed virtual address to 'unsigned long' - and alpha and arm
converts virtual address always to unsigned long.
So should I left 'void*' in place or change it to 'unsigned long'
and add typecast around 'ioremap', 'iounmap', 'memcpy_toio' and so on?
What is the future of vaddr_t? Are we moving from 'long' to 'void*'
or from 'void*' to 'long'? Or to vaddr_t?
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz

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