From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id EB863DDEC0 for ; Fri, 20 Jul 2007 20:52:23 +1000 (EST) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IBq5t-0000pB-8j for linuxppc-embedded@ozlabs.org; Fri, 20 Jul 2007 03:52:21 -0700 Message-ID: <11705981.post@talk.nabble.com> Date: Fri, 20 Jul 2007 03:52:21 -0700 (PDT) From: Misbah khan To: linuxppc-embedded@ozlabs.org Subject: Re: Kmalloc returns which address In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii References: List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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); To learn more about this go through Linux device driver by rubini I hope this will work for you regard Misbah suresh suresh wrote: > > Hi, > > I am porting MPC8280 driver from vxWorks to Linux. > > I want know the address return by kmalloc function? is it physical address > or kernel virtual address. > > For Tx and Rx, hardware uses buffers, so I have to allocate buffers and > pass > the pointer to hardware. Can I pass the pointer returned kmalloc? or I > should convert it into physical address? > > If it returns kernel virtual address, then how to convert into physical? > > Thanks & Regards- > Suresh > > _______________________________________________ > Linuxppc-embedded mailing list > Linuxppc-embedded@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-embedded > -- View this message in context: http://www.nabble.com/Kmalloc-returns-which-address-tf4086826.html#a11705981 Sent from the linuxppc-embedded mailing list archive at Nabble.com.