* [PATCH] powerpc/32: Remove redundant test in transfer_to_handler()
@ 2017-04-14 13:31 Christophe Leroy
2017-04-18 11:27 ` Christophe LEROY
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2017-04-14 13:31 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Scott Wood
Cc: linux-kernel, linuxppc-dev
As stated in the comment on top of transfer_to_handler(),
all callers set cr0.eq if the exception occurred in kernel mode
(i.e. MSR:PR = 0)
Therefore, it is not needed to do the test again
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/kernel/entry_32.S | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index a38600949f3a..0651a7438fa6 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -141,7 +141,6 @@ transfer_to_handler:
stw r2,GPR2(r11)
stw r12,_NIP(r11)
stw r9,_MSR(r11)
- andi. r2,r9,MSR_PR
mfctr r12
mfspr r2,SPRN_XER
stw r12,_CTR(r11)
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/32: Remove redundant test in transfer_to_handler()
2017-04-14 13:31 [PATCH] powerpc/32: Remove redundant test in transfer_to_handler() Christophe Leroy
@ 2017-04-18 11:27 ` Christophe LEROY
0 siblings, 0 replies; 2+ messages in thread
From: Christophe LEROY @ 2017-04-18 11:27 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, Scott Wood
Cc: linux-kernel, linuxppc-dev
Le 14/04/2017 à 15:31, Christophe Leroy a écrit :
> As stated in the comment on top of transfer_to_handler(),
> all callers set cr0.eq if the exception occurred in kernel mode
> (i.e. MSR:PR = 0)
>
> Therefore, it is not needed to do the test again
Indeed, all callers set cr0.eq as required .... except that some of
them just destroy it by inserting another test before calling
transfer_to_handler().
So this patch cannot be applied as is at the time being.
Christophe
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/kernel/entry_32.S | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
> index a38600949f3a..0651a7438fa6 100644
> --- a/arch/powerpc/kernel/entry_32.S
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -141,7 +141,6 @@ transfer_to_handler:
> stw r2,GPR2(r11)
> stw r12,_NIP(r11)
> stw r9,_MSR(r11)
> - andi. r2,r9,MSR_PR
> mfctr r12
> mfspr r2,SPRN_XER
> stw r12,_CTR(r11)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-18 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 13:31 [PATCH] powerpc/32: Remove redundant test in transfer_to_handler() Christophe Leroy
2017-04-18 11:27 ` Christophe LEROY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).