linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Peter Zijlstra" <peterz@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>, "Arnd Bergmann" <arnd@arndb.de>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Chris Zankel" <chris@zankel.net>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"André Almeida" <andrealmeid@collabora.com>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	linux-mips@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	"open list:TENSILICA XTENSA PORT (xtensa)"
	<linux-xtensa@linux-xtensa.org>,
	Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 1/2] futex: ensure futex_atomic_cmpxchg_inatomic() is present
Date: Tue, 26 Oct 2021 05:29:36 -0700	[thread overview]
Message-ID: <CAMo8BfLskHzSW5FJUajAEvr6NRfvYhRRxKG4CQOFAQwtZtrRLg@mail.gmail.com> (raw)
In-Reply-To: <20211026100432.1730393-1-arnd@kernel.org>

On Tue, Oct 26, 2021 at 3:04 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The boot-time detection of futex_atomic_cmpxchg_inatomic()
> has a bug on some 32-bit arm builds, and Thomas Gleixner
> suggested that setting CONFIG_HAVE_FUTEX_CMPXCHG would
> avoid the problem, as it is always present anyway.
>
> Looking into which other architectures could do the same
> showed that almost all architectures have it, the exceptions
> being:
>
>  - some old 32-bit MIPS uniprocessor cores without ll/sc
>  - one xtensa variant with no SMP
>  - 32-bit SPARC when built for SMP
>
> Fix MIPS And Xtensa by rearranging the generic code to let it be used
> as a fallback.
>
> For SPARC, the SMP definition just ends up turning off futex anyway,
> so this can be done at Kconfig time instead. Note that sparc32
> glibc requires the CASA instruction for its mutexes anyway,
> which is only available when running on SPARCv9 or LEON CPUs,
> but needs to be implemented in the sparc32 kernel for those.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/mips/include/asm/futex.h   | 29 ++++++++++++++++++-----------
>  arch/xtensa/include/asm/futex.h |  8 ++++++--
>  include/asm-generic/futex.h     | 31 +++++++++++--------------------
>  init/Kconfig                    |  1 +
>  4 files changed, 36 insertions(+), 33 deletions(-)

For xtensa:
Acked-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max

      reply	other threads:[~2021-10-26 12:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 10:03 [PATCH 1/2] futex: ensure futex_atomic_cmpxchg_inatomic() is present Arnd Bergmann
2021-10-26 12:29 ` Max Filippov [this message]

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=CAMo8BfLskHzSW5FJUajAEvr6NRfvYhRRxKG4CQOFAQwtZtrRLg@mail.gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@collabora.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=chris@zankel.net \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=keescook@chromium.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /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 NNTP newsgroup(s).