public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] RT: remove finish_arch_switch
@ 2008-01-15 22:20 Frank Rowand
  2008-01-16  2:14 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Rowand @ 2008-01-15 22:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, tglx

From: Frank Rowand <frank.rowand@am.sony.com>

This is probably just a temporary workaround for one procssor - the MIPS
community will most likely want to architect a solution to this issue.

Make of preempt kernel barfs in kernel/sched.c ifdef finish_arch_switch.
Remove the finish_arch_switch() for boards with TX49xx MIPS processor.

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
---
 include/asm-mips/mach-tx49xx/cpu-feature-overrides.h |    7 	7 +	0 -	0 !
 include/asm-mips/system.h                            |    3 	3 +	0 -	0 !
 2 files changed, 10 insertions(+)

Index: linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
===================================================================
--- linux-2.6.24-rc7.orig/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
+++ linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
@@ -1,6 +1,13 @@
 #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
 #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
 
+/* finish_arch_switch_empty is defined if we know finish_arch_switch() will
+ * be empty, based on the lack of features defined in this file.  This is
+ * needed because config preempt will barf in kernel/sched.c ifdef
+ * finish_arch_switch
+ */
+#define finish_arch_switch_empty
+
 #define cpu_has_llsc	1
 #define cpu_has_64bits	1
 #define cpu_has_inclusive_pcaches	0
Index: linux-2.6.24-rc7/include/asm-mips/system.h
===================================================================
--- linux-2.6.24-rc7.orig/include/asm-mips/system.h
+++ linux-2.6.24-rc7/include/asm-mips/system.h
@@ -70,6 +70,8 @@ do {									\
 	(last) = resume(prev, next, task_thread_info(next));		\
 } while (0)
 
+/* preempt kernel barfs in kernel/sched.c ifdef finish_arch_switch */
+#ifndef finish_arch_switch_empty
 #define finish_arch_switch(prev)					\
 do {									\
 	if (cpu_has_dsp)						\
@@ -77,6 +79,7 @@ do {									\
 	if (cpu_has_userlocal)						\
 		write_c0_userlocal(current_thread_info()->tp_value);	\
 } while (0)
+#endif
 
 static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
 {




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

* Re: [PATCH 3/4] RT: remove finish_arch_switch
  2008-01-15 22:20 [PATCH 3/4] RT: remove finish_arch_switch Frank Rowand
@ 2008-01-16  2:14 ` Steven Rostedt
  2008-01-16  2:17   ` Rowand, Frank
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2008-01-16  2:14 UTC (permalink / raw)
  To: Frank Rowand; +Cc: linux-kernel, mingo, tglx

On Tue, Jan 15, 2008 at 02:20:46PM -0800, Frank Rowand wrote:
> From: Frank Rowand <frank.rowand@am.sony.com>
> 
> 
> Index: linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> ===================================================================
> --- linux-2.6.24-rc7.orig/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> +++ linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> @@ -1,6 +1,13 @@
>  #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
>  #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
>  
> +/* finish_arch_switch_empty is defined if we know finish_arch_switch() will
> + * be empty, based on the lack of features defined in this file.  This is
> + * needed because config preempt will barf in kernel/sched.c ifdef
> + * finish_arch_switch
> + */
> +#define finish_arch_switch_empty
> +
>  #define cpu_has_llsc	1
>  #define cpu_has_64bits	1
>  #define cpu_has_inclusive_pcaches	0
> Index: linux-2.6.24-rc7/include/asm-mips/system.h
> ===================================================================
> --- linux-2.6.24-rc7.orig/include/asm-mips/system.h
> +++ linux-2.6.24-rc7/include/asm-mips/system.h
> @@ -70,6 +70,8 @@ do {									\
>  	(last) = resume(prev, next, task_thread_info(next));		\
>  } while (0)
>  
> +/* preempt kernel barfs in kernel/sched.c ifdef finish_arch_switch */
> +#ifndef finish_arch_switch_empty

I'll take this patch for now, but currently it looks like a hack. I know
you said that, but I'm hoping someone will come up with a better
solution.

Thanks,

-- Steve

>  #define finish_arch_switch(prev)					\
>  do {									\
>  	if (cpu_has_dsp)						\
> @@ -77,6 +79,7 @@ do {									\
>  	if (cpu_has_userlocal)						\
>  		write_c0_userlocal(current_thread_info()->tp_value);	\
>  } while (0)
> +#endif
>  
>  static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
>  {
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* RE: [PATCH 3/4] RT: remove finish_arch_switch
  2008-01-16  2:14 ` Steven Rostedt
@ 2008-01-16  2:17   ` Rowand, Frank
  0 siblings, 0 replies; 3+ messages in thread
From: Rowand, Frank @ 2008-01-16  2:17 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-kernel, mingo, tglx

Steve,

Thanks, I'll bring this up over on the linux-mips list to see how they
really want to handle it.

-Frank


-----Original Message-----
From: Steven Rostedt [mailto:rostedt@goodmis.org]
Sent: Tue 1/15/2008 6:14 PM
To: Rowand, Frank
Cc: linux-kernel@vger.kernel.org; mingo@redhat.com; tglx@linutronix.de
Subject: Re: [PATCH 3/4] RT: remove finish_arch_switch
 
On Tue, Jan 15, 2008 at 02:20:46PM -0800, Frank Rowand wrote:
> From: Frank Rowand <frank.rowand@am.sony.com>
> 
> 
> Index: linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> ===================================================================
> --- linux-2.6.24-rc7.orig/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> +++ linux-2.6.24-rc7/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h
> @@ -1,6 +1,13 @@
>  #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
>  #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H
>  
> +/* finish_arch_switch_empty is defined if we know finish_arch_switch() will
> + * be empty, based on the lack of features defined in this file.  This is
> + * needed because config preempt will barf in kernel/sched.c ifdef
> + * finish_arch_switch
> + */
> +#define finish_arch_switch_empty
> +
>  #define cpu_has_llsc	1
>  #define cpu_has_64bits	1
>  #define cpu_has_inclusive_pcaches	0
> Index: linux-2.6.24-rc7/include/asm-mips/system.h
> ===================================================================
> --- linux-2.6.24-rc7.orig/include/asm-mips/system.h
> +++ linux-2.6.24-rc7/include/asm-mips/system.h
> @@ -70,6 +70,8 @@ do {									\
>  	(last) = resume(prev, next, task_thread_info(next));		\
>  } while (0)
>  
> +/* preempt kernel barfs in kernel/sched.c ifdef finish_arch_switch */
> +#ifndef finish_arch_switch_empty

I'll take this patch for now, but currently it looks like a hack. I know
you said that, but I'm hoping someone will come up with a better
solution.

Thanks,

-- Steve

>  #define finish_arch_switch(prev)					\
>  do {									\
>  	if (cpu_has_dsp)						\
> @@ -77,6 +79,7 @@ do {									\
>  	if (cpu_has_userlocal)						\
>  		write_c0_userlocal(current_thread_info()->tp_value);	\
>  } while (0)
> +#endif
>  
>  static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
>  {
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/




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

end of thread, other threads:[~2008-01-16  2:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-15 22:20 [PATCH 3/4] RT: remove finish_arch_switch Frank Rowand
2008-01-16  2:14 ` Steven Rostedt
2008-01-16  2:17   ` Rowand, Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox