All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in  the status register to figure out the stack for  saving regs.
@ 2012-10-31 15:20 Sanjay Lal
  2012-11-01 12:10 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sanjay Lal @ 2012-10-31 15:20 UTC (permalink / raw)
  To: kvm, linux-mips

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
---
 arch/mips/include/asm/stackframe.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
index cb41af5..59c9245 100644
--- a/arch/mips/include/asm/stackframe.h
+++ b/arch/mips/include/asm/stackframe.h
@@ -30,7 +30,7 @@
 #define STATMASK 0x1f
 #endif
 
-#ifdef CONFIG_MIPS_MT_SMTC
+#if defined(CONFIG_MIPS_MT_SMTC) || defined (CONFIG_MIPS_HW_FIBERS)
 #include <asm/mipsmtregs.h>
 #endif /* CONFIG_MIPS_MT_SMTC */
 
@@ -162,9 +162,9 @@
 		.set	noat
 		.set	reorder
 		mfc0	k0, CP0_STATUS
-		sll	k0, 3		/* extract cu0 bit */
+		andi    k0,k0,0x10 		/* check user mode bit*/
 		.set	noreorder
-		bltz	k0, 8f
+         beq     k0, $0, 8f
 		 move	k1, sp
 		.set	reorder
 		/* Called from user mode, new stack. */
-- 
1.7.11.3

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

* Re: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for  saving regs.
  2012-10-31 15:20 [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs Sanjay Lal
@ 2012-11-01 12:10 ` Sergei Shtylyov
  2012-11-01 12:11 ` Sergei Shtylyov
  2012-11-03  1:11 ` Maciej W. Rozycki
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2012-11-01 12:10 UTC (permalink / raw)
  To: Sanjay Lal; +Cc: kvm, linux-mips

Hello.

On 31-10-2012 19:20, Sanjay Lal wrote:

> Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
> ---
>   arch/mips/include/asm/stackframe.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

> diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
> index cb41af5..59c9245 100644
> --- a/arch/mips/include/asm/stackframe.h
> +++ b/arch/mips/include/asm/stackframe.h
[...]
> @@ -162,9 +162,9 @@
>   		.set	noat
>   		.set	reorder
>   		mfc0	k0, CP0_STATUS
> -		sll	k0, 3		/* extract cu0 bit */
> +		andi    k0,k0,0x10 		/* check user mode bit*/
>   		.set	noreorder
> -		bltz	k0, 8f
> +         beq     k0, $0, 8f

    Use tabs, not spaces to indent the code, same as above.

WBR, Sergei

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

* Re: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for  saving regs.
  2012-10-31 15:20 [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs Sanjay Lal
  2012-11-01 12:10 ` Sergei Shtylyov
@ 2012-11-01 12:11 ` Sergei Shtylyov
  2012-11-03  1:11 ` Maciej W. Rozycki
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2012-11-01 12:11 UTC (permalink / raw)
  To: Sanjay Lal; +Cc: kvm, linux-mips

On 31-10-2012 19:20, Sanjay Lal wrote:

> Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
> ---
>   arch/mips/include/asm/stackframe.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

> diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
> index cb41af5..59c9245 100644
> --- a/arch/mips/include/asm/stackframe.h
> +++ b/arch/mips/include/asm/stackframe.h
> @@ -30,7 +30,7 @@
>   #define STATMASK 0x1f
>   #endif
>
> -#ifdef CONFIG_MIPS_MT_SMTC
> +#if defined(CONFIG_MIPS_MT_SMTC) || defined (CONFIG_MIPS_HW_FIBERS)

    Does this change have anything to do with the patch subject?

WBR, Sergei

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

* Re: [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in  the status register to figure out the stack for  saving regs.
  2012-10-31 15:20 [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs Sanjay Lal
  2012-11-01 12:10 ` Sergei Shtylyov
  2012-11-01 12:11 ` Sergei Shtylyov
@ 2012-11-03  1:11 ` Maciej W. Rozycki
  2 siblings, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2012-11-03  1:11 UTC (permalink / raw)
  To: Sanjay Lal; +Cc: kvm, linux-mips

On Wed, 31 Oct 2012, Sanjay Lal wrote:

> diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h
> index cb41af5..59c9245 100644
> --- a/arch/mips/include/asm/stackframe.h
> +++ b/arch/mips/include/asm/stackframe.h
> @@ -30,7 +30,7 @@
>  #define STATMASK 0x1f
>  #endif
>  
> -#ifdef CONFIG_MIPS_MT_SMTC
> +#if defined(CONFIG_MIPS_MT_SMTC) || defined (CONFIG_MIPS_HW_FIBERS)
>  #include <asm/mipsmtregs.h>
>  #endif /* CONFIG_MIPS_MT_SMTC */
>  
> @@ -162,9 +162,9 @@
>  		.set	noat
>  		.set	reorder
>  		mfc0	k0, CP0_STATUS
> -		sll	k0, 3		/* extract cu0 bit */
> +		andi    k0,k0,0x10 		/* check user mode bit*/
>  		.set	noreorder
> -		bltz	k0, 8f
> +         beq     k0, $0, 8f
>  		 move	k1, sp
>  		.set	reorder
>  		/* Called from user mode, new stack. */

 Any reason this is needed for?  If so, then given that this is generic 
code a corresponding piece has to be added to support the MIPS I ISA 
processors that have the user mode bit in a different location.  
Presumably you'll update all the other places that fiddle with 
CP0.Status.CU0 too?

  Maciej

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

end of thread, other threads:[~2012-11-03  1:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 15:20 [PATCH 14/20] MIPS: Use the UM bit instead of the CU0 enable bit in the status register to figure out the stack for saving regs Sanjay Lal
2012-11-01 12:10 ` Sergei Shtylyov
2012-11-01 12:11 ` Sergei Shtylyov
2012-11-03  1:11 ` Maciej W. Rozycki

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.