From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 8/9] sim: smp: make option available again
Date: Sun, 25 Dec 2022 02:14:33 -0500 [thread overview]
Message-ID: <20221225071434.30014-8-vapier@gentoo.org> (raw)
In-Reply-To: <20221225071434.30014-1-vapier@gentoo.org>
At some point we want this to work, but it's not easy to test if
the configure option isn't available. Restore it, but keep the
default off.
---
sim/Makefile.in | 1 +
sim/aclocal.m4 | 1 +
sim/config.h.in | 3 +++
sim/configure | 32 ++++++++++++++++++++++++++++++--
sim/configure.ac | 1 +
sim/m4/sim_ac_option_smp.m4 | 18 ++++++++++++------
6 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/sim/configure.ac b/sim/configure.ac
index bfcd9e59d10e..af7e6e752ca1 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -180,6 +180,7 @@ SIM_AC_OPTION_INLINE
SIM_AC_OPTION_PROFILE
SIM_AC_OPTION_RESERVED_BITS
SIM_AC_OPTION_SCACHE
+SIM_AC_OPTION_SMP
SIM_AC_OPTION_STDIO
SIM_AC_OPTION_TRACE
SIM_AC_OPTION_WARNINGS
diff --git a/sim/m4/sim_ac_option_smp.m4 b/sim/m4/sim_ac_option_smp.m4
index b59d7e6e7600..5c2b35f9d846 100644
--- a/sim/m4/sim_ac_option_smp.m4
+++ b/sim/m4/sim_ac_option_smp.m4
@@ -12,20 +12,26 @@ dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_DEFUN([SIM_AC_OPTION_SMP],
-[
+AC_DEFUN([SIM_AC_OPTION_SMP], [dnl
AC_MSG_CHECKING([number of sim cpus to support])
-default_sim_smp="ifelse([$1],,5,[$1])"
-sim_smp="$default_sim_smp""
+dnl TODO: We should increase the default to use smp at some point. When we do,
+dnl the ppc/configure sim-smp option should be merged. See the WITH_SMP check
+dnl below for more cleanups too.
+default_sim_smp="0"
+sim_smp="$default_sim_smp"
AC_ARG_ENABLE(sim-smp,
[AS_HELP_STRING([--enable-sim-smp=n],
- [Specify number of processors to configure for (default ${default_sim_smp})])],
+ [Specify number of processors to configure for (default 1)])],
[case "${enableval}" in
yes) sim_smp="5";;
no) sim_smp="0";;
*) sim_smp="$enableval";;
esac])dnl
sim_igen_smp="-N ${sim_smp}"
-AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])
+dnl NB: The ppc code uses a diff default because its smp works. That is why
+dnl we don't unconditionally enable WITH_SMP here. Once we unify ppc, we can
+dnl make this unconditional.
+AS_VAR_IF([sim_smp], [0], [], [dnl
+ AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])])
AC_MSG_RESULT($sim_smp)
])
--
2.39.0
next prev parent reply other threads:[~2022-12-25 7:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 7:14 [PATCH 1/9] sim: cpu: fix SMP msg prefix helper Mike Frysinger
2022-12-25 7:14 ` [PATCH 2/9] sim: mn10300: fix SMP compile Mike Frysinger
2022-12-25 7:14 ` [PATCH 3/9] sim: or1k: fix iterator typo when setting up cpus Mike Frysinger
2022-12-25 7:14 ` [PATCH 4/9] sim: v850: fix SMP compile Mike Frysinger
2022-12-25 7:14 ` [PATCH 5/9] sim: m32r: fix iterator typo when setting up cpus Mike Frysinger
2022-12-25 7:14 ` [PATCH 6/9] sim: msp430: add basic SMP cpu init Mike Frysinger
2022-12-25 7:14 ` [PATCH 7/9] sim: cpu: change default init to handle all cpus Mike Frysinger
2022-12-25 7:14 ` Mike Frysinger [this message]
2022-12-25 7:14 ` [PATCH 9/9] sim: smp: plumb igen flag down to all users Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221225071434.30014-8-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).