All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Romain Naour <romain.naour@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2
Date: Sun, 30 Jan 2022 15:46:05 +0100	[thread overview]
Message-ID: <20220130154605.5fad582e@windsurf> (raw)
In-Reply-To: <20220129142352.1197168-2-romain.naour@gmail.com>

Hello,

On Sat, 29 Jan 2022 15:23:51 +0100
Romain Naour <romain.naour@gmail.com> wrote:

> +# Disable minimal-threading when thumb or thumb2 is enabled
> +# due to runtime issue.
> +# https://lists.gnu.org/archive/html/poke-devel/2022-01/msg00162.html
> +ifeq ($(BR2_ARM_CPU_HAS_THUMB)$(BR2_ARM_CPU_HAS_THUMB2),y)
> +POKE_CONF_OPTS += --disable-dispatch-minimal-threading
> +else
> +POKE_CONF_OPTS += --enable-dispatch-minimal-threading
> +endif

I don't understand this patch, because minimal-threading is already
disabled by default (at least in poke 1.4, I haven't checked in poke
2.0). jitter/configure.ac contains:

# Is the minimal-threading dispatch enabled?  Check the default and the
# configure command-line option.
AC_MSG_CHECKING([if minimal-threading dispatch is enabled])
# FIXME: reenable this when I make defect handling reliable.
#default=$(test "x$JITTER_HAVE_ACTUAL_GCC" = "xyes" && echo yes || echo no)
default=no
AC_ARG_ENABLE([dispatch-minimal-threading],
              AS_HELP_STRING([--enable-dispatch-minimal-threading],
              [enable minimal threading dispatch: default yes if and
only if GCC (not an imitation) is used]),
              jitter_enable_dispatch_minimal_threading="$enableval",
              jitter_enable_dispatch_minimal_threading="$default")
if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
  jitter_best_dispatch_model="minimal-threading"
  jitter_enabled_dispatch_models="$jitter_enabled_dispatch_models minimal-threading"
fi
AC_MSG_RESULT([$jitter_enable_dispatch_minimal_threading$jitter_subpackage_disclaimer])
# FIXME: remove this warning message when I make defect handling reliable.
if test "x$jitter_enable_dispatch_minimal_threading" = "xyes"; then
  AC_MSG_WARN([minimal-threading dispatch is currently unreliable, and should
  not be used in production until defective instruction replacement is fully
  implemented])
fi

See the "default=no" ?

Also, when building with the following defconfig:

BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_EABI=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_POKE=y
# BR2_TARGET_ROOTFS_TAR is not set

The minimal threading is already disabled:

checking if switch dispatching is enabled... yes, provisionally (sub-package mode)
checking if direct-threading dispatch is enabled... yes, provisionally (sub-package mode)
checking if minimal-threading dispatch is enabled... no, provisionally (sub-package mode)
checking if no-threading dispatch is enabled... no, provisionally (sub-package mode)
configure: sub-package mode: disabling every dispatch except
direct-threading
configure:   (the following dispatches could have been enabled:
  switch direct-threading)
configure: enabled dispatching models are:
  direct-threading
configure: the best enabled dispatching model is:
  direct-threading

So what this patch is doing is in fact slightly the opposite of what he
says: instead of disabling minimal threading for thumb or thumb2, it
enables it for any other platform.

Are you sure this patch was needed for poke 1.4, and not for poke 2.0 ?

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-01-30 14:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-29 14:23 [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Romain Naour
2022-01-29 14:23 ` [Buildroot] [PATCH 2/3] package/poke: disable minimal-threading with thumb or thumb2 Romain Naour
2022-01-30 14:46   ` Thomas Petazzoni via buildroot [this message]
2022-01-30 17:32     ` Romain Naour
2022-01-29 14:23 ` [Buildroot] [PATCH 3/3] package/poke: bump to version 2.0 Romain Naour
2022-01-30 14:28 ` [Buildroot] [PATCH 1/3] package/poke: install libpoke.so to staging Thomas Petazzoni via buildroot

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=20220130154605.5fad582e@windsurf \
    --to=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.