[PATCH] ARM: ioremap: fix boundary check when reusing static mapping
Pawel Moll
pawel.moll at arm.com
Mon Jan 30 06:10:56 EST 2012
On Sun, 2012-01-29 at 14:55 +0000, Russell King - ARM Linux wrote:
> So, 'size' includes the requested offset *already*. So, Nicolas' original:
>
> if (__phys_to_pfn(area->phys_addr) > pfn ||
> __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1)
> continue;
>
> was correct in the first place. In any case, let's see what's going on
> here:
Uh. Sincere apologies - I was too happy to see my problem "fixed" and I
rushed things :-/ Lesson learned - I shall not post patches 5 minutes
after creating them and 5 minutes before leaving work.
> Unfortunately, Pawel doesn't say what the problem he was trying to fix was,
> all we have to go on is this totally crap commit comment:
After rebasing my DT4VE patches on top of 3.3-rc1 I seemed not to get
any interrupts from peripherals. Bisect pointed to Nico's patch and
commenting out the loop checking existing mappings made things work, so
did enlarging the static mapping that is created for MPCore peripherals.
Also some data from printk (I'll have to get them back to the code to
see were I made the mistake) made me think that the condition gets a
false positive. Back to debugging then.
> In any case, I don't think it matters, and I'm going to schedule a revert
> of that crap commit. So, Joachim, well spotted.
I'm really sorry about the hassle.
Paweł
More information about the linux-arm-kernel
mailing list