On 9/12/20 5:33 AM, Joel Sherrill wrote:
> I suspect if you want a common floor it is a Pentium II. That's where SMP
> appeared.
> 
> We can't sanity check the cpu model if we don't know the rules. And if we
> know the rules, we should just drop those low models. And error if someone
> runs on an older model.

Well, I think we may also change a perspective this way: RSB supports
pc.set which builds pc686 by default. So this is SMP safe BSP. I guess
that's what majority of user will use as it is very convenient.

Once someone would like to build variant of pc386 BSP by hand, we may
add clear error/warning about SMP being unsupported on the particular
old BSP.

Attached patch implements this (clear error). It basically allows
--enable-smp only for pc686 and pcp4 BSPs.

Comments welcome!

Thanks,
Karel
From b8830f094d71e8624e4f58bba8a5fc74ba69bb9a Mon Sep 17 00:00:00 2001
From: Karel Gardas <karel.gar...@centrum.cz>
Date: Sat, 12 Sep 2020 21:33:17 +0200
Subject: [PATCH] pc* BSPs: error on attempt to enable SMP for older BSP than
 pc686

---
 aclocal/enable-smp.m4 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/aclocal/enable-smp.m4 b/aclocal/enable-smp.m4
index b8767923c7..4b8a98caab 100644
--- a/aclocal/enable-smp.m4
+++ b/aclocal/enable-smp.m4
@@ -6,7 +6,14 @@ AC_ARG_ENABLE(smp,
 [AS_HELP_STRING([--enable-smp],[enable support for symmetric multiprocessing
 (SMP)])],
 [case "${enableval}" in
-  yes) test -z $enable_rtemsbsp && AC_MSG_ERROR([SMP requires BSPs to be provided, none have, see --enable-rtemsbsp])
+  yes) test -z "$enable_rtemsbsp" && AC_MSG_ERROR([SMP requires BSPs to be provided, none have, see --enable-rtemsbsp])
+       for i in `echo "$enable_rtemsbsp"`
+       do
+#echo "Investigating: $i"
+         if test "$i" = "pc386" -o "$i" = "pc486" -o "$i" = "pc586"; then
+           AC_MSG_ERROR([i386 SMP is supported on pc686 BSP and more modern.])
+         fi
+       done
        case "${RTEMS_CPU}" in
          arm|powerpc|riscv*|sparc|i386) RTEMS_HAS_SMP=yes ;;
          *)          RTEMS_HAS_SMP=no ;;
-- 
2.17.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to