Updated patch without debugging leftover.

On 9/12/20 9:41 PM, Karel Gardas wrote:
> 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
> 
> 
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
> 

>From a5c078ec1a46a49b309029dc78df2a17ba1a3d11 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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/aclocal/enable-smp.m4 b/aclocal/enable-smp.m4
index b8767923c7..57afc21a99 100644
--- a/aclocal/enable-smp.m4
+++ b/aclocal/enable-smp.m4
@@ -6,7 +6,13 @@ 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
+         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