All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-28 19:53 ` Leonid Yegoshin
  0 siblings, 0 replies; 11+ messages in thread
From: Leonid Yegoshin @ 2015-04-28 19:53 UTC (permalink / raw)
  To: linux-mips, macro, markos.chandras, ralf, linux-kernel

Error recovery pointers for fixups was improperly set as ".word"
which is unsuitable for MIPS64.

Replaced by __stringify(PTR)

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
---
 arch/mips/kernel/mips-r2-to-r6-emul.c |  104 +++++++++++++++++----------------
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c
index f2977f00911b..c6f079f8f3dc 100644
--- a/arch/mips/kernel/mips-r2-to-r6-emul.c
+++ b/arch/mips/kernel/mips-r2-to-r6-emul.c
@@ -1250,10 +1250,10 @@ fpu_emul:
 			"	j	10b\n"
 			"	.previous\n"
 			"	.section	__ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1325,10 +1325,10 @@ fpu_emul:
 			"	j	10b\n"
 			"       .previous\n"
 			"	.section	__ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1396,10 +1396,10 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1466,10 +1466,10 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1581,14 +1581,14 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
-			"	.word	5b,8b\n"
-			"	.word	6b,8b\n"
-			"	.word	7b,8b\n"
-			"	.word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1700,14 +1700,14 @@ fpu_emul:
 			"	j      9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word  1b,8b\n"
-			"	.word  2b,8b\n"
-			"	.word  3b,8b\n"
-			"	.word  4b,8b\n"
-			"	.word  5b,8b\n"
-			"	.word  6b,8b\n"
-			"	.word  7b,8b\n"
-			"	.word  0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set    pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1819,14 +1819,14 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
-			"	.word	5b,8b\n"
-			"	.word	6b,8b\n"
-			"	.word	7b,8b\n"
-			"	.word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1937,14 +1937,14 @@ fpu_emul:
 			"       j	9b\n"
 			"       .previous\n"
 			"       .section        __ex_table,\"a\"\n"
-			"       .word	1b,8b\n"
-			"       .word	2b,8b\n"
-			"       .word	3b,8b\n"
-			"       .word	4b,8b\n"
-			"       .word	5b,8b\n"
-			"       .word	6b,8b\n"
-			"       .word	7b,8b\n"
-			"       .word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"       .previous\n"
 			"       .set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1999,7 +1999,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word  1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "=&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV)
@@ -2057,7 +2057,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word	1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "+&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV));
@@ -2118,7 +2118,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word  1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "=&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV)
@@ -2181,7 +2181,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word	1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "+&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV));


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

* [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-28 19:53 ` Leonid Yegoshin
  0 siblings, 0 replies; 11+ messages in thread
From: Leonid Yegoshin @ 2015-04-28 19:53 UTC (permalink / raw)
  To: linux-mips, macro, markos.chandras, ralf, linux-kernel

Error recovery pointers for fixups was improperly set as ".word"
which is unsuitable for MIPS64.

Replaced by __stringify(PTR)

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
---
 arch/mips/kernel/mips-r2-to-r6-emul.c |  104 +++++++++++++++++----------------
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c
index f2977f00911b..c6f079f8f3dc 100644
--- a/arch/mips/kernel/mips-r2-to-r6-emul.c
+++ b/arch/mips/kernel/mips-r2-to-r6-emul.c
@@ -1250,10 +1250,10 @@ fpu_emul:
 			"	j	10b\n"
 			"	.previous\n"
 			"	.section	__ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1325,10 +1325,10 @@ fpu_emul:
 			"	j	10b\n"
 			"       .previous\n"
 			"	.section	__ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1396,10 +1396,10 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1466,10 +1466,10 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1581,14 +1581,14 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
-			"	.word	5b,8b\n"
-			"	.word	6b,8b\n"
-			"	.word	7b,8b\n"
-			"	.word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1700,14 +1700,14 @@ fpu_emul:
 			"	j      9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word  1b,8b\n"
-			"	.word  2b,8b\n"
-			"	.word  3b,8b\n"
-			"	.word  4b,8b\n"
-			"	.word  5b,8b\n"
-			"	.word  6b,8b\n"
-			"	.word  7b,8b\n"
-			"	.word  0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set    pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1819,14 +1819,14 @@ fpu_emul:
 			"	j	9b\n"
 			"	.previous\n"
 			"	.section        __ex_table,\"a\"\n"
-			"	.word	1b,8b\n"
-			"	.word	2b,8b\n"
-			"	.word	3b,8b\n"
-			"	.word	4b,8b\n"
-			"	.word	5b,8b\n"
-			"	.word	6b,8b\n"
-			"	.word	7b,8b\n"
-			"	.word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"	.previous\n"
 			"	.set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1937,14 +1937,14 @@ fpu_emul:
 			"       j	9b\n"
 			"       .previous\n"
 			"       .section        __ex_table,\"a\"\n"
-			"       .word	1b,8b\n"
-			"       .word	2b,8b\n"
-			"       .word	3b,8b\n"
-			"       .word	4b,8b\n"
-			"       .word	5b,8b\n"
-			"       .word	6b,8b\n"
-			"       .word	7b,8b\n"
-			"       .word	0b,8b\n"
+			__stringify(PTR) " 1b,8b\n"
+			__stringify(PTR) " 2b,8b\n"
+			__stringify(PTR) " 3b,8b\n"
+			__stringify(PTR) " 4b,8b\n"
+			__stringify(PTR) " 5b,8b\n"
+			__stringify(PTR) " 6b,8b\n"
+			__stringify(PTR) " 7b,8b\n"
+			__stringify(PTR) " 0b,8b\n"
 			"       .previous\n"
 			"       .set	pop\n"
 			: "+&r"(rt), "=&r"(rs),
@@ -1999,7 +1999,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word  1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "=&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV)
@@ -2057,7 +2057,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word	1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "+&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV));
@@ -2118,7 +2118,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word  1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "=&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV)
@@ -2181,7 +2181,7 @@ fpu_emul:
 			"j	2b\n"
 			".previous\n"
 			".section        __ex_table,\"a\"\n"
-			".word	1b, 3b\n"
+			__stringify(PTR) " 1b,3b\n"
 			".previous\n"
 			: "+&r"(res), "+&r"(err)
 			: "r"(vaddr), "i"(SIGSEGV));

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29  9:17   ` James Hogan
  0 siblings, 0 replies; 11+ messages in thread
From: James Hogan @ 2015-04-29  9:17 UTC (permalink / raw)
  To: Leonid Yegoshin, linux-mips, macro, markos.chandras, ralf, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6574 bytes --]

Hi Leonid,

On 28/04/15 20:53, Leonid Yegoshin wrote:
> Error recovery pointers for fixups was improperly set as ".word"
> which is unsuitable for MIPS64.
> 
> Replaced by __stringify(PTR)

Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
uaccess.h). Can we stick to STR(PTR) for consistency please?

With that change made:
Reviewed-by: James Hogan <james.hogan@imgtec.com>

Please also add these tags:

Fixes: b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6")
Cc: <stable@vger.kernel.org> # 4.0+

Thanks
James

> 
> Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> ---
>  arch/mips/kernel/mips-r2-to-r6-emul.c |  104 +++++++++++++++++----------------
>  1 file changed, 52 insertions(+), 52 deletions(-)
> 
> diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c
> index f2977f00911b..c6f079f8f3dc 100644
> --- a/arch/mips/kernel/mips-r2-to-r6-emul.c
> +++ b/arch/mips/kernel/mips-r2-to-r6-emul.c
> @@ -1250,10 +1250,10 @@ fpu_emul:
>  			"	j	10b\n"
>  			"	.previous\n"
>  			"	.section	__ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1325,10 +1325,10 @@ fpu_emul:
>  			"	j	10b\n"
>  			"       .previous\n"
>  			"	.section	__ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1396,10 +1396,10 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1466,10 +1466,10 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1581,14 +1581,14 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> -			"	.word	5b,8b\n"
> -			"	.word	6b,8b\n"
> -			"	.word	7b,8b\n"
> -			"	.word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1700,14 +1700,14 @@ fpu_emul:
>  			"	j      9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word  1b,8b\n"
> -			"	.word  2b,8b\n"
> -			"	.word  3b,8b\n"
> -			"	.word  4b,8b\n"
> -			"	.word  5b,8b\n"
> -			"	.word  6b,8b\n"
> -			"	.word  7b,8b\n"
> -			"	.word  0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set    pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1819,14 +1819,14 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> -			"	.word	5b,8b\n"
> -			"	.word	6b,8b\n"
> -			"	.word	7b,8b\n"
> -			"	.word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1937,14 +1937,14 @@ fpu_emul:
>  			"       j	9b\n"
>  			"       .previous\n"
>  			"       .section        __ex_table,\"a\"\n"
> -			"       .word	1b,8b\n"
> -			"       .word	2b,8b\n"
> -			"       .word	3b,8b\n"
> -			"       .word	4b,8b\n"
> -			"       .word	5b,8b\n"
> -			"       .word	6b,8b\n"
> -			"       .word	7b,8b\n"
> -			"       .word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"       .previous\n"
>  			"       .set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1999,7 +1999,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word  1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "=&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV)
> @@ -2057,7 +2057,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word	1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "+&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV));
> @@ -2118,7 +2118,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word  1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "=&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV)
> @@ -2181,7 +2181,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word	1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "+&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV));
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29  9:17   ` James Hogan
  0 siblings, 0 replies; 11+ messages in thread
From: James Hogan @ 2015-04-29  9:17 UTC (permalink / raw)
  To: Leonid Yegoshin, linux-mips, macro, markos.chandras, ralf, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6574 bytes --]

Hi Leonid,

On 28/04/15 20:53, Leonid Yegoshin wrote:
> Error recovery pointers for fixups was improperly set as ".word"
> which is unsuitable for MIPS64.
> 
> Replaced by __stringify(PTR)

Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
uaccess.h). Can we stick to STR(PTR) for consistency please?

With that change made:
Reviewed-by: James Hogan <james.hogan@imgtec.com>

Please also add these tags:

Fixes: b0a668fb2038 ("MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6")
Cc: <stable@vger.kernel.org> # 4.0+

Thanks
James

> 
> Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> ---
>  arch/mips/kernel/mips-r2-to-r6-emul.c |  104 +++++++++++++++++----------------
>  1 file changed, 52 insertions(+), 52 deletions(-)
> 
> diff --git a/arch/mips/kernel/mips-r2-to-r6-emul.c b/arch/mips/kernel/mips-r2-to-r6-emul.c
> index f2977f00911b..c6f079f8f3dc 100644
> --- a/arch/mips/kernel/mips-r2-to-r6-emul.c
> +++ b/arch/mips/kernel/mips-r2-to-r6-emul.c
> @@ -1250,10 +1250,10 @@ fpu_emul:
>  			"	j	10b\n"
>  			"	.previous\n"
>  			"	.section	__ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1325,10 +1325,10 @@ fpu_emul:
>  			"	j	10b\n"
>  			"       .previous\n"
>  			"	.section	__ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1396,10 +1396,10 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1466,10 +1466,10 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1581,14 +1581,14 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> -			"	.word	5b,8b\n"
> -			"	.word	6b,8b\n"
> -			"	.word	7b,8b\n"
> -			"	.word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1700,14 +1700,14 @@ fpu_emul:
>  			"	j      9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word  1b,8b\n"
> -			"	.word  2b,8b\n"
> -			"	.word  3b,8b\n"
> -			"	.word  4b,8b\n"
> -			"	.word  5b,8b\n"
> -			"	.word  6b,8b\n"
> -			"	.word  7b,8b\n"
> -			"	.word  0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set    pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1819,14 +1819,14 @@ fpu_emul:
>  			"	j	9b\n"
>  			"	.previous\n"
>  			"	.section        __ex_table,\"a\"\n"
> -			"	.word	1b,8b\n"
> -			"	.word	2b,8b\n"
> -			"	.word	3b,8b\n"
> -			"	.word	4b,8b\n"
> -			"	.word	5b,8b\n"
> -			"	.word	6b,8b\n"
> -			"	.word	7b,8b\n"
> -			"	.word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"	.previous\n"
>  			"	.set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1937,14 +1937,14 @@ fpu_emul:
>  			"       j	9b\n"
>  			"       .previous\n"
>  			"       .section        __ex_table,\"a\"\n"
> -			"       .word	1b,8b\n"
> -			"       .word	2b,8b\n"
> -			"       .word	3b,8b\n"
> -			"       .word	4b,8b\n"
> -			"       .word	5b,8b\n"
> -			"       .word	6b,8b\n"
> -			"       .word	7b,8b\n"
> -			"       .word	0b,8b\n"
> +			__stringify(PTR) " 1b,8b\n"
> +			__stringify(PTR) " 2b,8b\n"
> +			__stringify(PTR) " 3b,8b\n"
> +			__stringify(PTR) " 4b,8b\n"
> +			__stringify(PTR) " 5b,8b\n"
> +			__stringify(PTR) " 6b,8b\n"
> +			__stringify(PTR) " 7b,8b\n"
> +			__stringify(PTR) " 0b,8b\n"
>  			"       .previous\n"
>  			"       .set	pop\n"
>  			: "+&r"(rt), "=&r"(rs),
> @@ -1999,7 +1999,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word  1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "=&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV)
> @@ -2057,7 +2057,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word	1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "+&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV));
> @@ -2118,7 +2118,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word  1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "=&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV)
> @@ -2181,7 +2181,7 @@ fpu_emul:
>  			"j	2b\n"
>  			".previous\n"
>  			".section        __ex_table,\"a\"\n"
> -			".word	1b, 3b\n"
> +			__stringify(PTR) " 1b,3b\n"
>  			".previous\n"
>  			: "+&r"(res), "+&r"(err)
>  			: "r"(vaddr), "i"(SIGSEGV));
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
  2015-04-29  9:17   ` James Hogan
  (?)
@ 2015-04-29  9:49   ` Maciej W. Rozycki
  2015-04-29 15:12       ` Markos Chandras
                       ` (2 more replies)
  -1 siblings, 3 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2015-04-29  9:49 UTC (permalink / raw)
  To: James Hogan
  Cc: Leonid Yegoshin, linux-mips, markos.chandras, Ralf Baechle, linux-kernel

On Wed, 29 Apr 2015, James Hogan wrote:

> > Error recovery pointers for fixups was improperly set as ".word"
> > which is unsuitable for MIPS64.
> > 
> > Replaced by __stringify(PTR)
> 
> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
> uaccess.h). Can we stick to STR(PTR) for consistency please?

 Or __PA_ADDR in paccess.h.

 I have mixed feelings, the reason for __stringify being absent is the 
macro being generic and more recently added than pieces of code that use 
STR, e.g. unaligned.c that has been there since forever.  And we do use 
__stringify in many other cases.

 On the other hand STR is short and sweet, unlike __stringify.

 So how about adding a macro like __STR_PTR that expands to 
__stringify(PTR) and converting all the places throughout our port 
(including ones currently using __UA_ADDR/__PA_ADDR) to use the new macro?

 Leonid's bug fix will need to go in first of course.

  Maciej

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29 15:12       ` Markos Chandras
  0 siblings, 0 replies; 11+ messages in thread
From: Markos Chandras @ 2015-04-29 15:12 UTC (permalink / raw)
  To: Maciej W. Rozycki, James Hogan
  Cc: Leonid Yegoshin, linux-mips, Ralf Baechle, linux-kernel

On 04/29/2015 10:49 AM, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
> 
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>>
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
> 
>  Or __PA_ADDR in paccess.h.
> 
>  I have mixed feelings, the reason for __stringify being absent is the 
> macro being generic and more recently added than pieces of code that use 
> STR, e.g. unaligned.c that has been there since forever.  And we do use 
> __stringify in many other cases.
> 
>  On the other hand STR is short and sweet, unlike __stringify.

The patch overall looks good to me so here is my

Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>

I do agree with James that it would be nice to have it in stable 4.0+ as
well.

I don't particularly care if STR() is going to be used at the end or we
stick to __stringify. Both are used in arch/mips/* anyway

-- 
markos

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29 15:12       ` Markos Chandras
  0 siblings, 0 replies; 11+ messages in thread
From: Markos Chandras @ 2015-04-29 15:12 UTC (permalink / raw)
  To: Maciej W. Rozycki, James Hogan
  Cc: Leonid Yegoshin, linux-mips, Ralf Baechle, linux-kernel

On 04/29/2015 10:49 AM, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
> 
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>>
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
> 
>  Or __PA_ADDR in paccess.h.
> 
>  I have mixed feelings, the reason for __stringify being absent is the 
> macro being generic and more recently added than pieces of code that use 
> STR, e.g. unaligned.c that has been there since forever.  And we do use 
> __stringify in many other cases.
> 
>  On the other hand STR is short and sweet, unlike __stringify.

The patch overall looks good to me so here is my

Reviewed-by: Markos Chandras <markos.chandras@imgtec.com>

I do agree with James that it would be nice to have it in stable 4.0+ as
well.

I don't particularly care if STR() is going to be used at the end or we
stick to __stringify. Both are used in arch/mips/* anyway

-- 
markos

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29 15:36       ` James Hogan
  0 siblings, 0 replies; 11+ messages in thread
From: James Hogan @ 2015-04-29 15:36 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: Leonid Yegoshin, linux-mips, markos.chandras, Ralf Baechle, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

On 29/04/15 10:49, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
> 
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>>
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
> 
>  Or __PA_ADDR in paccess.h.
> 
>  I have mixed feelings, the reason for __stringify being absent is the 
> macro being generic and more recently added than pieces of code that use 
> STR, e.g. unaligned.c that has been there since forever.  And we do use 
> __stringify in many other cases.

Well I don't particularly mind, so feel free to add my Reviewed-by
regardless, though it'd be nice to have some consistency eventually one
way or another.

Cheers
James

> 
>  On the other hand STR is short and sweet, unlike __stringify.
> 
>  So how about adding a macro like __STR_PTR that expands to 
> __stringify(PTR) and converting all the places throughout our port 
> (including ones currently using __UA_ADDR/__PA_ADDR) to use the new macro?
> 
>  Leonid's bug fix will need to go in first of course.
> 
>   Maciej
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-29 15:36       ` James Hogan
  0 siblings, 0 replies; 11+ messages in thread
From: James Hogan @ 2015-04-29 15:36 UTC (permalink / raw)
  To: Maciej W. Rozycki
  Cc: Leonid Yegoshin, linux-mips, markos.chandras, Ralf Baechle, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]

On 29/04/15 10:49, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
> 
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>>
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
> 
>  Or __PA_ADDR in paccess.h.
> 
>  I have mixed feelings, the reason for __stringify being absent is the 
> macro being generic and more recently added than pieces of code that use 
> STR, e.g. unaligned.c that has been there since forever.  And we do use 
> __stringify in many other cases.

Well I don't particularly mind, so feel free to add my Reviewed-by
regardless, though it'd be nice to have some consistency eventually one
way or another.

Cheers
James

> 
>  On the other hand STR is short and sweet, unlike __stringify.
> 
>  So how about adding a macro like __STR_PTR that expands to 
> __stringify(PTR) and converting all the places throughout our port 
> (including ones currently using __UA_ADDR/__PA_ADDR) to use the new macro?
> 
>  Leonid's bug fix will need to go in first of course.
> 
>   Maciej
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-30 22:43       ` Leonid Yegoshin
  0 siblings, 0 replies; 11+ messages in thread
From: Leonid Yegoshin @ 2015-04-30 22:43 UTC (permalink / raw)
  To: Maciej W. Rozycki, James Hogan
  Cc: linux-mips, markos.chandras, Ralf Baechle, linux-kernel

On 04/29/2015 02:49 AM, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
>
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
>   Or __PA_ADDR in paccess.h.
>
>   I have mixed feelings, the reason for __stringify being absent is the
> macro being generic and more recently added than pieces of code that use
> STR, e.g. unaligned.c that has been there since forever.  And we do use
> __stringify in many other cases.
>
>   On the other hand STR is short and sweet, unlike __stringify.
>
>   So how about adding a macro like __STR_PTR that expands to
> __stringify(PTR) and converting all the places throughout our port
> (including ones currently using __UA_ADDR/__PA_ADDR) to use the new macro?
>
>   Leonid's bug fix will need to go in first of course.
>
>    Maciej
As for me, I don't mind which solution is - STR/__stringify or __PA_ADDR.
I just would like to have one for future submissions and I assumed that 
__stringify is it because it a last one so far introduced.

So, I put a decision to maintainer. Ralf?

- Leonid.

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

* Re: [PATCH] MIPS64: R6: R2 emulation bugfix
@ 2015-04-30 22:43       ` Leonid Yegoshin
  0 siblings, 0 replies; 11+ messages in thread
From: Leonid Yegoshin @ 2015-04-30 22:43 UTC (permalink / raw)
  To: Maciej W. Rozycki, James Hogan
  Cc: linux-mips, markos.chandras, Ralf Baechle, linux-kernel

On 04/29/2015 02:49 AM, Maciej W. Rozycki wrote:
> On Wed, 29 Apr 2015, James Hogan wrote:
>
>>> Error recovery pointers for fixups was improperly set as ".word"
>>> which is unsuitable for MIPS64.
>>>
>>> Replaced by __stringify(PTR)
>> Every other case of this sort of thing uses STR(PTR) (or __UA_ADDR in
>> uaccess.h). Can we stick to STR(PTR) for consistency please?
>   Or __PA_ADDR in paccess.h.
>
>   I have mixed feelings, the reason for __stringify being absent is the
> macro being generic and more recently added than pieces of code that use
> STR, e.g. unaligned.c that has been there since forever.  And we do use
> __stringify in many other cases.
>
>   On the other hand STR is short and sweet, unlike __stringify.
>
>   So how about adding a macro like __STR_PTR that expands to
> __stringify(PTR) and converting all the places throughout our port
> (including ones currently using __UA_ADDR/__PA_ADDR) to use the new macro?
>
>   Leonid's bug fix will need to go in first of course.
>
>    Maciej
As for me, I don't mind which solution is - STR/__stringify or __PA_ADDR.
I just would like to have one for future submissions and I assumed that 
__stringify is it because it a last one so far introduced.

So, I put a decision to maintainer. Ralf?

- Leonid.

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

end of thread, other threads:[~2015-04-30 22:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 19:53 [PATCH] MIPS64: R6: R2 emulation bugfix Leonid Yegoshin
2015-04-28 19:53 ` Leonid Yegoshin
2015-04-29  9:17 ` James Hogan
2015-04-29  9:17   ` James Hogan
2015-04-29  9:49   ` Maciej W. Rozycki
2015-04-29 15:12     ` Markos Chandras
2015-04-29 15:12       ` Markos Chandras
2015-04-29 15:36     ` James Hogan
2015-04-29 15:36       ` James Hogan
2015-04-30 22:43     ` Leonid Yegoshin
2015-04-30 22:43       ` Leonid Yegoshin

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.