Thread (8 messages) flat view 8 messages, 4 authors, 2007-07-24

Re: Kmalloc returns which address

From: Scott Wood <hidden>
Date: 2007-07-20 16:58:49

Misbah khan wrote:
hi Suresh

In linux kmelloc returns the pointer to virtual address not the physical
address, to return to the physical address there is different function
called ioremap 

for eg :-
char *buf_tx =kmalloc(100,GFP_KERNEL); // Tx buffer
char *buf_rx=kmalloc(100,GFP_KERNEL); // Rx buffer

ptr_tx=ioremap( buf_tx,100);
ptr_rx=ioremap(buf_rx,100);
That's a really easy way to cause a machine check.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help