linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ratheesh kannoth <ratheesh.ksz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-newbie
	<linux-newbie-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-c-programming-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-modules-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: virtual -->physical --> virtual address
Date: Sat, 15 Oct 2011 12:31:08 +0530	[thread overview]
Message-ID: <CAGZFCEHW9Rpk8ZaFbaQPMeA_jOGFnFsnyqXg8QYJs+T+WpxpKw@mail.gmail.com> (raw)

{
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

             reply	other threads:[~2011-10-15  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-15  7:01 ratheesh kannoth [this message]
     [not found] ` <CAGZFCEHW9Rpk8ZaFbaQPMeA_jOGFnFsnyqXg8QYJs+T+WpxpKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-15 17:57   ` virtual -->physical --> virtual address Mirko Banchi

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=CAGZFCEHW9Rpk8ZaFbaQPMeA_jOGFnFsnyqXg8QYJs+T+WpxpKw@mail.gmail.com \
    --to=ratheesh.ksz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-c-programming-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-modules-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-newbie-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).