All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] [RESEND] Handle instruction cache maintenance fault  properly
@ 2010-05-11 10:33 ` Kirill A. Shutemov
  0 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2010-05-11 10:33 UTC (permalink / raw)
  To: Russell King
  Cc: Catalin Marinas, Siarhei Siamashka, linux-arm-kernel,
	linux-kernel, Aaro Koskinen, Valdis.Kletnieks

Between "clean D line..." and "invalidate I line" operations in
v7_coherent_user_range(), the memory page may get swapped out.
And the fault on "invalidate I line" could not be properly handled
causing the oops.

In ARMv6 "external abort on linefetch" replaced by "instruction cache
maintenance fault". Let's handle it as translation fault. It fixes the
issue.

I'm not sure if it's reasonable to check arch version in run-time.
Let's do it in compile time for now.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
---

Sorry for resend. I've made mistake in maillist address.

---
 arch/arm/mm/fault.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 9d40c34..7f193ea 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -463,7 +463,12 @@ static struct fsr_info {
 	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
 	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
 	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
+/* Do we need runtime check ? */
+#if __LINUX_ARM_ARCH__ < 6
 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
+#else
+	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
fault"	   },
+#endif
 	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
fault"	   },
 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
 	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2010-05-11 10:33 ` Kirill A. Shutemov
  0 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2010-05-11 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

Between "clean D line..." and "invalidate I line" operations in
v7_coherent_user_range(), the memory page may get swapped out.
And the fault on "invalidate I line" could not be properly handled
causing the oops.

In ARMv6 "external abort on linefetch" replaced by "instruction cache
maintenance fault". Let's handle it as translation fault. It fixes the
issue.

I'm not sure if it's reasonable to check arch version in run-time.
Let's do it in compile time for now.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
---

Sorry for resend. I've made mistake in maillist address.

---
 arch/arm/mm/fault.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 9d40c34..7f193ea 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -463,7 +463,12 @@ static struct fsr_info {
 	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
 	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
 	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
+/* Do we need runtime check ? */
+#if __LINUX_ARM_ARCH__ < 6
 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
+#else
+	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
fault"	   },
+#endif
 	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
fault"	   },
 	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
 	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
  2010-05-11 10:33 ` Kirill A. Shutemov
@ 2010-05-12 11:01   ` Catalin Marinas
  -1 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2010-05-12 11:01 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Russell King, Siarhei Siamashka, linux-arm-kernel, linux-kernel,
	Aaro Koskinen, Valdis.Kletnieks

On Tue, 2010-05-11 at 11:33 +0100, Kirill A. Shutemov wrote:
> Between "clean D line..." and "invalidate I line" operations in
> v7_coherent_user_range(), the memory page may get swapped out.
> And the fault on "invalidate I line" could not be properly handled
> causing the oops.
> 
> In ARMv6 "external abort on linefetch" replaced by "instruction cache
> maintenance fault". Let's handle it as translation fault. It fixes the
> issue.
> 
> I'm not sure if it's reasonable to check arch version in run-time.
> Let's do it in compile time for now.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

FWIW:

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

-- 
Catalin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2010-05-12 11:01   ` Catalin Marinas
  0 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2010-05-12 11:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 2010-05-11 at 11:33 +0100, Kirill A. Shutemov wrote:
> Between "clean D line..." and "invalidate I line" operations in
> v7_coherent_user_range(), the memory page may get swapped out.
> And the fault on "invalidate I line" could not be properly handled
> causing the oops.
> 
> In ARMv6 "external abort on linefetch" replaced by "instruction cache
> maintenance fault". Let's handle it as translation fault. It fixes the
> issue.
> 
> I'm not sure if it's reasonable to check arch version in run-time.
> Let's do it in compile time for now.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

FWIW:

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

-- 
Catalin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
  2010-05-11 10:33 ` Kirill A. Shutemov
@ 2010-05-14 13:29   ` Catalin Marinas
  -1 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2010-05-14 13:29 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Russell King, Siarhei Siamashka, linux-arm-kernel, linux-kernel,
	Aaro Koskinen, Valdis.Kletnieks

On Tue, 2010-05-11 at 11:33 +0100, Kirill A. Shutemov wrote:
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index 9d40c34..7f193ea 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -463,7 +463,12 @@ static struct fsr_info {
>         { do_bad,               SIGILL,  BUS_ADRALN,    "alignment exception"              },
>         { do_bad,               SIGKILL, 0,             "terminal exception"               },
>         { do_bad,               SIGILL,  BUS_ADRALN,    "alignment exception"              },
> +/* Do we need runtime check ? */
> +#if __LINUX_ARM_ARCH__ < 6
>         { do_bad,               SIGBUS,  0,             "external abort on linefetch"      },
> +#else
> +       { do_translation_fault, SIGSEGV, SEGV_MAPPER,   "I-cache maintenance
> fault"     },
> +#endif

Apart from line wrapping, it should be SEGV_MAPERR above.

-- 
Catalin


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2010-05-14 13:29   ` Catalin Marinas
  0 siblings, 0 replies; 12+ messages in thread
From: Catalin Marinas @ 2010-05-14 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 2010-05-11 at 11:33 +0100, Kirill A. Shutemov wrote:
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index 9d40c34..7f193ea 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -463,7 +463,12 @@ static struct fsr_info {
>         { do_bad,               SIGILL,  BUS_ADRALN,    "alignment exception"              },
>         { do_bad,               SIGKILL, 0,             "terminal exception"               },
>         { do_bad,               SIGILL,  BUS_ADRALN,    "alignment exception"              },
> +/* Do we need runtime check ? */
> +#if __LINUX_ARM_ARCH__ < 6
>         { do_bad,               SIGBUS,  0,             "external abort on linefetch"      },
> +#else
> +       { do_translation_fault, SIGSEGV, SEGV_MAPPER,   "I-cache maintenance
> fault"     },
> +#endif

Apart from line wrapping, it should be SEGV_MAPERR above.

-- 
Catalin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
  2010-05-11 10:33 ` Kirill A. Shutemov
@ 2011-12-15 21:56   ` Uwe Kleine-König
  -1 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2011-12-15 21:56 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Russell King, Siarhei Siamashka, Valdis.Kletnieks,
	Catalin Marinas, linux-kernel, Aaro Koskinen, linux-arm-kernel

Hello,

On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> Between "clean D line..." and "invalidate I line" operations in
> v7_coherent_user_range(), the memory page may get swapped out.
> And the fault on "invalidate I line" could not be properly handled
> causing the oops.
> 
> In ARMv6 "external abort on linefetch" replaced by "instruction cache
> maintenance fault". Let's handle it as translation fault. It fixes the
> issue.
> 
> I'm not sure if it's reasonable to check arch version in run-time.
> Let's do it in compile time for now.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
I found this patch in Catalin's stack that I picked up to get support
for Cortex-M3. Is this still relevant?

Best regards
Uwe

> Sorry for resend. I've made mistake in maillist address.
> 
> ---
>  arch/arm/mm/fault.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index 9d40c34..7f193ea 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -463,7 +463,12 @@ static struct fsr_info {
>  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
>  	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
>  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> +/* Do we need runtime check ? */
> +#if __LINUX_ARM_ARCH__ < 6
>  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> +#else
> +	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
> fault"	   },
> +#endif
>  	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
> fault"	   },
>  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
>  	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
> -- 
> 1.7.0.4
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2011-12-15 21:56   ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2011-12-15 21:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> Between "clean D line..." and "invalidate I line" operations in
> v7_coherent_user_range(), the memory page may get swapped out.
> And the fault on "invalidate I line" could not be properly handled
> causing the oops.
> 
> In ARMv6 "external abort on linefetch" replaced by "instruction cache
> maintenance fault". Let's handle it as translation fault. It fixes the
> issue.
> 
> I'm not sure if it's reasonable to check arch version in run-time.
> Let's do it in compile time for now.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
I found this patch in Catalin's stack that I picked up to get support
for Cortex-M3. Is this still relevant?

Best regards
Uwe

> Sorry for resend. I've made mistake in maillist address.
> 
> ---
>  arch/arm/mm/fault.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index 9d40c34..7f193ea 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -463,7 +463,12 @@ static struct fsr_info {
>  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
>  	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
>  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> +/* Do we need runtime check ? */
> +#if __LINUX_ARM_ARCH__ < 6
>  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> +#else
> +	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
> fault"	   },
> +#endif
>  	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
> fault"	   },
>  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
>  	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
> -- 
> 1.7.0.4
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
  2011-12-15 21:56   ` Uwe Kleine-König
@ 2011-12-16  2:22     ` Kirill A. Shutemov
  -1 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2011-12-16  2:22 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Russell King, Siarhei Siamashka, Valdis.Kletnieks,
	Catalin Marinas, linux-kernel, Aaro Koskinen, linux-arm-kernel

On Thu, Dec 15, 2011 at 10:56:49PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> > Between "clean D line..." and "invalidate I line" operations in
> > v7_coherent_user_range(), the memory page may get swapped out.
> > And the fault on "invalidate I line" could not be properly handled
> > causing the oops.
> > 
> > In ARMv6 "external abort on linefetch" replaced by "instruction cache
> > maintenance fault". Let's handle it as translation fault. It fixes the
> > issue.
> > 
> > I'm not sure if it's reasonable to check arch version in run-time.
> > Let's do it in compile time for now.
> > 
> > Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> I found this patch in Catalin's stack that I picked up to get support
> for Cortex-M3. Is this still relevant?

It's in upstream. See 8c0b742.

> 
> Best regards
> Uwe
> 
> > Sorry for resend. I've made mistake in maillist address.
> > 
> > ---
> >  arch/arm/mm/fault.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> > index 9d40c34..7f193ea 100644
> > --- a/arch/arm/mm/fault.c
> > +++ b/arch/arm/mm/fault.c
> > @@ -463,7 +463,12 @@ static struct fsr_info {
> >  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> >  	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
> >  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> > +/* Do we need runtime check ? */
> > +#if __LINUX_ARM_ARCH__ < 6
> >  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> > +#else
> > +	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
> > fault"	   },
> > +#endif
> >  	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
> > fault"	   },
> >  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> >  	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
> > -- 
> > 1.7.0.4
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> > 
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2011-12-16  2:22     ` Kirill A. Shutemov
  0 siblings, 0 replies; 12+ messages in thread
From: Kirill A. Shutemov @ 2011-12-16  2:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Dec 15, 2011 at 10:56:49PM +0100, Uwe Kleine-K?nig wrote:
> Hello,
> 
> On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> > Between "clean D line..." and "invalidate I line" operations in
> > v7_coherent_user_range(), the memory page may get swapped out.
> > And the fault on "invalidate I line" could not be properly handled
> > causing the oops.
> > 
> > In ARMv6 "external abort on linefetch" replaced by "instruction cache
> > maintenance fault". Let's handle it as translation fault. It fixes the
> > issue.
> > 
> > I'm not sure if it's reasonable to check arch version in run-time.
> > Let's do it in compile time for now.
> > 
> > Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> I found this patch in Catalin's stack that I picked up to get support
> for Cortex-M3. Is this still relevant?

It's in upstream. See 8c0b742.

> 
> Best regards
> Uwe
> 
> > Sorry for resend. I've made mistake in maillist address.
> > 
> > ---
> >  arch/arm/mm/fault.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> > index 9d40c34..7f193ea 100644
> > --- a/arch/arm/mm/fault.c
> > +++ b/arch/arm/mm/fault.c
> > @@ -463,7 +463,12 @@ static struct fsr_info {
> >  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> >  	{ do_bad,		SIGKILL, 0,		"terminal exception"		   },
> >  	{ do_bad,		SIGILL,	 BUS_ADRALN,	"alignment exception"		   },
> > +/* Do we need runtime check ? */
> > +#if __LINUX_ARM_ARCH__ < 6
> >  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> > +#else
> > +	{ do_translation_fault,	SIGSEGV, SEGV_MAPPER,	"I-cache maintenance
> > fault"	   },
> > +#endif
> >  	{ do_translation_fault,	SIGSEGV, SEGV_MAPERR,	"section translation
> > fault"	   },
> >  	{ do_bad,		SIGBUS,	 0,		"external abort on linefetch"	   },
> >  	{ do_page_fault,	SIGSEGV, SEGV_MAPERR,	"page translation fault"	   },
> > -- 
> > 1.7.0.4
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> > 
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-K?nig            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
  2011-12-16  2:22     ` Kirill A. Shutemov
@ 2011-12-16 10:01       ` Uwe Kleine-König
  -1 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2011-12-16 10:01 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: Russell King, Siarhei Siamashka, Valdis.Kletnieks,
	Catalin Marinas, linux-kernel, Aaro Koskinen, linux-arm-kernel

Hallo,

On Fri, Dec 16, 2011 at 04:22:05AM +0200, Kirill A. Shutemov wrote:
> On Thu, Dec 15, 2011 at 10:56:49PM +0100, Uwe Kleine-König wrote:
> > Hello,
> > 
> > On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> > > Between "clean D line..." and "invalidate I line" operations in
> > > v7_coherent_user_range(), the memory page may get swapped out.
> > > And the fault on "invalidate I line" could not be properly handled
> > > causing the oops.
> > > 
> > > In ARMv6 "external abort on linefetch" replaced by "instruction cache
> > > maintenance fault". Let's handle it as translation fault. It fixes the
> > > issue.
> > > 
> > > I'm not sure if it's reasonable to check arch version in run-time.
> > > Let's do it in compile time for now.
> > > 
> > > Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > I found this patch in Catalin's stack that I picked up to get support
> > for Cortex-M3. Is this still relevant?
> 
> It's in upstream. See 8c0b742.
Ah, I missed that because it applies again on top of 3.2-rc because of

	993bf4e (ARM: 6256/1: Check arch version and modify fsr_info[] depends on it at runtime)

Thanks and sorry for the noise,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly
@ 2011-12-16 10:01       ` Uwe Kleine-König
  0 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2011-12-16 10:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hallo,

On Fri, Dec 16, 2011 at 04:22:05AM +0200, Kirill A. Shutemov wrote:
> On Thu, Dec 15, 2011 at 10:56:49PM +0100, Uwe Kleine-K?nig wrote:
> > Hello,
> > 
> > On Tue, May 11, 2010 at 01:33:14PM +0300, Kirill A. Shutemov wrote:
> > > Between "clean D line..." and "invalidate I line" operations in
> > > v7_coherent_user_range(), the memory page may get swapped out.
> > > And the fault on "invalidate I line" could not be properly handled
> > > causing the oops.
> > > 
> > > In ARMv6 "external abort on linefetch" replaced by "instruction cache
> > > maintenance fault". Let's handle it as translation fault. It fixes the
> > > issue.
> > > 
> > > I'm not sure if it's reasonable to check arch version in run-time.
> > > Let's do it in compile time for now.
> > > 
> > > Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > I found this patch in Catalin's stack that I picked up to get support
> > for Cortex-M3. Is this still relevant?
> 
> It's in upstream. See 8c0b742.
Ah, I missed that because it applies again on top of 3.2-rc because of

	993bf4e (ARM: 6256/1: Check arch version and modify fsr_info[] depends on it at runtime)

Thanks and sorry for the noise,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-12-16 10:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11 10:33 [PATCH v2] [RESEND] Handle instruction cache maintenance fault properly Kirill A. Shutemov
2010-05-11 10:33 ` Kirill A. Shutemov
2010-05-12 11:01 ` Catalin Marinas
2010-05-12 11:01   ` Catalin Marinas
2010-05-14 13:29 ` Catalin Marinas
2010-05-14 13:29   ` Catalin Marinas
2011-12-15 21:56 ` Uwe Kleine-König
2011-12-15 21:56   ` Uwe Kleine-König
2011-12-16  2:22   ` Kirill A. Shutemov
2011-12-16  2:22     ` Kirill A. Shutemov
2011-12-16 10:01     ` Uwe Kleine-König
2011-12-16 10:01       ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.