mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH 4/7] atomics: add common header generation files
Date: Tue, 5 Jun 2018 14:25:37 +0200	[thread overview]
Message-ID: <20180605122537.GJ12258@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20180529180746.29684-5-mark.rutland@arm.com>

On Tue, May 29, 2018 at 07:07:43PM +0100, Mark Rutland wrote:
> +++ b/scripts/atomic/atomics.tbl
> @@ -0,0 +1,41 @@
> +# name	meta	args...
> +#
> +# Where meta contains a string of variants to generate.
> +# Upper-case implies _{acquire,release,relaxed} variants.
> +# Valid meta values are:
> +# * B/b	- bool: returns bool
> +# * v	- void: returns void
> +# * I/i	- int: returns base type
> +# * R	- return: returns base type (has _return variants)
> +# * F/f	- fetch: returns base type (has fetch_ variants)
> +# * l	- load: returns base type (has _acquire order variant)
> +# * s	- store: returns void (has _release order variant)
> +#
> +# Where args contains list of type[:name], where type is:
> +# * cv	- const pointer to atomic base type (atomic_t/atomic64_t/atomic_long_t)
> +# * v	- pointer to atomic base type (atomic_t/atomic64_t/atomic_long_t)
> +# * i	- base type (int/s64/long)
> +# * I	- pointer to base type (int/s64/long)

I thought we agreed to make that 'p' instead of 'I'.

> +#
> +read			l	cv
> +set			s	v	i
> +add			vRF	i	v
> +sub			vRF	i	v
> +inc			vRF	v
> +dec			vRF	v
> +and			vF	i	v
> +andnot			vF	i	v
> +or			vF	i	v
> +xor			vF	i	v
> +xchg			I	v	i
> +cmpxchg			I	v	i:old	i:new
> +try_cmpxchg		B	v	I:old	i:new
> +sub_and_test		b	i	v
> +dec_and_test		b	v
> +inc_and_test		b	v
> +add_negative		b	i	v
> +add_unless		fb	v	i:a	i:u
> +inc_not_zero		b	v
> +inc_unless_negative	b	v
> +dec_unless_positive	b	v
> +dec_if_positive		i	v

  reply	other threads:[~2018-06-05 12:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 18:07 [PATCH 0/7] atomics: generate atomic headers Mark Rutland
2018-05-29 18:07 ` [PATCH 1/7] atomics/tty: add missing atomic_long_t * cast Mark Rutland
2018-05-29 18:35   ` Greg Kroah-Hartman
2018-06-05 12:00   ` Peter Zijlstra
2018-06-05 14:20     ` Greg Kroah-Hartman
2018-06-05 14:43       ` Peter Zijlstra
2018-06-05 14:53         ` Peter Zijlstra
2018-06-06 13:55           ` Mark Rutland
2018-06-06 14:00           ` Greg Kroah-Hartman
2018-06-22 16:55             ` Mark Rutland
2018-06-28 12:07               ` Greg Kroah-Hartman
2018-05-29 18:07 ` [PATCH 2/7] atomics/treewide: rework ordering barriers Mark Rutland
2018-06-05 12:16   ` Peter Zijlstra
2018-06-05 13:28     ` Mark Rutland
2018-06-05 13:56       ` Peter Zijlstra
2018-06-05 14:02         ` Mark Rutland
2018-06-05 14:15           ` Peter Zijlstra
2018-05-29 18:07 ` [PATCH 3/7] atomics: separate basic {cmp,}xchg() Mark Rutland
2018-05-29 18:07 ` [PATCH 4/7] atomics: add common header generation files Mark Rutland
2018-06-05 12:25   ` Peter Zijlstra [this message]
2018-06-05 12:52     ` Mark Rutland
2018-05-29 18:07 ` [PATCH 5/7] atomics: switch to generated fallbacks Mark Rutland
2018-05-29 18:07 ` [PATCH 6/7] atomics: switch to generated atomic-long Mark Rutland
2018-05-29 18:07 ` [PATCH 7/7] atomics: switch to generated instrumentation Mark Rutland
2018-06-04 16:21 ` [PATCH 0/7] atomics: generate atomic headers Dmitry Vyukov
2018-06-05  5:56   ` Mark Rutland
2018-06-05 13:31   ` Peter Zijlstra
2018-06-05 13:29 ` Peter Zijlstra
2018-06-05 13:58   ` Mark Rutland
2018-06-05 14:14     ` Peter Zijlstra
2018-06-05 14:23       ` Mark Rutland

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=20180605122537.GJ12258@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will.deacon@arm.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®