Thread (13 messages) 13 messages, 3 authors, 2021-01-29

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

From: Yury Norov <yury.norov@gmail.com>
Date: 2021-01-29 22:26:55
Also in: linux-m68k, linux-sh, lkml

On Fri, Jan 29, 2021 at 1:11 PM Andy Shevchenko
[off-list ref] wrote:
On Fri, Jan 29, 2021 at 10:49 PM Yury Norov [off-list ref] wrote:
quoted
Many algorithms become simplier if they are passed with relatively small
simpler
quoted
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.
quoted
It should probably go to linux/kernel.h, but doing that creates circular
dependencies. So put it in asm-generic/bitsperlong.h.
[]
quoted
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help