Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>,
	<linux-mips@linux-mips.org>, <macro@linux-mips.org>,
	<markos.chandras@imgtec.com>, <ralf@linux-mips.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MIPS64: R6: R2 emulation bugfix
Date: Wed, 29 Apr 2015 10:17:51 +0100	[thread overview]
Message-ID: <5540A1BF.7060408@imgtec.com> (raw)
In-Reply-To: <20150428195335.11229.4516.stgit@ubuntu-yegoshin>

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
From: James Hogan <james.hogan@imgtec.com>
To: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>,
	linux-mips@linux-mips.org, macro@linux-mips.org,
	markos.chandras@imgtec.com, ralf@linux-mips.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS64: R6: R2 emulation bugfix
Date: Wed, 29 Apr 2015 10:17:51 +0100	[thread overview]
Message-ID: <5540A1BF.7060408@imgtec.com> (raw)
Message-ID: <20150429091751.295YJOZCb8KEOD4xiPq2hZcras5Bv2u1ijktoR4H-wY@z> (raw)
In-Reply-To: <20150428195335.11229.4516.stgit@ubuntu-yegoshin>

[-- 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 --]

  parent reply	other threads:[~2015-04-29  9:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5540A1BF.7060408@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=Leonid.Yegoshin@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox