All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nysal Jan K.A <nysal@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Will Deacon <will@kernel.org>
Subject: Re: [PATCH] powerpc/atomics: Remove unused function
Date: Fri, 24 Feb 2023 11:02:31 +0000	[thread overview]
Message-ID: <2ca14657-8bc3-f4d8-c4ca-212a982bd209@csgroup.eu> (raw)
In-Reply-To: <20230224103940.1328725-1-nysal@linux.ibm.com>



Le 24/02/2023 à 11:39, Nysal Jan K.A a écrit :
> [Vous ne recevez pas souvent de courriers de nysal@linux.ibm.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
> 
> Remove arch_atomic_try_cmpxchg_lock function as it is no longer used
> since commit 9f61521c7a28 ("powerpc/qspinlock: powerpc qspinlock
> implementation")
> 
> Signed-off-by: Nysal Jan K.A <nysal@linux.ibm.com>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   arch/powerpc/include/asm/atomic.h | 29 -----------------------------
>   1 file changed, 29 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
> index 486ab7889121..b3a53830446b 100644
> --- a/arch/powerpc/include/asm/atomic.h
> +++ b/arch/powerpc/include/asm/atomic.h
> @@ -130,35 +130,6 @@ ATOMIC_OPS(xor, xor, "", K)
>   #define arch_atomic_xchg_relaxed(v, new) \
>          arch_xchg_relaxed(&((v)->counter), (new))
> 
> -/*
> - * Don't want to override the generic atomic_try_cmpxchg_acquire, because
> - * we add a lock hint to the lwarx, which may not be wanted for the
> - * _acquire case (and is not used by the other _acquire variants so it
> - * would be a surprise).
> - */
> -static __always_inline bool
> -arch_atomic_try_cmpxchg_lock(atomic_t *v, int *old, int new)
> -{
> -       int r, o = *old;
> -       unsigned int eh = IS_ENABLED(CONFIG_PPC64);
> -
> -       __asm__ __volatile__ (
> -"1:    lwarx   %0,0,%2,%[eh]   # atomic_try_cmpxchg_acquire            \n"
> -"      cmpw    0,%0,%3                                                 \n"
> -"      bne-    2f                                                      \n"
> -"      stwcx.  %4,0,%2                                                 \n"
> -"      bne-    1b                                                      \n"
> -"\t"   PPC_ACQUIRE_BARRIER "                                           \n"
> -"2:                                                                    \n"
> -       : "=&r" (r), "+m" (v->counter)
> -       : "r" (&v->counter), "r" (o), "r" (new), [eh] "n" (eh)
> -       : "cr0", "memory");
> -
> -       if (unlikely(r != o))
> -               *old = r;
> -       return likely(r == o);
> -}
> -
>   /**
>    * atomic_fetch_add_unless - add unless the number is a given value
>    * @v: pointer of type atomic_t
> --
> 2.39.2
> 

  reply	other threads:[~2023-02-24 11:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 10:39 [PATCH] powerpc/atomics: Remove unused function Nysal Jan K.A
2023-02-24 10:39 ` Nysal Jan K.A
2023-02-24 11:02 ` Christophe Leroy [this message]
2023-03-24  1:14   ` Nysal Jan K.A.
2023-04-06  1:09 ` Michael Ellerman
2023-04-06  1:09   ` Michael Ellerman

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=2ca14657-8bc3-f4d8-c4ca-212a982bd209@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.rutland@arm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=nysal@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.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 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.