lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0ea27d18-6d45-9673-38b7-78d59325f9d5@redhat.com>
Date:   Sun, 24 Jul 2022 22:08:34 -0400
From:   Waiman Long <longman@...hat.com>
To:     guoren@...nel.org, palmer@...osinc.com, heiko@...ech.de,
        hch@...radead.org, arnd@...db.de, peterz@...radead.org,
        will@...nel.org, boqun.feng@...il.com, mingo@...hat.com,
        philipp.tomsich@...ll.eu, cmuellner@...ux.com,
        linux-kernel@...r.kernel.org, David.Laight@...LAB.COM
Cc:     linux-riscv@...ts.infradead.org, linux-csky@...r.kernel.org,
        Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH V8 10/10] csky: Add qspinlock support

On 7/24/22 08:25, guoren@...nel.org wrote:
> From: Guo Ren <guoren@...ux.alibaba.com>
>
> Enable qspinlock by the requirements mentioned in a8ad07e5240c9
> ("asm-generic: qspinlock: Indicate the use of mixed-size atomics").
>
> C-SKY only has "ldex/stex" for all atomic operations. So csky give a
> strong forward guarantee for "ldex/stex." That means when ldex grabbed
> the cache line into $L1, it would block other cores from snooping the
> address with several cycles.
>
> Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> Signed-off-by: Guo Ren <guoren@...nel.org>
> ---
>   arch/csky/Kconfig               | 16 ++++++++++++++++
>   arch/csky/include/asm/Kbuild    |  2 ++
>   arch/csky/include/asm/cmpxchg.h | 20 ++++++++++++++++++++
>   3 files changed, 38 insertions(+)
>
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index dfdb436b6078..09f7d1f06bca 100644
> --- a/arch/csky/Kconfig
> +++ b/arch/csky/Kconfig
> @@ -354,6 +354,22 @@ config HAVE_EFFICIENT_UNALIGNED_STRING_OPS
>   	  Say Y here to enable EFFICIENT_UNALIGNED_STRING_OPS. Some CPU models could
>   	  deal with unaligned access by hardware.
>   
> +choice
> +	prompt "C-SKY spinlock type"
> +	default CSKY_TICKET_SPINLOCKS
> +
> +config CSKY_TICKET_SPINLOCKS
> +	bool "Using ticket spinlock"
> +
> +config CSKY_QUEUED_SPINLOCKS
> +	bool "Using queued spinlock"
> +	depends on SMP
> +	select ARCH_USE_QUEUED_SPINLOCKS
> +	help
> +	  Make sure your micro arch LL/SC has a strong forward progress guarantee.
> +	  Otherwise, stay at ticket-lock/combo-lock.

"combo-lock"? It is a cut-and-paste error. Right?

Cheers,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ