linux-mips
[Top] [All Lists]

Re: [PATCH] [MIPS] Fix resume for 64K page size

To: pwatkins@sicortex.com
Subject: Re: [PATCH] [MIPS] Fix resume for 64K page size
From: Thiemo Seufer <ths@networkno.de>
Date: Tue, 10 Jul 2007 18:34:54 +0100
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, From:
In-reply-to: <11840880513393-git-send-email-pwatkins@sicortex.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <11840880513393-git-send-email-pwatkins@sicortex.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-11)
pwatkins@sicortex.com wrote:
> This fixes a bug when running 64K page size on r4k machines. 
> 
> 
> Signed-off-by: Peter Watkins <pwatkins@sicortex.com>
> ---
>  arch/mips/kernel/r4k_switch.S |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
> index 0672959..65f0f91 100644
> --- a/arch/mips/kernel/r4k_switch.S
> +++ b/arch/mips/kernel/r4k_switch.S
> @@ -85,7 +85,7 @@ #endif
>       move    $28, a2
>       cpu_restore_nonscratch a1
>  
> -#if (_THREAD_SIZE - 32) < 0x10000
> +#if (_THREAD_SIZE) < 0x10000
>       PTR_ADDIU       t0, $28, _THREAD_SIZE - 32
>  #else
>       PTR_LI          t0, _THREAD_SIZE - 32

This doesn't look right. I think it should be

#if (_THREAD_SIZE - 32) < 0x8000

in order to avoid an overflow of the immediate.


Thiemo

<Prev in Thread] Current Thread [Next in Thread>