[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100706130618.GA14177@shutemov.name>
Date: Tue, 6 Jul 2010 16:06:18 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Russell King <rmk@....linux.org.uk>
Cc: Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
stable@...nel.org, stable-review@...nel.org,
torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
alan@...rguk.ukuu.org.uk, Anfei Zhou <anfei.zhou@...il.com>,
Alexander Shishkin <virtuoso@...nd.org>,
Siarhei Siamashka <siarhei.siamashka@...ia.com>
Subject: Re: [patch 071/149] ARM: 6166/1: Proper prefetch abort handling on
pre-ARMv6
On Fri, Jul 02, 2010 at 12:12:07AM +0100, Russell King wrote:
> On Fri, Jul 02, 2010 at 01:59:11AM +0300, Kirill A. Shutemov wrote:
> > On Thu, Jul 01, 2010 at 11:48:37PM +0100, Russell King wrote:
> > > One possibility is that for some reason you're using the legacy prefetch
> > > abort code or pre-IFSR code, which will always tell the kernel that its
> > > a translation fault - and in this case, this patch would improve the
> > > situation. What kernel version are you using?
> >
> > 2.6.32
>
> Should be recent enough.
>
> > If you run this test in loop on kernel without the patch you'll finally
> > get hung instead SIGSEGV.
> >
> > It seems the patch fixes more than it was written for. :)
>
> Have you investigated the IFSR and IFAR values, and the corresponding
> page table state? I'm not going to be able to run your test code for
> a few days.
I've investigated the issue. It's reproducible if you try to jump to
the megabyte next to section mapping.
On my OMAP3-based device I use address 0xfc1XXXXX for debugging propose.
It's a megabyte next to OMAP343X_SMS mapping.
On ARM one Linux PGD entry contains two hardware entry. But there is error
in do_translation_fault(). It's always call pmd_none() check for the first
entry of two, not for the entry corresponded to address. So in case if we
try to jump the megabyte next to section mapping, we will have inifinity
loop of translation faults.
Signed-off-by: Kirill A. Shutemov <kirill@...temov.name>
---
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 9634fe1..825b9da 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -406,7 +406,8 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
pmd_k = pmd_offset(pgd_k, addr);
pmd = pmd_offset(pgd, addr);
- if (pmd_none(*pmd_k))
+ index = (addr >> SECTION_SHIFT) & 1;
+ if (pmd_none(pmd_k[index]))
goto bad_area;
copy_pmd(pmd, pmd_k);
--
Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists