Handle sparc-leon SRMMU specific bug
PATCH 6/7 Handle sparc-leon SRMMU specific bug
From f95779d3a4d478d9df1070cc54a42163993f3b97 Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 13:05:17 +0200
Subject: [PATCH 6/7] Handle sparc-leon SRMMU specific bug. Shielded by CONFIG_LEON.
--- arch/sparc/mm/fault_32.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
arch/sparc/mm/fault_32.c +5 -1
@@ -227,7 +227,11 @@ asmlinkage void do_sparc_fault(struct pt*/ good_area: info.si_code =SEGV_ACCERR ; -if (write) { +if (write +#ifdef CONFIG_LEON + && !text_fault +#endif + ) {if (!(vma->vm_flags &VM_WRITE )) goto bad_area; }else {
Signature · 1 line
1.4.2.1
From f95779d3a4d478d9df1070cc54a42163993f3b97 Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 13:05:17 +0200
Subject: [PATCH 6/7] Handle sparc-leon SRMMU specific bug. Shielded by CONFIG_LEON.
--- arch/sparc/mm/fault_32.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
arch/sparc/mm/fault_32.c +5 -1
@@ -227,7 +227,11 @@ asmlinkage void do_sparc_fault(struct pt*/ good_area: info.si_code =SEGV_ACCERR ; -if (write) { +if (write +#ifdef CONFIG_LEON + && !text_fault +#endif + ) {if (!(vma->vm_flags &VM_WRITE )) goto bad_area; }else {
Signature · 1 line
1.4.2.1
Quoted 18 lines · Konrad Eisele
From
f95779d3a4d478d9df1070cc54a42163993f3b97Mon Sep 17 00:00:00 2001
From: Konrad Eisele <[email protected]>
Date: Tue, 9 Jun 2009 13:05:17 +0200
Subject: [PATCH 6/7] Handle sparc-leon SRMMU specific bug. Shielded byCONFIG_LEON.Signed-off-by Konrad Eisele <[email protected]>--- arch/sparc/mm/fault_32.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)arch/sparc/mm/fault_32.c +0
-0@@ -227,7 +227,11 @@ asmlinkage void do_sparc_fault(struct pt*/ good_area:
arch/sparc/mm/fault_32.c asmlinkage void do_sparc_fault(struct pt · line 237
Quoted 10 lines
arch/sparc/mm/fault_32.c +5
-1info.si_code =SEGV_ACCERR ; -if (write) { +if (write +#ifdef CONFIG_LEON + && !text_fault +#endif + ) {if (!(vma->vm_flags &VM_WRITE )) goto bad_area; }else {
We do not break up an if like this.
And you need to comment on this.
Consider using an inline helper function or similar to avoid obscufating the code.
Sam
PATCH 6/7 Handle sparc-leon SRMMU specific bug. Shielded by CONFIG_SPARC_LEON.
In reply to Konrad EiseleFrom: Konrad Eisele <[email protected]>
Quoted 4 lines
Quoted 4 lines
(quoted diff) +4
-0+#ifdef CONFIG_LEON + && !text_fault +#endif + ) {
Quoted 9 lines
Review
Quoted 3 lines
(quoted diff) +0
-0if(!(vma->vm_flags & VM_WRITE)) goto bad_area; } else {We do not break up an if like this.
And you need to comment on this.
Consider using an inline helper function or similar to avoid obscufating the code.
I added a additional comment.
--- arch/sparc/mm/fault_32.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
arch/sparc/mm/fault_32.c +8 -1
@@ -227,7 +227,14 @@ asmlinkage void do_sparc_fault(struct pt*/ good_area: info.si_code =SEGV_ACCERR ; -if (write) { + if (write +#ifdef CONFIG_SPARC_LEON +/* a hardware bug in the sparc-leon SRMMU makes icache +text_fault look as if writing in certain sparc-leon +versions */ + && !text_fault +#endif + ) {if (!(vma->vm_flags &VM_WRITE )) goto bad_area; }else {
Signature · 1 line
1.4.2.1