mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Brandenburger <seanbrandenburger@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: In PAE enabled kernel, ioremap cannot handle physical address > 32bit
Date: Tue, 29 Sep 2009 16:47:45 -0700	[thread overview]
Message-ID: <90201b70909291647j1a1ebf4do12c1495ad3aa76e4@mail.gmail.com> (raw)

   I have a PAE enabled kernel. I am trying to ioremap a physical address
which is above 4GB area. It is noticed that the ioremap maps to the 32bit
truncated physical address.

   Even though __ioremap_caller takes in phys_addr of size
resource_size_t, the macro PAGE_SHIFT, PAGE_MASK truncates the
size to 32bit on the physical address operand it works on (for e.g. pfn,
phys_addr, last_addr, etc. below)

         /*
          * Don't allow anybody to remap normal RAM that we're using..
          */
         for (pfn = phys_addr >> PAGE_SHIFT;
                                 (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK);
                                 pfn++) {

   Even after fixing the above lines, still the issue is there. Looks
like there
is lot more places fixes to handle greater than 32bit need to be done.
I searched the past mailing list and did not find any fixes. I did come across
suggestions not to use PAGE_MASK on Physical address but to use
PHYSICAL_PAGE_MASK. I did come cross other fixes related to handling
physical address greater than 32bit but not any fixes for ioremap.

   Does any of you know if this issue has been fixed? If not, I will spend
time to fix it.

Thanks
Sean

                 reply	other threads:[~2009-09-29 23:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=90201b70909291647j1a1ebf4do12c1495ad3aa76e4@mail.gmail.com \
    --to=seanbrandenburger@gmail.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®