From: tsoni@codeaurora.org (Trilok Soni)
To: linux-arm-kernel@lists.infradead.org
Subject: ioremap() fail on physical address 0x0 in 3.4 kernel
Date: Wed, 22 Aug 2012 12:16:08 +0530 [thread overview]
Message-ID: <50348030.9080200@codeaurora.org> (raw)
In-Reply-To: <5033C428.2050607@codeaurora.org>
Hi Laura,
On 8/21/2012 10:53 PM, Laura Abbott wrote:
>
> Looks like you are hitting the empty section gap:
>
> 0xfa200000-0xfa300000 1048576 pmd_empty_section_gap+0x0/0x3c ioremap
>
> pmd_empty_section_gap ends up with vm->phys_addr = 0x0 because it was
> never set. This section isn't actually mapped so when searching for the
> range in the static io map it finds this address and returns it but it
> isn't actually a valid address to return. Perhaps ioremap should not
> bother trying to re-use the static iomap if the address is zero and let
> pmd_empty_section_gap use 0x0 as a dummy value?
>
>
>
> diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
> --- a/arch/arm/mm/ioremap.c
> +++ b/arch/arm/mm/ioremap.c
> @@ -228,7 +228,8 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned
> long pfn,
> */
> read_lock(&vmlist_lock);
> for (area = vmlist; area; area = area->next) {
> - if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000))
> + if (!size || !pfn || (sizeof(phys_addr_t) == 4 &&
> + pfn >= 0x100000))
Thanks for the patch, but how about just checking pmd_none on such
addresses and since there won't be any mapping created for such gaps? We
need to check if this is fine for all, since I remember that Nico
added these functions for the OMAP boot issue I guess.
---Trilok Soni
--
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2012-08-22 6:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 14:28 ioremap() fail on physical address 0x0 in 3.4 kernel Murali Nalajala
2012-08-21 17:23 ` Laura Abbott
2012-08-22 6:41 ` Murali Nalajala
2012-08-22 6:46 ` Trilok Soni [this message]
2012-08-22 9:53 ` Russell King - ARM Linux
2012-08-22 11:23 ` Russell King - ARM Linux
2012-08-22 13:19 ` Nicolas Pitre
2012-08-22 12:03 ` Murali Nalajala
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=50348030.9080200@codeaurora.org \
--to=tsoni@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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).