[rtems commit] score: Remove CPU_PROVIDES_IDLE_THREAD_BODY

Sebastian Huber sebh at rtems.org
Mon Oct 8 05:15:24 UTC 2018


Module:    rtems
Branch:    master
Commit:    8776bb94197613a369b47b3adf4b2d4e0ba766ed
Changeset: http://git.rtems.org/rtems/commit/?id=8776bb94197613a369b47b3adf4b2d4e0ba766ed

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 26 06:34:54 2018 +0200

score: Remove CPU_PROVIDES_IDLE_THREAD_BODY

Remove the CPU_PROVIDES_IDLE_THREAD_BODY option to avoid unnecessary
conditional compilation.

Close #3539.

---

 cpukit/include/rtems/confdefs.h                    | 12 +-----
 cpukit/include/rtems/score/thread.h                | 11 ------
 cpukit/score/cpu/arm/armv7-thread-idle.c           |  6 +--
 cpukit/score/cpu/arm/include/rtems/score/cpu.h     | 10 +----
 cpukit/score/cpu/bfin/cpu.c                        |  2 -
 cpukit/score/cpu/bfin/include/rtems/score/cpu.h    | 36 ------------------
 .../score/cpu/epiphany/include/rtems/score/cpu.h   | 34 -----------------
 cpukit/score/cpu/i386/Makefile.am                  |  1 +
 cpukit/score/cpu/i386/include/rtems/score/cpu.h    | 23 ------------
 cpukit/score/cpu/lm32/include/rtems/score/cpu.h    | 36 ------------------
 cpukit/score/cpu/m32c/include/rtems/score/cpu.h    | 36 ------------------
 cpukit/score/cpu/m68k/include/rtems/score/cpu.h    | 10 -----
 cpukit/score/cpu/mips/include/rtems/score/cpu.h    | 33 -----------------
 cpukit/score/cpu/moxie/Makefile.am                 |  1 +
 cpukit/score/cpu/moxie/include/rtems/score/cpu.h   | 43 +---------------------
 cpukit/score/cpu/nios2/Makefile.am                 |  1 +
 cpukit/score/cpu/nios2/include/rtems/score/cpu.h   |  4 +-
 cpukit/score/cpu/no_cpu/Makefile.am                |  1 +
 cpukit/score/cpu/no_cpu/cpuidle.c                  | 28 ++++++++++++++
 cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h  | 29 ---------------
 cpukit/score/cpu/or1k/include/rtems/score/cpu.h    | 34 -----------------
 cpukit/score/cpu/powerpc/Makefile.am               |  1 +
 cpukit/score/cpu/powerpc/include/rtems/score/cpu.h | 25 +------------
 cpukit/score/cpu/riscv/include/rtems/score/cpu.h   |  1 -
 cpukit/score/cpu/sh/Makefile.am                    |  1 +
 cpukit/score/cpu/sh/cpu.c                          | 28 --------------
 cpukit/score/cpu/sh/include/rtems/score/cpu.h      | 32 ----------------
 cpukit/score/cpu/sparc/Makefile.am                 |  3 +-
 cpukit/score/cpu/sparc/include/rtems/score/cpu.h   | 18 +--------
 cpukit/score/cpu/sparc64/Makefile.am               |  1 +
 cpukit/score/cpu/sparc64/include/rtems/score/cpu.h | 24 ------------
 cpukit/score/cpu/v850/Makefile.am                  |  1 +
 cpukit/score/cpu/v850/include/rtems/score/cpu.h    | 29 +--------------
 cpukit/score/cpu/x86_64/Makefile.am                |  1 +
 cpukit/score/cpu/x86_64/include/rtems/score/cpu.h  |  1 -
 testsuites/smptests/smpschededf04/init.c           |  6 ---
 testsuites/smptests/smpthreadpin01/init.c          |  6 ---
 37 files changed, 53 insertions(+), 516 deletions(-)

diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index f59e0f7..2e183c7 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -1108,18 +1108,8 @@ extern rtems_initialization_tasks_table Initialization_tasks[];
 #ifndef CONFIGURE_IDLE_TASK_BODY
   #if defined(BSP_IDLE_TASK_BODY)
     #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
-  #elif (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-    #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
   #else
-    /* only instantiate and compile if used */
-    #ifdef CONFIGURE_INIT
-      void *_Thread_Idle_body(uintptr_t ignored)
-      {
-        for( ; ; ) ;
-        return 0;   /* to avoid warning */
-      }
-    #endif
-    #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body
+    #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body
   #endif
 #endif
 /**@}*/ /* end of IDLE thread configuration */
diff --git a/cpukit/include/rtems/score/thread.h b/cpukit/include/rtems/score/thread.h
index 4dd1023..1e97083 100644
--- a/cpukit/include/rtems/score/thread.h
+++ b/cpukit/include/rtems/score/thread.h
@@ -879,17 +879,6 @@ struct _Thread_Control {
   void                                 *extensions[ RTEMS_ZERO_LENGTH_ARRAY ];
 };
 
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
-/**
- *  This routine is the body of the system idle thread.
- *
- *  NOTE: This routine is actually instantiated by confdefs.h when needed.
- */
-void *_Thread_Idle_body(
-  uintptr_t  ignored
-);
-#endif
-
 typedef void (*rtems_per_thread_routine)( Thread_Control * );
 
 /* Use rtems_task_iterate() instead */
diff --git a/cpukit/score/cpu/arm/armv7-thread-idle.c b/cpukit/score/cpu/arm/armv7-thread-idle.c
index 527fbbc..dd78a93 100644
--- a/cpukit/score/cpu/arm/armv7-thread-idle.c
+++ b/cpukit/score/cpu/arm/armv7-thread-idle.c
@@ -8,7 +8,7 @@
  * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
- *  Obere Lagerstr. 30
+ *  Dornierstr. 4
  *  82178 Puchheim
  *  Germany
  *  <rtems at embedded-brains.de>
@@ -24,13 +24,13 @@
 
 #include <rtems/score/cpu.h>
 
-#ifdef ARM_MULTILIB_HAS_WFI
 
 void *_CPU_Thread_Idle_body( uintptr_t ignored )
 {
   while ( true ) {
+#ifdef ARM_MULTILIB_HAS_WFI
     __asm__ volatile ("wfi");
+#endif /* ARM_MULTILIB_HAS_WFI */
   }
 }
 
-#endif /* ARM_MULTILIB_HAS_WFI */
diff --git a/cpukit/score/cpu/arm/include/rtems/score/cpu.h b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
index 3343b40..a44abe1 100644
--- a/cpukit/score/cpu/arm/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/include/rtems/score/cpu.h
@@ -119,12 +119,6 @@
 
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH TRUE
 
-#if defined(ARM_MULTILIB_HAS_WFI)
-  #define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-#else
-  #define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-#endif
-
 #define CPU_STACK_GROWS_UP FALSE
 
 #if defined(ARM_MULTILIB_CACHE_LINE_MAX_64)
@@ -597,9 +591,7 @@ static inline CPU_Counter_ticks _CPU_Counter_difference(
   return second - first;
 }
 
-#if CPU_PROVIDES_IDLE_THREAD_BODY == TRUE
-  void *_CPU_Thread_Idle_body( uintptr_t ignored );
-#endif
+void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /** @} */
 
diff --git a/cpukit/score/cpu/bfin/cpu.c b/cpukit/score/cpu/bfin/cpu.c
index 00d0f21..0771b4b 100644
--- a/cpukit/score/cpu/bfin/cpu.c
+++ b/cpukit/score/cpu/bfin/cpu.c
@@ -168,14 +168,12 @@ void _CPU_ISR_install_vector(
     _CPU_ISR_install_raw_handler( vector, _ISR_Handler, &ignored );
 }
 
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
 void *_CPU_Thread_Idle_body(uintptr_t ignored)
 {
   while (1) {
     __asm__ __volatile__("ssync; idle; ssync");
   }
 }
-#endif
 
 /*
  * Copied from the arm port.
diff --git a/cpukit/score/cpu/bfin/include/rtems/score/cpu.h b/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
index af68905..329a1b6 100644
--- a/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/bfin/include/rtems/score/cpu.h
@@ -173,32 +173,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode.  When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- *   -#  BSP provided
- *   -#  CPU dependent (if provided)
- *   -#  generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -719,16 +693,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/**
- * This routine is the CPU dependent IDLE thread body.
- *
- * @note  It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY
- *        is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /**
diff --git a/cpukit/score/cpu/epiphany/include/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/include/rtems/score/cpu.h
index 46213ff..d5c046a 100644
--- a/cpukit/score/cpu/epiphany/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/epiphany/include/rtems/score/cpu.h
@@ -147,30 +147,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- *
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -636,16 +612,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- *
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /*
diff --git a/cpukit/score/cpu/i386/Makefile.am b/cpukit/score/cpu/i386/Makefile.am
index b03d859..faef1fb 100644
--- a/cpukit/score/cpu/i386/Makefile.am
+++ b/cpukit/score/cpu/i386/Makefile.am
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.S
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
 
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index 2007426..d38af94 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -96,19 +96,6 @@ extern "C" {
 
 #define CPU_STRUCTURE_ALIGNMENT
 
-/*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
 #define CPU_MAXIMUM_PROCESSORS 32
 
 #define I386_CONTEXT_CONTROL_EFLAGS_OFFSET 0
@@ -577,18 +564,8 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  Use the halt instruction of low power mode of a particular i386 model.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
 /*
  *  _CPU_Context_switch
  *
diff --git a/cpukit/score/cpu/lm32/include/rtems/score/cpu.h b/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
index 782412f..80374a6 100644
--- a/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/lm32/include/rtems/score/cpu.h
@@ -167,32 +167,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode.  When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- *   -#  BSP provided
- *   -#  CPU dependent (if provided)
- *   -#  generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -753,16 +727,6 @@ void _CPU_ISR_install_vector(
 
 /** @} */
 
-/**
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE:  It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY
- *        is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /**
diff --git a/cpukit/score/cpu/m32c/include/rtems/score/cpu.h b/cpukit/score/cpu/m32c/include/rtems/score/cpu.h
index 7eb3ab3..3dc6b2a 100644
--- a/cpukit/score/cpu/m32c/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m32c/include/rtems/score/cpu.h
@@ -189,32 +189,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode.  When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- *   -#  BSP provided
- *   -#  CPU dependent (if provided)
- *   -#  generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -738,16 +712,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/**
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE:  It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY
- *        is TRUE.
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /**
diff --git a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
index b7ab352..cd3f55f 100644
--- a/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/m68k/include/rtems/score/cpu.h
@@ -82,7 +82,6 @@ extern "C" {
 #define CPU_USE_DEFERRED_FP_SWITCH       TRUE
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
 #define CPU_STACK_GROWS_UP               FALSE
 
 /* FIXME: Is this the right value? */
@@ -401,15 +400,6 @@ void _CPU_Context_Initialize(
 
 /* end of Context handler macros */
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /*
diff --git a/cpukit/score/cpu/mips/include/rtems/score/cpu.h b/cpukit/score/cpu/mips/include/rtems/score/cpu.h
index 42eae73..fbb519e 100644
--- a/cpukit/score/cpu/mips/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/mips/include/rtems/score/cpu.h
@@ -175,30 +175,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- *  must be provided and is the default IDLE thread body instead of
- *  _Internal_threads_Idle_thread_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- */
-
-/* we can use the low power wait instruction for the IDLE thread */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -802,15 +778,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Internal_threads_Idle_thread_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /*
diff --git a/cpukit/score/cpu/moxie/Makefile.am b/cpukit/score/cpu/moxie/Makefile.am
index d5e8952..93cf64b 100644
--- a/cpukit/score/cpu/moxie/Makefile.am
+++ b/cpukit/score/cpu/moxie/Makefile.am
@@ -8,6 +8,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c moxie-exception-frame-print.c cpu_asm.S
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
 
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/moxie/include/rtems/score/cpu.h b/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
index 79c5a61..fbf6894 100644
--- a/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/moxie/include/rtems/score/cpu.h
@@ -136,35 +136,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Internal_threads_Idle_thread_body
- *  must be provided and is the default IDLE thread body instead of
- *  _Internal_threads_Idle_thread_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- *
- *  MOXIE Specific Information:
- *
- *  XXX
- *  The port initially called a BSP dependent routine called
- *  IDLE_Monitor.  The idle task body can be overridden by
- *  the BSP in newer versions of RTEMS.
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -598,19 +569,7 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Internal_threads_Idle_thread_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- *
- *  MOXIE Specific Information:
- *
- *  XXX
- */
-void *_CPU_Thread_Idle_body( uint32_t );
+void *_CPU_Thread_Idle_body( uintptr_t );
 
 /*
  *  _CPU_Context_switch
diff --git a/cpukit/score/cpu/nios2/Makefile.am b/cpukit/score/cpu/nios2/Makefile.am
index a0ecab3..4619db0 100644
--- a/cpukit/score/cpu/nios2/Makefile.am
+++ b/cpukit/score/cpu/nios2/Makefile.am
@@ -7,6 +7,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES =
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += nios2-context-initialize.c
 libscorecpu_a_SOURCES += nios2-context-switch.S
 libscorecpu_a_SOURCES += nios2-context-validate.S
diff --git a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
index fa05284..c86b13b 100644
--- a/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/include/rtems/score/cpu.h
@@ -51,8 +51,6 @@ extern "C" {
 
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
-#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
-
 #define CPU_STACK_GROWS_UP FALSE
 
 /* FIXME: Is this the right value? */
@@ -316,6 +314,8 @@ void _CPU_ISR_install_vector(
   proc_ptr *old_handler
 );
 
+void *_CPU_Thread_Idle_body( uintptr_t ignored );
+
 void _CPU_Context_switch( Context_Control *run, Context_Control *heir );
 
 void _CPU_Context_restore(
diff --git a/cpukit/score/cpu/no_cpu/Makefile.am b/cpukit/score/cpu/no_cpu/Makefile.am
index 0d89f5a..b5f59e5 100644
--- a/cpukit/score/cpu/no_cpu/Makefile.am
+++ b/cpukit/score/cpu/no_cpu/Makefile.am
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c cpu_asm.c
 libscorecpu_a_SOURCES += cpucounterfrequency.c
 libscorecpu_a_SOURCES += cpucounterread.c
+libscorecpu_a_SOURCES += cpuidle.c
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
 
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/score/cpu/no_cpu/cpuidle.c b/cpukit/score/cpu/no_cpu/cpuidle.c
new file mode 100644
index 0000000..de66b39
--- /dev/null
+++ b/cpukit/score/cpu/no_cpu/cpuidle.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2013-2014 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/cpu.h>
+
+void *_CPU_Thread_Idle_body( uintptr_t ignored )
+{
+  while ( true ) {
+    /* Do nothing */
+  }
+
+  return NULL;
+}
diff --git a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
index 427e381..8e66182 100644
--- a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h
@@ -198,32 +198,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode.  When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- *   -#  BSP provided
- *   -#  CPU dependent (if provided)
- *   -#  generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * XXX document implementation including references if appropriate
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -1044,9 +1018,6 @@ void _CPU_ISR_install_vector(
 /**
  * This routine is the CPU dependent IDLE thread body.
  *
- * NOTE:  It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- *
  * Port Specific Information:
  *
  * XXX document implementation including references if appropriate
diff --git a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
index 1989417..8d66ccf 100644
--- a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h
@@ -139,30 +139,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- *
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -644,16 +620,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- *
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /*
diff --git a/cpukit/score/cpu/powerpc/Makefile.am b/cpukit/score/cpu/powerpc/Makefile.am
index 05ab2f4..15736ab 100644
--- a/cpukit/score/cpu/powerpc/Makefile.am
+++ b/cpukit/score/cpu/powerpc/Makefile.am
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
 
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += ppc-context-volatile-clobber.S
 libscorecpu_a_SOURCES += ppc-context-validate.S
 libscorecpu_a_SOURCES += ppc-isr-disable-mask.S
diff --git a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
index beacc28..85864ff 100644
--- a/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/powerpc/include/rtems/score/cpu.h
@@ -53,29 +53,6 @@ extern "C" {
 /* conditional compilation parameters */
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -940,6 +917,8 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
+void *_CPU_Thread_Idle_body( uintptr_t ignored );
+
 /*
  *  _CPU_Context_switch
  *
diff --git a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
index e836ac0..4a81d0c 100644
--- a/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/riscv/include/rtems/score/cpu.h
@@ -52,7 +52,6 @@ extern "C" {
 #define CPU_ALL_TASKS_ARE_FP             FALSE
 #define CPU_IDLE_TASK_IS_FP              FALSE
 #define CPU_USE_DEFERRED_FP_SWITCH       FALSE
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
 #define CPU_STACK_GROWS_UP               FALSE
 
 #define CPU_STRUCTURE_ALIGNMENT __attribute__ ((aligned (64)))
diff --git a/cpukit/score/cpu/sh/Makefile.am b/cpukit/score/cpu/sh/Makefile.am
index 3718844..b4a125f 100644
--- a/cpukit/score/cpu/sh/Makefile.am
+++ b/cpukit/score/cpu/sh/Makefile.am
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES = cpu.c context.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += sh-exception-frame-print.c
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
 
diff --git a/cpukit/score/cpu/sh/cpu.c b/cpukit/score/cpu/sh/cpu.c
index 8988da9..b1e8766 100644
--- a/cpukit/score/cpu/sh/cpu.c
+++ b/cpukit/score/cpu/sh/cpu.c
@@ -175,34 +175,6 @@ void _CPU_ISR_install_vector(
  _ISR_Vector_table[ vector ] = new_handler;
 }
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  NOTES:
- *
- *  1. This is the same as the regular CPU independent algorithm.
- *
- *  2. If you implement this using a "halt", "idle", or "shutdown"
- *     instruction, then don't forget to put it in an infinite loop.
- *
- *  3. Be warned. Some processors with onboard DMA have been known
- *     to stop the DMA if the CPU were put in IDLE mode.  This might
- *     also be a problem with other on-chip peripherals.  So use this
- *     hook with caution.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-void *_CPU_Thread_Idle_body( uintptr_t ignored )
-{
-
-  for( ; ; )
-    {
-      __asm__ volatile("nop");
-    }
-    /* insert your "halt" instruction here */ ;
-}
-#endif
-
 void _CPU_Context_Initialize(
   Context_Control	*_the_context,
   void			*_stack_base,
diff --git a/cpukit/score/cpu/sh/include/rtems/score/cpu.h b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
index a61355d..61d8e56 100644
--- a/cpukit/score/cpu/sh/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
@@ -148,29 +148,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- *
- *  This is intended to allow for supporting processors which have
- *  a low power or idle mode.  When the IDLE thread is executed, then
- *  the CPU can be powered down.
- *
- *  The order of precedence for selecting the IDLE thread body is:
- *
- *    1.  BSP provided
- *    2.  CPU dependent (if provided)
- *    3.  generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    TRUE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -594,15 +571,6 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-/*
- *  _CPU_Thread_Idle_body
- *
- *  This routine is the CPU dependent IDLE thread body.
- *
- *  NOTE:  It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- *         is TRUE.
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
 /*
diff --git a/cpukit/score/cpu/sparc/Makefile.am b/cpukit/score/cpu/sparc/Makefile.am
index 2e0ab59..6c06ce0 100644
--- a/cpukit/score/cpu/sparc/Makefile.am
+++ b/cpukit/score/cpu/sparc/Makefile.am
@@ -3,8 +3,9 @@ include $(top_srcdir)/automake/compile.am
 noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES =
 libscorecpu_a_SOURCES += access_le.c
-libscorecpu_a_SOURCES += cpu.c
 libscorecpu_a_SOURCES += cpu_asm.S
+libscorecpu_a_SOURCES += cpu.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += sparc-access.S
 libscorecpu_a_SOURCES += sparc-context-validate.S
 libscorecpu_a_SOURCES += sparc-context-volatile-clobber.S
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
index a53791c..8c62127 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
@@ -136,22 +136,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * - If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * - If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * The SPARC architecture does not have a low power or halt instruction.
- * It is left to the BSP and/or CPU specific code to provide an IDLE
- * thread body which is aware of low power modes.
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -988,6 +972,8 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
+void *_CPU_Thread_Idle_body( uintptr_t ignored );
+
 /**
  * @brief SPARC specific context switch.
  *
diff --git a/cpukit/score/cpu/sparc64/Makefile.am b/cpukit/score/cpu/sparc64/Makefile.am
index 711036e..0d3d649 100644
--- a/cpukit/score/cpu/sparc64/Makefile.am
+++ b/cpukit/score/cpu/sparc64/Makefile.am
@@ -7,6 +7,7 @@ libscorecpu_a_SOURCES += cpu.c
 libscorecpu_a_SOURCES += interrupt.S
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += sparc64-exception-frame-print.c
 libscorecpu_a_SOURCES += sparc64-syscall.S
 
diff --git a/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
index 9175a2c..0249023 100644
--- a/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
@@ -107,19 +107,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /*
- *  Does this port provide a CPU dependent IDLE task implementation?
- *
- *  If TRUE, then the routine _CPU_Thread_Idle_body
- *  must be provided and is the default IDLE thread body instead of
- *  _CPU_Thread_Idle_body.
- *
- *  If FALSE, then use the generic IDLE thread body if the BSP does
- *  not provide one.
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
-/*
  *  Does the stack grow up (toward higher addresses) or down
  *  (toward lower addresses)?
  *
@@ -877,19 +864,8 @@ void _CPU_ISR_install_vector(
   proc_ptr   *old_handler
 );
 
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-
-/*
- *  _CPU_Thread_Idle_body
- *
- *  Some SPARC implementations have low power, sleep, or idle modes.  This
- *  tries to take advantage of those models.
- */
-
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
 
-#endif /* CPU_PROVIDES_IDLE_THREAD_BODY */
-
 /*
  *  _CPU_Context_switch
  *
diff --git a/cpukit/score/cpu/v850/Makefile.am b/cpukit/score/cpu/v850/Makefile.am
index 8db039c..3e3e8ae 100644
--- a/cpukit/score/cpu/v850/Makefile.am
+++ b/cpukit/score/cpu/v850/Makefile.am
@@ -5,6 +5,7 @@ libscorecpu_a_SOURCES  = cpu.c
 libscorecpu_a_SOURCES += cpu_asm.S
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += v850-exception-frame-print.c
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
 
diff --git a/cpukit/score/cpu/v850/include/rtems/score/cpu.h b/cpukit/score/cpu/v850/include/rtems/score/cpu.h
index 46e7bca..7011366 100644
--- a/cpukit/score/cpu/v850/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/v850/include/rtems/score/cpu.h
@@ -165,33 +165,6 @@ extern "C" {
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
 
 /**
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine @ref _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * @ref _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode.  When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- *   -#  BSP provided
- *   -#  CPU dependent (if provided)
- *   -#  generic (if no BSP and no CPU dependent)
- *
- * Port Specific Information:
- *
- * There does not appear to be a reason for the v850 port itself to provide
- * a special idle task.
- */
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
-
-/**
  * Does the stack grow up (toward higher addresses) or down
  * (toward lower addresses)?
  *
@@ -665,6 +638,8 @@ void _CPU_Context_Initialize(
  */
 void _CPU_Initialize(void);
 
+void *_CPU_Thread_Idle_body( uintptr_t ignored );
+
 /**
  * @addtogroup CPUContext
  */
diff --git a/cpukit/score/cpu/x86_64/Makefile.am b/cpukit/score/cpu/x86_64/Makefile.am
index db4bd15..556246d 100644
--- a/cpukit/score/cpu/x86_64/Makefile.am
+++ b/cpukit/score/cpu/x86_64/Makefile.am
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
 libscorecpu_a_SOURCES  = cpu.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
 libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
 libscorecpu_a_SOURCES += x86_64-context-initialize.c
 libscorecpu_a_SOURCES += x86_64-context-switch.S
 libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h b/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
index 8f4a3c8..7f3aed3 100644
--- a/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/x86_64/include/rtems/score/cpu.h
@@ -52,7 +52,6 @@ extern "C" {
 #define CPU_IDLE_TASK_IS_FP      FALSE
 #define CPU_USE_DEFERRED_FP_SWITCH       TRUE
 #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
-#define CPU_PROVIDES_IDLE_THREAD_BODY    FALSE
 #define CPU_STACK_GROWS_UP               FALSE
 
 #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED(64)
diff --git a/testsuites/smptests/smpschededf04/init.c b/testsuites/smptests/smpschededf04/init.c
index 5387d02..3111374 100644
--- a/testsuites/smptests/smpschededf04/init.c
+++ b/testsuites/smptests/smpschededf04/init.c
@@ -41,13 +41,7 @@ static void do_nothing_task(rtems_task_argument arg)
 {
   (void) arg;
 
-#if CPU_PROVIDES_IDLE_THREAD_BODY == TRUE
   _CPU_Thread_Idle_body(0);
-#else
-  while (true) {
-    /* Do nothing */
-  }
-#endif
 }
 
 static void test(void)
diff --git a/testsuites/smptests/smpthreadpin01/init.c b/testsuites/smptests/smpthreadpin01/init.c
index c28b3b3..66a8e33 100644
--- a/testsuites/smptests/smpthreadpin01/init.c
+++ b/testsuites/smptests/smpthreadpin01/init.c
@@ -245,13 +245,7 @@ static void busy_task(rtems_task_argument arg)
 {
   (void) arg;
 
-#if CPU_PROVIDES_IDLE_THREAD_BODY == TRUE
   _CPU_Thread_Idle_body(0);
-#else
-  while (true) {
-    /* Do nothing */
-  }
-#endif
 }
 
 static const char *blocked_or_ready(bool blocked)



More information about the vc mailing list