[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zddiav19kX8FGKY9@smile.fi.intel.com>
Date: Thu, 22 Feb 2024 17:04:10 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Yury Norov <yury.norov@...il.com>
Cc: Lucas De Marchi <lucas.demarchi@...el.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Jani Nikula <jani.nikula@...ux.intel.com>,
intel-xe@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
Jani Nikula <jani.nikula@...el.com>
Subject: Re: Re: [PATCH v3 1/3] bits: introduce fixed-type genmasks
On Thu, Feb 22, 2024 at 06:49:59AM -0800, Yury Norov wrote:
> On Wed, Feb 21, 2024 at 03:59:06PM -0600, Lucas De Marchi wrote:
..
> +#define __GENMASK(t, h, l) \
> + ((~0 - (1 << (l)) + 1) & (~0 >> (BITS_PER_LONG - 1 - (h))))
What's wrong on using the UL/ULL() macros?
Also it would be really good to avoid bifurcation of the implementations of
__GENMASK() for both cases.
..
> -#define __GENMASK(h, l) \
> - (((~UL(0)) - (UL(1) << (l)) + 1) & \
> - (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
This at bare minimum can be left untouched for asm case, no?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists