[PATCH v4] PPC: use CURRENT_THREAD_INFO instead of open coded assembly
Paul Mackerras
paulus at samba.org
Fri Jul 13 08:45:56 EST 2012
On Thu, Jul 05, 2012 at 09:41:35AM -0500, Stuart Yoder wrote:
> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
> index ba3aeb4..bad42e3 100644
> --- a/arch/powerpc/kernel/entry_32.S
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -92,7 +92,7 @@ crit_transfer_to_handler:
> mfspr r8,SPRN_SPRG_THREAD
> lwz r0,KSP_LIMIT(r8)
> stw r0,SAVED_KSP_LIMIT(r11)
> - rlwimi r0,r1,0,0,(31-THREAD_SHIFT)
> + CURRENT_THREAD_INFO(r0, r1)
> stw r0,KSP_LIMIT(r8)
> /* fall through */
> #endif
> @@ -112,7 +112,7 @@ crit_transfer_to_handler:
> mfspr r8,SPRN_SPRG_THREAD
> lwz r0,KSP_LIMIT(r8)
> stw r0,saved_ksp_limit at l(0)
> - rlwimi r0,r1,0,0,(31-THREAD_SHIFT)
> + CURRENT_THREAD_INFO(r0, r1)
> stw r0,KSP_LIMIT(r8)
> /* fall through */
> #endif
Do you really mean to replace a rlwimi with a rlwinm? If so, is that
because the rlwinm is a bug fix, or is it because you know something
special about KSP_LIMIT(r8) which means that rlwinm and rlwimi are
equivalent here?
Paul.
More information about the Linuxppc-dev
mailing list