x86/topology: add bitmap_weight_from() and use it in topo_unit_count()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 2 repliesIn review
- v12 patches 1 replySuperseded
Changes in v2 from the cover letter
- rename 'nbits' to 'end' (Ingo);
- leverage bitmap_weight() in inline implementation;
- drop outline implementation;
- don't handle 'start >= end' case explititly, leave it to user.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bitmap: add bitmap_weight_from()include/ lib/ | +56 | 0 replies | |
| 2/2 | x86/topology: use bitmap_weight_from()arch/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] x86/topology: add bitmap_weight_from() and use it in topo_unit_count()
Currently the function open-codes the missing bitmap_weight_from() with a for-loop, which is known to be less effective. Add the helper and switch topo_unit_count() to using it.
v1: https://lore.kernel.org/all/[email protected]/
v2:
- rename 'nbits' to 'end' (Ingo);
- leverage bitmap_weight() in inline implementation;
- drop outline implementation;
- don't handle 'start >= end' case explititly, leave it to user.
Yury Norov (NVIDIA) (2):
bitmap: add bitmap_weight_from()
x86/topology: use bitmap_weight_from()
arch/x86/kernel/cpu/topology.c | 8 ++------ include/linux/bitmap.h | 30 ++++++++++++++++++++++++++++++ lib/test_bitmap.c | 26 ++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0