* request_mem_region @ 2011-06-20 7:48 Daniel Redway 2011-06-21 5:22 ` request_mem_region Mulyadi Santosa 0 siblings, 1 reply; 3+ messages in thread From: Daniel Redway @ 2011-06-20 7:48 UTC (permalink / raw) To: kernelnewbies Hello As I understand ioremap() maps and returns virtual address for a given physical(bus) address associated with my PCI card. That is cool and clear. What is the purpose of request_mem_region()? They both take physical address as a parameter, but do not return any virt addresses. 1. What do they allocate/reserve and where? 2. Should I call reques_mem_region() before doing ioremap() or not? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110620/4c757e98/attachment.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* request_mem_region 2011-06-20 7:48 request_mem_region Daniel Redway @ 2011-06-21 5:22 ` Mulyadi Santosa 2011-06-21 6:54 ` request_mem_region Daniel Redway 0 siblings, 1 reply; 3+ messages in thread From: Mulyadi Santosa @ 2011-06-21 5:22 UTC (permalink / raw) To: kernelnewbies On 20/06/2011, Daniel Redway <daniel.redway85@gmail.com> wrote: > Hello > > As I understand ioremap() maps and returns virtual address > for a given physical(bus) address associated with my PCI card. > That is cool and clear. > > > What is the purpose of request_mem_region()? checking http://lxr.linux.no/linux+v2.6.39/kernel/resource.c#L732, I think that function generally says "alright,I wanna reserve this memory region, so no one may touch it....until I mark it as free again" -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* request_mem_region 2011-06-21 5:22 ` request_mem_region Mulyadi Santosa @ 2011-06-21 6:54 ` Daniel Redway 0 siblings, 0 replies; 3+ messages in thread From: Daniel Redway @ 2011-06-21 6:54 UTC (permalink / raw) To: kernelnewbies Ok I understood. after I call request_mem_region , can real device write some byte to this region? or dont touch? I read mem region of device configuration space, start and length register thanks 2011/6/21 Mulyadi Santosa <mulyadi.santosa@gmail.com> > On 20/06/2011, Daniel Redway <daniel.redway85@gmail.com> wrote: > > Hello > > > > As I understand ioremap() maps and returns virtual address > > for a given physical(bus) address associated with my PCI card. > > That is cool and clear. > > > > > > What is the purpose of request_mem_region()? > > checking http://lxr.linux.no/linux+v2.6.39/kernel/resource.c#L732, I > think that function generally says "alright,I wanna reserve this > memory region, so no one may touch it....until I mark it as free > again" > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer and consultant > > blog: the-hydra.blogspot.com > training: mulyaditraining.blogspot.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110621/0b3751ff/attachment.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-21 6:54 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-20 7:48 request_mem_region Daniel Redway 2011-06-21 5:22 ` request_mem_region Mulyadi Santosa 2011-06-21 6:54 ` request_mem_region Daniel Redway
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).