Kmalloc returns which address

Scott Wood scottwood at
Sat Jul 21 02:58:38 EST 2007

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.


More information about the Linuxppc-embedded mailing list