mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Matt Evans" <mev@rivosinc.com>
Cc: linux-kernel@vger.kernel.org,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"Palmer Dabbelt" <palmer@rivosinc.com>
Subject: Re: [PATCH] locking/atomic: cmpxchg: Make __generic_cmpxchg_local compare against zero-extended 'old' value
Date: Wed, 01 Mar 2023 17:22:11 +0100	[thread overview]
Message-ID: <7b4e8b07-4691-4af3-ae8b-ba612b6af595@app.fastmail.com> (raw)
In-Reply-To: <C7DB3543-8DB2-49F8-85A4-E9288843BCDD@rivosinc.com>

On Wed, Mar 1, 2023, at 16:19, Matt Evans wrote:
>> On 26 Feb 2023, at 10:13, Arnd Bergmann <arnd@arndb.de> wrote:
>
> Proposed patch LGTM, but one query:  are the casts in 
> arch_[cmp]xchg()’s args necessary?  The new masks should deal with the 
> issue (and consistency would imply same for all other users of 
> arch_cmpxchg(), not ideal).

I don't think they are necessary, but I'd like to stay on the
safe side here since there are so many different implementations of
arch_cmpxchg() across architectures that it's likely that I missed
one that has a similar but, or that another one will get added
in the future.

> FWIW (including the casts in atomic.h, if you prefer):
>
> Reviewed-by: Matt Evans <mev@rivosinc.com>

Thanks!

     Arnd

      reply	other threads:[~2023-03-01 16:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 18:39 Matt Evans
2023-02-03 14:32 ` Arnd Bergmann
2023-02-26 10:13 ` Arnd Bergmann
2023-03-01 15:19   ` Matt Evans
2023-03-01 16:22     ` Arnd Bergmann [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=7b4e8b07-4691-4af3-ae8b-ba612b6af595@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mev@rivosinc.com \
    --cc=palmer@rivosinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®