linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* virtual -->physical --> virtual address
@ 2011-10-15  7:01 ratheesh kannoth
       [not found] ` <CAGZFCEHW9Rpk8ZaFbaQPMeA_jOGFnFsnyqXg8QYJs+T+WpxpKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: ratheesh kannoth @ 2011-10-15  7:01 UTC (permalink / raw)
  To: linux-newbie, linux-c-programming-u79uwXL29TY76Z2rM5mHXA,
	linux-modules-u79uwXL29TY76Z2rM5mHXA

{
virtual_addr1 =  kmalloc(0x20, GFP_USER);
phy_addr1 = __pa(virtual_addr1 );
virtual_addr2 =  ioremap(phy_addr1, 0x20 );

}


I noticed that virtual_addr1  is not equal to virtual_addr2.  And if i
dereference virtual_addr2 ( *virtual_addr2 ),
kernel crash. What is wrong here ?

-Ratheesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-15 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-15  7:01 virtual -->physical --> virtual address ratheesh kannoth
     [not found] ` <CAGZFCEHW9Rpk8ZaFbaQPMeA_jOGFnFsnyqXg8QYJs+T+WpxpKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-15 17:57   ` Mirko Banchi

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).