Re: [PATCH 2/5] bits_per_long.h: introduce SMALL_CONST() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 29, 2021 at 1:11 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:

On Fri, Jan 29, 2021 at 10:49 PM Yury Norov <yury.norov@xxxxxxxxx> wrote:

Many algorithms become simplier if they are passed with relatively small

simpler

input values. One example is bitmap operations when the whole bitmap fits
into one word. To implement such simplifications, linux/bitmap.h declares
small_const_nbits() macro.

Other subsystems may also benefit from optimizations of this sort, like
find_bit API in the following patches. So it looks helpful to generalize
the macro and extend it's visibility.

It should probably go to linux/kernel.h, but doing that creates circular
dependencies. So put it in asm-generic/bitsperlong.h.

[]

diff --git a/tools/include/asm-generic/bitsperlong.h b/tools/include/asm-generic/bitsperlong.h
index 8f2283052333..432d272baf27 100644
--- a/tools/include/asm-generic/bitsperlong.h
+++ b/tools/include/asm-generic/bitsperlong.h

I think a tools update would be better to have in a separate patch.

Do you mean a single sync-patch for all tools/*, or doubling the
patchset by splitting each patch
to tools and kernel parts? Why is it any better than I have now?



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux