Commit d0e60d46 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux

Pull bitmap updates from Yury Norov:

 - bitmap: optimize bitmap_weight() usage, from me

 - lib/bitmap.c make bitmap_print_bitmask_to_buf parseable, from Mauro
   Carvalho Chehab

 - include/linux/find: Fix documentation, from Anna-Maria Behnsen

 - bitmap: fix conversion from/to fix-sized arrays, from me

 - bitmap: Fix return values to be unsigned, from Kees Cook

It has been in linux-next for at least a week with no problems.

* tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux: (31 commits)
  nodemask: Fix return values to be unsigned
  bitmap: Fix return values to be unsigned
  KVM: x86: hyper-v: replace bitmap_weight() with hweight64()
  KVM: x86: hyper-v: fix type of valid_bank_mask
  ia64: cleanup remove_siblinginfo()
  drm/amd/pm: use bitmap_{from,to}_arr32 where appropriate
  KVM: s390: replace bitmap_copy with bitmap_{from,to}_arr64 where appropriate
  lib/bitmap: add test for bitmap_{from,to}_arr64
  lib: add bitmap_{from,to}_arr64
  lib/bitmap: extend comment for bitmap_(from,to)_arr32()
  include/linux/find: Fix documentation
  lib/bitmap.c make bitmap_print_bitmask_to_buf parseable
  MAINTAINERS: add cpumask and nodemask files to BITMAP_API
  arch/x86: replace nodes_weight with nodes_empty where appropriate
  mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate
  clocksource: replace cpumask_weight with cpumask_empty in clocksource.c
  genirq/affinity: replace cpumask_weight with cpumask_empty where appropriate
  irq: mips: replace cpumask_weight with cpumask_empty where appropriate
  drm/i915/pmu: replace cpumask_weight with cpumask_empty where appropriate
  arch/x86: replace cpumask_weight with cpumask_empty where appropriate
  ...
parents 23df9ba6 0dfe5407
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3533,10 +3533,14 @@ R: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
S:	Maintained
F:	include/linux/bitmap.h
F:	include/linux/cpumask.h
F:	include/linux/find.h
F:	include/linux/nodemask.h
F:	lib/bitmap.c
F:	lib/cpumask.c
F:	lib/find_bit.c
F:	lib/find_bit_benchmark.c
F:	lib/nodemask.c
F:	lib/test_bitmap.c
F:	tools/include/linux/bitmap.h
F:	tools/include/linux/find.h
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ common_shutdown_1(void *generic_ptr)
	/* Wait for the secondaries to halt. */
	set_cpu_present(boot_cpuid, false);
	set_cpu_possible(boot_cpuid, false);
	while (cpumask_weight(cpu_present_mask))
	while (!cpumask_empty(cpu_present_mask))
		barrier();
#endif

+1 −1
Original line number Diff line number Diff line
@@ -572,7 +572,7 @@ setup_arch (char **cmdline_p)
#ifdef CONFIG_ACPI_HOTPLUG_CPU
	prefill_possible_map();
#endif
	per_cpu_scan_finalize((cpumask_weight(&early_cpu_possible_map) == 0 ?
	per_cpu_scan_finalize((cpumask_empty(&early_cpu_possible_map) ?
		32 : cpumask_weight(&early_cpu_possible_map)),
		additional_cpus > 0 ? additional_cpus : 0);
#endif /* CONFIG_ACPI_NUMA */
+0 −4
Original line number Diff line number Diff line
@@ -576,8 +576,6 @@ clear_cpu_sibling_map(int cpu)
static void
remove_siblinginfo(int cpu)
{
	int last = 0;

	if (cpu_data(cpu)->threads_per_core == 1 &&
	    cpu_data(cpu)->cores_per_socket == 1) {
		cpumask_clear_cpu(cpu, &cpu_core_map[cpu]);
@@ -585,8 +583,6 @@ remove_siblinginfo(int cpu)
		return;
	}

	last = (cpumask_weight(&cpu_core_map[cpu]) == 1 ? 1 : 0);

	/* remove it from all sibling map's */
	clear_cpu_sibling_map(cpu);
}
+3 −4
Original line number Diff line number Diff line
@@ -213,11 +213,10 @@ void __init riscv_fill_hwcap(void)
		else
			elf_hwcap = this_hwcap;

		if (bitmap_weight(riscv_isa, RISCV_ISA_EXT_MAX))
			bitmap_and(riscv_isa, riscv_isa, this_isa, RISCV_ISA_EXT_MAX);
		else
		if (bitmap_empty(riscv_isa, RISCV_ISA_EXT_MAX))
			bitmap_copy(riscv_isa, this_isa, RISCV_ISA_EXT_MAX);

		else
			bitmap_and(riscv_isa, riscv_isa, this_isa, RISCV_ISA_EXT_MAX);
	}

	/* We don't support systems with F but without D, so mask those out
Loading