lkml.org 
[lkml]   [1999]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectmemcpy_toio, values returned by ioremap and so on
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.174 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site