linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Misbah khan <misbah_khan@engineer.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: Kmalloc returns which address
Date: Tue, 24 Jul 2007 00:03:33 -0700 (PDT)	[thread overview]
Message-ID: <11757911.post@talk.nabble.com> (raw)
In-Reply-To: <469B92DC.50609@freescale.com>


Hi Scott

The while idea behind my logic was something this :-

 Conver the physical address into virtual address and every time you read or
write to that virtual you are reading or writing to the physical address.
For that i suggested for ioremap(), some may suggest for __pa() to translate
the physical address to logical address. The whole idea behind this is to
make the task much easy and less complicated as if you are working on memory
mapped address.

DMA operation will make the application process to access the device
directly this i guess is little more complicated in implimentation and
passing a pointer to the application is a serious security concern untill
and unless only one thread is accessing .

well i will try this with a test driver as soon as i get the free time and
let you know with the findings

Thanks 
Misbah  

Scott Wood-2 wrote:
> 
> suresh suresh wrote:
>> I want know the address return by kmalloc function? is it physical
>> address
>> or kernel virtual address.
> 
> Kernel virtual.
> 
>> 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?
> 
> You need to convert it; read Documentation/DMA-mapping.txt.
> 
> -Scott
> _______________________________________________
> 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#a11757911
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

  parent reply	other threads:[~2007-07-24  7:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-16 13:59 Kmalloc returns which address suresh suresh
2007-07-16 15:46 ` Scott Wood
2007-07-23  3:47   ` Misbah khan
2007-07-23 18:35     ` Scott Wood
2007-07-24  7:03   ` Misbah khan [this message]
2007-07-20 10:52 ` Misbah khan
2007-07-20 16:58   ` Scott Wood
2007-07-20 12:13 ` Alessandro Rubini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11757911.post@talk.nabble.com \
    --to=misbah_khan@engineer.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).