public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <yury.norov@gmail.com>
To: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	Andi Shyti <andi.shyti@linux.intel.com>,
	David Laight <David.Laight@aculab.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jani Nikula <jani.nikula@intel.com>
Subject: Re: [PATCH v6 2/7] bits: introduce fixed-type genmasks
Date: Wed, 19 Mar 2025 09:24:56 -0400	[thread overview]
Message-ID: <Z9rFqBIWgF1FuM98@thinkpad> (raw)
In-Reply-To: <443027f0-08c9-449a-8ee0-db9b234483f4@wanadoo.fr>

On Wed, Mar 19, 2025 at 02:39:03PM +0900, Vincent Mailhol wrote:
> On 19/03/2025 at 01:45, Yury Norov wrote:
> > On Sat, Mar 08, 2025 at 01:48:49AM +0900, Vincent Mailhol via B4 Relay wrote:
> >> From: Yury Norov <yury.norov@gmail.com>
> 
> (...)
> 
> >> +#define GENMASK(h, l)		GENMASK_TYPE(unsigned long,  h, l)
> >> +#define GENMASK_ULL(h, l)	GENMASK_TYPE(unsigned long long, h, l)
> > 
> > I like everything except this part. We switch GENMASK() from a well
> > tested implementation, including an asm code, and we split uapi and
> > non-uapi users, with no functionality changes.
> > 
> > Unification is a solid point, however.
> > 
> > Let's make it a 2-step procedure? Adding fixed-width GENMASKs is a
> > non-questionable improvement. Switching an existing API from one
> > implementation to another should be a separate patch, and probably
> > even a separate series. And we should be very clear that __GENMASK()
> > is uapi-only thing from now.
> > 
> > If we decide to switch GENMASK() in a separate series, we'll have some
> > extra time to think about unification...
> 
> Ack. I started drafting the split. The two series would look like:
> 
> [Series #1] bits: Fixed-type GENMASK_U*() and BIT_U*()
>     - bits: introduce fixed-type GENMASK_U*()
>     - bits: introduce fixed-type BIT_U*()
>     - drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*()
>     - test_bits: add tests for GENMASK_U*()
>     - test_bits: add tests for BIT_U*()
> 
> [Series #2] bits: Split asm and non-asm GENMASK*() and unify definitions
>     - bits: split the definition of the asm and non-asm GENMASK*()
>     - bits: unify the non-asm GENMASK*()
>     - test_bits: add tests for __GENMASK() and __GENMASK_ULL()
> 
> 
> Series #1 will leave GENMASK(), GENMASK_ULL() and GENMASK_128()
> untouched. The final result after the Series #2 will be the exact same
> code as of now.
> 
> I am thinking of sending the two series at the same time, and then, you
> can decide what is the good timing to merge these (and eventually, start
> a separate discussion on the second series).
> 
> Does this work for you?

Yes.

> On a side note, it did a lot of modifications to your original patch
> which introduced the GENMASK_U*(). It is OK to tag myself as author and
> you as co-author or do you still prefer to stay as the main author? Let
> me know!

Yes, I'm OK.

  reply	other threads:[~2025-03-19 13:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-07 16:48 [PATCH v6 0/7] bits: Fixed-type GENMASK_U*() and BIT_U*() Vincent Mailhol via B4 Relay
2025-03-07 16:48 ` [PATCH v6 1/7] bits: split the definition of the asm and non-asm GENMASK() Vincent Mailhol via B4 Relay
2025-03-07 17:42   ` Andy Shevchenko
2025-03-08  9:10     ` Vincent Mailhol
2025-03-18 16:06       ` Yury Norov
2025-03-18 16:14         ` Vincent Mailhol
2025-03-07 16:48 ` [PATCH v6 2/7] bits: introduce fixed-type genmasks Vincent Mailhol via B4 Relay
2025-03-07 17:46   ` Andy Shevchenko
2025-03-18 16:45   ` Yury Norov
2025-03-19  5:39     ` Vincent Mailhol
2025-03-19 13:24       ` Yury Norov [this message]
2025-03-07 16:48 ` [PATCH v6 3/7] bits: introduce fixed-type BIT_U*() Vincent Mailhol via B4 Relay
2025-03-07 17:48   ` Andy Shevchenko
2025-03-07 17:49     ` Andy Shevchenko
2025-03-08  9:28       ` Vincent Mailhol
2025-03-07 16:48 ` [PATCH v6 4/7] drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*() Vincent Mailhol via B4 Relay
2025-03-07 17:54   ` Andy Shevchenko
2025-03-08 10:36     ` Vincent Mailhol
2025-03-18 17:16   ` Yury Norov
2025-03-18 22:32     ` Jani Nikula
2025-03-19  4:37       ` Vincent Mailhol
2025-03-19 13:25         ` Yury Norov
2025-03-07 16:48 ` [PATCH v6 5/7] test_bits: add tests for __GENMASK() and __GENMASK_ULL() Vincent Mailhol via B4 Relay
2025-03-07 16:48 ` [PATCH v6 6/7] test_bits: add tests for GENMASK_U*() Vincent Mailhol via B4 Relay
2025-03-07 16:48 ` [PATCH v6 7/7] test_bits: add tests for BIT_U*() Vincent Mailhol via B4 Relay
2025-03-07 17:18 ` [PATCH v6 0/7] bits: Fixed-type GENMASK_U*() and BIT_U*() Yury Norov
2025-03-07 17:43   ` Andy Shevchenko
2025-03-07 17:48     ` Yury Norov
2025-03-07 17:50       ` Andy Shevchenko
2025-03-08 10:40         ` Vincent Mailhol

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=Z9rFqBIWgF1FuM98@thinkpad \
    --to=yury.norov@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi.shyti@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=lucas.demarchi@intel.com \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.net \
    /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