linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] all: use find_next_*_bit() instead of find_first_*_bit() where possible
@ 2021-06-12 12:36 Yury Norov
  2021-06-12 12:36 ` [PATCH 1/8] bitops: protect find_first_{,zero}_bit properly Yury Norov
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Yury Norov @ 2021-06-12 12:36 UTC (permalink / raw)
  To: linux-kernel, linux-arch, Benjamin Herrenschmidt,
	Catalin Marinas, Will Deacon, Yoshinori Sato, Brian Cain,
	Geert Uytterhoeven, Thomas Bogendoerfer, Jonas Bonn,
	Stefan Kristiansson, James E.J. Bottomley, Palmer Dabbelt,
	Heiko Carstens, Rich Felker, David Hildenbrand, Jaegeuk Kim,
	Arnd Bergmann, Andy Shevchenko, Rasmus Villemoes, Andrew Morton,
	Alexander Lobakin, Samuel Mendoza-Jonas, Jakub Kicinski,
	Daniel Bristot de Oliveira, Alexey Klimov, Ingo Molnar
  Cc: Yury Norov

find_first_*_bit() is simpler and faster than 'next' version [1], and they
work identically if start == 0. But in many cases kernel code uses the
'next' version where 'first' can be used. This series addresses this issue.

Patches 1-3 move find.h under include/linux as it simplifies development.
Patches 4-8 switch the kernel and tools to find_first_*_bit() implementation
where appropriate. 

Yury Norov (8):
  bitops: protect find_first_{,zero}_bit properly
  bitops: move find_bit_*_le functions from le.h to find.h
  include: move find.h from asm_generic to linux
  arch: remove GENERIC_FIND_FIRST_BIT entirely
  lib: add find_first_and_bit()
  cpumask: use find_first_and_bit()
  all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where
    appropriate
  tools: sync tools/bitmap with mother linux

 MAINTAINERS                                   |   4 +-
 arch/alpha/include/asm/bitops.h               |   2 -
 arch/arc/Kconfig                              |   1 -
 arch/arc/include/asm/bitops.h                 |   1 -
 arch/arm/include/asm/bitops.h                 |   1 -
 arch/arm64/Kconfig                            |   1 -
 arch/arm64/include/asm/bitops.h               |   1 -
 arch/csky/include/asm/bitops.h                |   1 -
 arch/h8300/include/asm/bitops.h               |   1 -
 arch/hexagon/include/asm/bitops.h             |   1 -
 arch/ia64/include/asm/bitops.h                |   2 -
 arch/m68k/include/asm/bitops.h                |   2 -
 arch/mips/Kconfig                             |   1 -
 arch/mips/include/asm/bitops.h                |   1 -
 arch/openrisc/include/asm/bitops.h            |   1 -
 arch/parisc/include/asm/bitops.h              |   2 -
 arch/powerpc/include/asm/bitops.h             |   2 -
 arch/powerpc/platforms/pasemi/dma_lib.c       |   4 +-
 arch/riscv/include/asm/bitops.h               |   1 -
 arch/s390/Kconfig                             |   1 -
 arch/s390/include/asm/bitops.h                |   1 -
 arch/s390/kvm/kvm-s390.c                      |   2 +-
 arch/sh/include/asm/bitops.h                  |   1 -
 arch/sparc/include/asm/bitops_32.h            |   1 -
 arch/sparc/include/asm/bitops_64.h            |   2 -
 arch/x86/Kconfig                              |   1 -
 arch/x86/include/asm/bitops.h                 |   2 -
 arch/x86/um/Kconfig                           |   1 -
 arch/xtensa/include/asm/bitops.h              |   1 -
 drivers/block/rnbd/rnbd-clt.c                 |   2 +-
 drivers/dma/ti/edma.c                         |   2 +-
 drivers/iio/adc/ad7124.c                      |   2 +-
 drivers/infiniband/hw/irdma/hw.c              |  16 +-
 drivers/media/cec/core/cec-core.c             |   2 +-
 drivers/media/mc/mc-devnode.c                 |   2 +-
 drivers/pci/controller/dwc/pci-dra7xx.c       |   2 +-
 drivers/scsi/lpfc/lpfc_sli.c                  |  10 +-
 drivers/soc/ti/k3-ringacc.c                   |   4 +-
 drivers/tty/n_tty.c                           |   2 +-
 drivers/virt/acrn/ioreq.c                     |   3 +-
 fs/f2fs/segment.c                             |   8 +-
 fs/ocfs2/cluster/heartbeat.c                  |   2 +-
 fs/ocfs2/dlm/dlmdomain.c                      |   4 +-
 fs/ocfs2/dlm/dlmmaster.c                      |  18 +--
 fs/ocfs2/dlm/dlmrecovery.c                    |   2 +-
 fs/ocfs2/dlm/dlmthread.c                      |   2 +-
 include/asm-generic/bitops.h                  |   1 -
 include/asm-generic/bitops/le.h               |  64 --------
 include/linux/bitmap.h                        |   1 +
 include/linux/cpumask.h                       |  30 ++--
 .../bitops => include/linux}/find.h           | 149 +++++++++++++++++-
 lib/Kconfig                                   |   3 -
 lib/find_bit.c                                |  21 +++
 lib/find_bit_benchmark.c                      |  21 +++
 lib/genalloc.c                                |   2 +-
 net/ncsi/ncsi-manage.c                        |   4 +-
 tools/include/asm-generic/bitops.h            |   1 -
 tools/include/linux/bitmap.h                  |   7 +-
 .../bitops => tools/include/linux}/find.h     |  54 +++++--
 tools/lib/find_bit.c                          |  20 +++
 60 files changed, 319 insertions(+), 185 deletions(-)
 rename {tools/include/asm-generic/bitops => include/linux}/find.h (50%)
 rename {include/asm-generic/bitops => tools/include/linux}/find.h (83%)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-07-28 16:28 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-12 12:36 [PATCH 0/8] all: use find_next_*_bit() instead of find_first_*_bit() where possible Yury Norov
2021-06-12 12:36 ` [PATCH 1/8] bitops: protect find_first_{,zero}_bit properly Yury Norov
2021-06-12 21:38   ` Andy Shevchenko
2021-06-29  1:29     ` Yury Norov
2021-06-12 12:36 ` [PATCH 2/8] bitops: move find_bit_*_le functions from le.h to find.h Yury Norov
2021-06-12 12:36 ` [PATCH 3/8] include: move find.h from asm_generic to linux Yury Norov
2021-06-12 12:36 ` [PATCH RESEND 4/8] arch: remove GENERIC_FIND_FIRST_BIT entirely Yury Norov
2021-06-12 12:36 ` [PATCH 5/8] lib: add find_first_and_bit() Yury Norov
2021-06-14 15:45   ` Alexey Klimov
2021-06-12 12:36 ` [PATCH 6/8] cpumask: use find_first_and_bit() Yury Norov
2021-06-12 12:36 ` [PATCH 7/8] all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate Yury Norov
2021-06-12 21:47   ` Andy Shevchenko
2021-06-13  0:32     ` Yury Norov
     [not found]       ` <CAHp75VeXJcPai=w3Fbx11TPf_CZTusD6U_E2R+XSaCcebV7uBw@mail.gmail.com>
2021-06-15  1:07         ` Andrew Morton
2021-06-12 12:36 ` [PATCH 8/8] tools: sync tools/bitmap with mother linux Yury Norov
2021-06-13 23:16 ` [PATCH] cpumask: replace cpumask_next_* with cpumask_first_* where appropriate Yury Norov
2021-06-29  1:48 ` [PATCH 0/8] all: use find_next_*_bit() instead of find_first_*_bit() where possible Yury Norov
2021-06-29 16:18   ` Andy Shevchenko
2021-07-28 15:00 ` Yury Norov
2021-07-28 15:13   ` Joe Perches
2021-07-28 15:55     ` Yury Norov
2021-07-28 16:06       ` Joe Perches
2021-07-28 16:28         ` Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).