[rtems commit] bsp/t32mppc: Add SMP support

Sebastian Huber sebh at rtems.org
Fri Jul 28 12:43:49 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul 28 14:42:53 2017 +0200

bsp/t32mppc: Add SMP support

---

 c/src/lib/libbsp/powerpc/t32mppc/Makefile.am        | 4 ++++
 c/src/lib/libbsp/powerpc/t32mppc/configure.ac       | 3 +++
 c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c | 4 ++--
 cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h      | 3 +++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am b/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
index 5b7339a..ebc6972 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/t32mppc/Makefile.am
@@ -78,5 +78,9 @@ libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
 	../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
 	../../../libcpu/@RTEMS_CPU@/@exceptions@/exc_bspsupport.rel
 
+if HAS_SMP
+libbsp_a_SOURCES += ../../shared/bspsmp.c
+endif
+
 include $(srcdir)/preinstall.am
 include $(top_srcdir)/../../../../automake/local.am
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/configure.ac b/c/src/lib/libbsp/powerpc/t32mppc/configure.ac
index 4cfaf14..fce295e 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/configure.ac
+++ b/c/src/lib/libbsp/powerpc/t32mppc/configure.ac
@@ -17,6 +17,9 @@ RTEMS_BSPOPTS_HELP_DATA_CACHE_ENABLED
 RTEMS_BSPOPTS_SET_INSTRUCTION_CACHE_ENABLED([*],[1])
 RTEMS_BSPOPTS_HELP_INSTRUCTION_CACHE_ENABLED
 
+RTEMS_CHECK_SMP
+AM_CONDITIONAL(HAS_SMP,[test "$rtems_cv_HAS_SMP" = "yes"])
+
 RTEMS_CHECK_NETWORKING
 AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
 
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c b/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
index f3e1474..73d1d8c 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/t32mppc/startup/bspstart.c
@@ -37,7 +37,7 @@ void BSP_panic(char *s)
 {
   rtems_interrupt_level level;
 
-  rtems_interrupt_disable(level);
+  rtems_interrupt_local_disable(level);
   (void) level;
 
   printk("%s PANIC %s\n", rtems_get_version_string(), s);
@@ -51,7 +51,7 @@ void _BSP_Fatal_error(unsigned n)
 {
   rtems_interrupt_level level;
 
-  rtems_interrupt_disable(level);
+  rtems_interrupt_local_disable(level);
   (void) level;
 
   printk("%s PANIC ERROR %u\n", rtems_get_version_string(), n);
diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h b/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
index bc03ab9..57c2db1 100644
--- a/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
+++ b/cpukit/score/cpu/powerpc/rtems/score/cpuimpl.h
@@ -193,6 +193,9 @@ typedef struct {
     double F13;
     uint64_t FPSCR;
   #endif
+  #if !defined(PPC_MULTILIB_ALTIVEC) && !defined(PPC_MULTILIB_FPU)
+    uint32_t RESERVED_FOR_STACK_ALIGNMENT;
+  #endif
 } CPU_Interrupt_frame;
 
 #ifdef RTEMS_SMP




More information about the vc mailing list