summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-23 16:45:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-23 17:19:07 +0200
commit965ef82015a8bb1c04c8066c65af7feab5e68ed6 (patch)
tree6e91ee840432d9cdcc336b5f233605992967f358
parentscore: Include missing <rtems/score/address.h> (diff)
downloadrtems-965ef82015a8bb1c04c8066c65af7feab5e68ed6.tar.bz2
score: PR1782: CPU_USE_DEFERRED_FP_SWITCH
Do not redefine CPU_USE_DEFERRED_FP_SWITCH.
-rw-r--r--cpukit/score/cpu/i386/rtems/score/cpu.h6
-rw-r--r--cpukit/score/cpu/sparc/rtems/score/cpu.h6
-rw-r--r--cpukit/score/include/rtems/score/percpu.h4
-rw-r--r--cpukit/score/include/rtems/score/thread.h9
4 files changed, 14 insertions, 11 deletions
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 5bd14c347a..30a9a641fb 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -93,7 +93,11 @@ extern "C" {
#define CPU_ALL_TASKS_ARE_FP FALSE
#define CPU_IDLE_TASK_IS_FP FALSE
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
+#if defined(RTEMS_SMP)
+ #define CPU_USE_DEFERRED_FP_SWITCH FALSE
+#else
+ #define CPU_USE_DEFERRED_FP_SWITCH TRUE
+#endif
#endif /* __SSE__ */
#define CPU_STACK_GROWS_UP FALSE
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index c0a8d0a9e8..20040a9485 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -168,7 +168,11 @@ extern "C" {
* On the SPARC, we can disable the FPU for integer only tasks so
* it is safe to defer floating point context switches.
*/
-#define CPU_USE_DEFERRED_FP_SWITCH TRUE
+#if defined(RTEMS_SMP)
+ #define CPU_USE_DEFERRED_FP_SWITCH FALSE
+#else
+ #define CPU_USE_DEFERRED_FP_SWITCH TRUE
+#endif
/**
* Does this port provide a CPU dependent IDLE task implementation?
diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h
index 383202c328..d44c7a19ff 100644
--- a/cpukit/score/include/rtems/score/percpu.h
+++ b/cpukit/score/include/rtems/score/percpu.h
@@ -55,6 +55,10 @@ typedef struct Thread_Control_struct Thread_Control;
#ifdef RTEMS_SMP
+#if CPU_USE_DEFERRED_FP_SWITCH == TRUE
+ #error "deferred FP switch not implemented for SMP"
+#endif
+
typedef enum {
/**
* @brief The per CPU controls are initialized to zero.
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 9ce8ad1fd1..4300d1a55d 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -50,15 +50,6 @@
#define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
#endif
-/*
- * Deferred floating point context switches are not currently
- * supported when in SMP configuration.
- */
-#if defined(RTEMS_SMP)
- #undef CPU_USE_DEFERRED_FP_SWITCH
- #define CPU_USE_DEFERRED_FP_SWITCH FALSE
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif