|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14 |
|
| #
1cf8e152 |
| 19-Mar-2025 |
Joel Savitz <[email protected]> |
cpumask: align text in comment
Since commit 4e1a7df45480 ("cpumask: Add enabled cpumask for present CPUs that can be brought online") introduced cpu_enabled_mask, the comment line describing the mas
cpumask: align text in comment
Since commit 4e1a7df45480 ("cpumask: Add enabled cpumask for present CPUs that can be brought online") introduced cpu_enabled_mask, the comment line describing the mask has been slightly out of alignment with the adjacent lines.
Fix this by removing a single space character.
Signed-off-by: Joel Savitz <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1 |
|
| #
14c38413 |
| 28-Jan-2025 |
Yury Norov <[email protected]> |
cpumask: drop cpumask_next_wrap_old()
Now that we have cpumask_next_wrap() wired to generic find_next_bit_wrap(), the old implementation is not needed.
Signed-off-by: Yury Norov <[email protected]
cpumask: drop cpumask_next_wrap_old()
Now that we have cpumask_next_wrap() wired to generic find_next_bit_wrap(), the old implementation is not needed.
Signed-off-by: Yury Norov <[email protected]>
show more ...
|
| #
3268cb2e |
| 28-Jan-2025 |
Yury Norov <[email protected]> |
cpumask: re-introduce cpumask_next{,_and}_wrap()
cpumask_next_wrap_old() has two additional parameters, comparing to its generic counterpart find_next_bit_wrap(). The reason for that is historical.
cpumask: re-introduce cpumask_next{,_and}_wrap()
cpumask_next_wrap_old() has two additional parameters, comparing to its generic counterpart find_next_bit_wrap(). The reason for that is historical.
Before 4fe49b3b97c262 ("lib/bitmap: introduce for_each_set_bit_wrap() macro"), cpumask_next_wrap() was used to implement for_each_cpu_wrap() iterator. Now that the iterator is an alias to generic for_each_set_bit_wrap(), the additional parameters aren't used and may confuse readers.
All existing users call cpumask_next_wrap() in a way that makes it possible to turn it to straight and simple alias to find_next_bit_wrap().
In a couple of places kernel users opencode missing cpumask_next_and_wrap(). Add it as well.
CC: Alexander Gordeev <[email protected]> CC: Bjorn Helgaas <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
| #
dc5bb9b7 |
| 28-Jan-2025 |
Yury Norov <[email protected]> |
cpumask: deprecate cpumask_next_wrap()
The next patch aligns implementation of cpumask_next_wrap() with the find_next_bit_wrap(), and it changes function signature.
To make the transition smooth, t
cpumask: deprecate cpumask_next_wrap()
The next patch aligns implementation of cpumask_next_wrap() with the find_next_bit_wrap(), and it changes function signature.
To make the transition smooth, this patch deprecates current implementation by adding an _old suffix. The following patches switch current users to the new implementation one by one.
No functional changes were intended.
Signed-off-by: Yury Norov <[email protected]>
show more ...
|
| #
9ffa4b35 |
| 11-Feb-2025 |
Yury Norov <[email protected]> |
cpumask: add for_each_{possible,online}_cpu_wrap
The iterators are trivial extensions of for_each_cpu_wrap(). They are used in the following patches of the series to replace cpumask_next_wrap().
Si
cpumask: add for_each_{possible,online}_cpu_wrap
The iterators are trivial extensions of for_each_cpu_wrap(). They are used in the following patches of the series to replace cpumask_next_wrap().
Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.13 |
|
| #
e876695a |
| 17-Jan-2025 |
I Hsin Cheng <[email protected]> |
cpumask: Rephrase comments for cpumask_any*() APIs
The cpumask_any*() APIs comment states that it returns a "random" cpu within the given cpumask. However it's not actually random as random itself s
cpumask: Rephrase comments for cpumask_any*() APIs
The cpumask_any*() APIs comment states that it returns a "random" cpu within the given cpumask. However it's not actually random as random itself stands a meaning for uniform distribution.
cpumask_any*() APIs are a naming convention for the caller to states that it doesn't care which CPU it gets, so change "random" to "arbitrary" would be more appropriate.
CC: Mark Rutland <[email protected]> Signed-off-by: I Hsin Cheng <[email protected]> Reviewed-by: Kuan-Wei Chiu <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4 |
|
| #
7f15d4ab |
| 20-Dec-2024 |
Dr. David Alan Gilbert <[email protected]> |
cpu: Remove unused init_cpu_online
The last use of init_cpu_online() was removed by the commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture")
Remove it.
Signed-off-by: Dr. David Alan G
cpu: Remove unused init_cpu_online
The last use of init_cpu_online() was removed by the commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1 |
|
| #
ab6b1010 |
| 19-Jul-2024 |
Brian Norris <[email protected]> |
cpumask: Switch from inline to __always_inline
On recent (v6.6+) builds with Clang (based on Clang 18.0.0) and certain configurations [0], I'm finding that (lack of) inlining decisions may lead to s
cpumask: Switch from inline to __always_inline
On recent (v6.6+) builds with Clang (based on Clang 18.0.0) and certain configurations [0], I'm finding that (lack of) inlining decisions may lead to section mismatch warnings like the following:
WARNING: modpost: vmlinux.o: section mismatch in reference: cpumask_andnot (section: .text) -> cpuhp_bringup_cpus_parallel.tmp_mask (section: .init.data) ERROR: modpost: Section mismatches detected.
or more confusingly:
WARNING: modpost: vmlinux: section mismatch in reference: cpumask_andnot+0x5f (section: .text) -> efi_systab_phys (section: .init.data)
The first warning makes a little sense, because cpuhp_bringup_cpus_parallel() (an __init function) calls cpumask_andnot() on tmp_mask (an __initdata symbol). If the compiler doesn't inline cpumask_andnot(), this may appear like a mismatch.
The second warning makes less sense, but might be because efi_systab_phys and cpuhp_bringup_cpus_parallel.tmp_mask are laid out near each other, and the latter isn't a proper C symbol definition.
In any case, it seems a reasonable solution to suggest more strongly to the compiler that these cpumask macros *must* be inlined, as 'inline' is just a recommendation.
This change has been previously proposed in the past as:
Subject: [PATCH 1/3] bitmap: switch from inline to __always_inline https://lore.kernel.org/all/[email protected]/
But the change has been split up, to separately justify the cpumask changes (which drive my work) and the bitmap/const optimizations (that Yury separately proposed for other reasons). This ends up as somewhere between a "rebase" and "rewrite" -- I had to rewrite most of the patch.
According to bloat-o-meter, vmlinux decreases minimally in size (-0.00% to -0.01%, depending on the version of GCC or Clang and .config in question) with this series of changes:
gcc 13.2.0, x86_64_defconfig -3005 bytes, Before=21944501, After=21941496, chg -0.01%
clang 16.0.6, x86_64_defconfig -105 bytes, Before=22571692, After=22571587, chg -0.00%
gcc 9.5.0, x86_64_defconfig -1771 bytes, Before=21557598, After=21555827, chg -0.01%
clang 18.0_pre516547 (ChromiumOS toolchain), x86_64_defconfig -191 bytes, Before=22615339, After=22615148, chg -0.00%
clang 18.0_pre516547 (ChromiumOS toolchain), based on ChromiumOS config + gcov -979 bytes, Before=76294783, After=76293804, chg -0.00%
[0] CONFIG_HOTPLUG_PARALLEL=y ('select'ed for x86 as of [1]) and CONFIG_GCOV_PROFILE_ALL.
[1] commit 0c7ffa32dbd6 ("x86/smpboot/64: Implement arch_cpuhp_init_parallel_bringup() and enable it")
Co-developed-by: Brian Norris <[email protected]> Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
| #
5819e464 |
| 08-Aug-2024 |
Gavin Shan <[email protected]> |
cpumask: Fix crash on updating CPU enabled mask
The CPU enabled mask instead of the CPU possible mask should be used by set_cpu_enabled(). Otherwise, we run into crash due to write to the read-only
cpumask: Fix crash on updating CPU enabled mask
The CPU enabled mask instead of the CPU possible mask should be used by set_cpu_enabled(). Otherwise, we run into crash due to write to the read-only CPU possible mask when vCPU is hot added on ARM64.
(qemu) device_add host-arm-cpu,id=cpu1,socket-id=1 Unable to handle kernel write to read-only memory at virtual address ffff800080fa7190 : Call trace: register_cpu+0x1a4/0x2e8 arch_register_cpu+0x84/0xd8 acpi_processor_add+0x480/0x5b0 acpi_bus_attach+0x1c4/0x300 acpi_dev_for_one_check+0x3c/0x50 device_for_each_child+0x68/0xc8 acpi_dev_for_each_child+0x48/0x80 acpi_bus_attach+0x84/0x300 acpi_bus_scan+0x74/0x220 acpi_scan_rescan_bus+0x54/0x88 acpi_device_hotplug+0x208/0x478 acpi_hotplug_work_fn+0x2c/0x50 process_one_work+0x15c/0x3c0 worker_thread+0x2ec/0x400 kthread+0x120/0x130 ret_from_fork+0x10/0x20
Fix it by passing the CPU enabled mask instead of the CPU possible mask to set_cpu_enabled().
Fixes: 51c4767503d5 ("Merge tag 'bitmap-6.11-rc1' of https://github.com:/norov/linux") Signed-off-by: Gavin Shan <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2 |
|
| #
4e1a7df4 |
| 29-May-2024 |
James Morse <[email protected]> |
cpumask: Add enabled cpumask for present CPUs that can be brought online
The 'offline' file in sysfs shows all offline CPUs, including those that aren't present. User-space is expected to remove not
cpumask: Add enabled cpumask for present CPUs that can be brought online
The 'offline' file in sysfs shows all offline CPUs, including those that aren't present. User-space is expected to remove not-present CPUs from this list to learn which CPUs could be brought online.
CPUs can be present but not-enabled. These CPUs can't be brought online until the firmware policy changes, which comes with an ACPI notification that will register the CPUs.
With only the offline and present files, user-space is unable to determine which CPUs it can try to bring online. Add a new CPU mask that shows this based on all the registered CPUs.
Signed-off-by: James Morse <[email protected]> Tested-by: Miguel Luis <[email protected]> Tested-by: Vishnu Pajjuri <[email protected]> Tested-by: Jianyong Wu <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Gavin Shan <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
show more ...
|
| #
eb4faa36 |
| 28-May-2024 |
Yury Norov <[email protected]> |
cpumask: split out include/linux/cpumask_types.h
Many core headers, like sched.h, include cpumask.h mostly for struct cpumask and cpumask_var_t. Those are frequently used headers and shouldn't pull
cpumask: split out include/linux/cpumask_types.h
Many core headers, like sched.h, include cpumask.h mostly for struct cpumask and cpumask_var_t. Those are frequently used headers and shouldn't pull more than the bare minimum.
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Yury Norov <[email protected]> Cc: Amit Daniel Kachhap <[email protected]> Cc: Anna-Maria Behnsen <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Daniel Lezcano <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Kees Cook <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Vincent Guittot <[email protected]> Cc: Viresh Kumar <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.10-rc1 |
|
| #
5c563ee9 |
| 24-May-2024 |
Yury Norov <[email protected]> |
cpumask: introduce assign_cpu() macro
Now that assign_bit() is a thin macro wrapper around set_bit() and clear_bit(), we can use it in cpumask API and drop duplicating implementations of set_cpu_xxx
cpumask: introduce assign_cpu() macro
Now that assign_bit() is a thin macro wrapper around set_bit() and clear_bit(), we can use it in cpumask API and drop duplicating implementations of set_cpu_xxx() helpers with no additional overhead.
Bloat-o-meter reports almost 2k less of generated code for allyesconfig, mostly in kernel/cpu.c: add/remove: 2/4 grow/shrink: 3/4 up/down: 498/-2228 (-1730)
Reviewed-by: Alexander Lobakin <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4 |
|
| #
6802f934 |
| 10-Apr-2024 |
Kyle Meyer <[email protected]> |
cpumask: Add for_each_cpu_from()
Add for_each_cpu_from() as a generic cpumask macro.
for_each_cpu_from() is the same as for_each_cpu(), except it starts at @cpu instead of zero.
Signed-off-by: Kyl
cpumask: Add for_each_cpu_from()
Add for_each_cpu_from() as a generic cpumask macro.
for_each_cpu_from() is the same as for_each_cpu(), except it starts at @cpu instead of zero.
Signed-off-by: Kyle Meyer <[email protected]> Acked-by: Yury Norov <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
| #
055e09ac |
| 17-Apr-2024 |
Alexey Dobriyan <[email protected]> |
cpumask: delete unused reset_cpu_possible_mask()
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Rasmus Villemoes <
cpumask: delete unused reset_cpu_possible_mask()
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Yury Norov <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
cdc66553 |
| 16-Apr-2024 |
Dawei Li <[email protected]> |
cpumask: Introduce cpumask_first_and_and()
Introduce cpumask_first_and_and() to get intersection between 3 cpumasks, free of any intermediate cpumask variable. Instead, cpumask_first_and_and() works
cpumask: Introduce cpumask_first_and_and()
Introduce cpumask_first_and_and() to get intersection between 3 cpumasks, free of any intermediate cpumask variable. Instead, cpumask_first_and_and() works in-place with all inputs and produces desired output directly.
Signed-off-by: Dawei Li <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Yury Norov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v6.9-rc3, v6.9-rc2, v6.9-rc1 |
|
| #
decde1fa |
| 12-Mar-2024 |
Charlie Jenkins <[email protected]> |
cpumask: Add assign cpu
Standardize an assign_cpu function for cpumasks.
Signed-off-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/20240312-fencei-v13-4-4b6bdc2bbf32@riv
cpumask: Add assign cpu
Standardize an assign_cpu function for cpumasks.
Signed-off-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
show more ...
|
| #
897fa2c3 |
| 03-Apr-2024 |
Mark Rutland <[email protected]> |
cpumask: add cpumask_any_and_but()
In some cases, it's useful to be able to select a random cpu from the intersection of two masks, excluding a particular CPU.
For example, in some systems an uncor
cpumask: add cpumask_any_and_but()
In some cases, it's useful to be able to select a random cpu from the intersection of two masks, excluding a particular CPU.
For example, in some systems an uncore PMU is shared by a subset of CPUs, and management of this PMU is assigned to some arbitrary CPU in this set. Whenever the management CPU is hotplugged out, we wish to migrate responsibility to another arbitrary CPU which is both in this set and online.
Today we can use cpumask_any_and() to select an arbitrary CPU in the intersection of two masks. We can also use cpumask_any_but() to select any arbitrary cpu in a mask excluding, a particular CPU.
To do both, we either need to use a temporary cpumask, which is wasteful, or use some lower-level cpumask helpers, which can be unclear.
This patch adds a new cpumask_any_and_but() to cater for these cases.
Signed-off-by: Mark Rutland <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rusty Russell <[email protected]> Cc: [email protected] Signed-off-by: Dawei Li <[email protected]> Acked-by: Yury Norov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
show more ...
|
| #
a37fbe66 |
| 27-Mar-2024 |
Alexander Lobakin <[email protected]> |
bitmap: introduce generic optimized bitmap_size()
The number of times yet another open coded `BITS_TO_LONGS(nbits) * sizeof(long)` can be spotted is huge. Some generic helper is long overdue.
Add o
bitmap: introduce generic optimized bitmap_size()
The number of times yet another open coded `BITS_TO_LONGS(nbits) * sizeof(long)` can be spotted is huge. Some generic helper is long overdue.
Add one, bitmap_size(), but with one detail. BITS_TO_LONGS() uses DIV_ROUND_UP(). The latter works well when both divident and divisor are compile-time constants or when the divisor is not a pow-of-2. When it is however, the compilers sometimes tend to generate suboptimal code (GCC 13):
48 83 c0 3f add $0x3f,%rax 48 c1 e8 06 shr $0x6,%rax 48 8d 14 c5 00 00 00 00 lea 0x0(,%rax,8),%rdx
%BITS_PER_LONG is always a pow-2 (either 32 or 64), but GCC still does full division of `nbits + 63` by it and then multiplication by 8. Instead of BITS_TO_LONGS(), use ALIGN() and then divide by 8. GCC:
8d 50 3f lea 0x3f(%rax),%edx c1 ea 03 shr $0x3,%edx 81 e2 f8 ff ff 1f and $0x1ffffff8,%edx
Now it shifts `nbits + 63` by 3 positions (IOW performs fast division by 8) and then masks bits[2:0]. bloat-o-meter:
add/remove: 0/0 grow/shrink: 20/133 up/down: 156/-773 (-617)
Clang does it better and generates the same code before/after starting from -O1, except that with the ALIGN() approach it uses %edx and thus still saves some bytes:
add/remove: 0/0 grow/shrink: 9/133 up/down: 18/-538 (-520)
Note that we can't expand DIV_ROUND_UP() by adding a check and using this approach there, as it's used in array declarations where expressions are not allowed. Add this helper to tools/ as well.
Reviewed-by: Przemek Kitszel <[email protected]> Acked-by: Yury Norov <[email protected]> Signed-off-by: Alexander Lobakin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3 |
|
| #
dcee2280 |
| 29-Jan-2024 |
Yury Norov <[email protected]> |
cpumask: define cleanup function for cpumasks
Now we can simplify code that allocates cpumasks for local needs.
Signed-off-by: Yury Norov <[email protected]> Signed-off-by: Paolo Abeni <pabeni@r
cpumask: define cleanup function for cpumasks
Now we can simplify code that allocates cpumasks for local needs.
Signed-off-by: Yury Norov <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
c1f5204e |
| 29-Jan-2024 |
Yury Norov <[email protected]> |
cpumask: add cpumask_weight_andnot()
Similarly to cpumask_weight_and(), cpumask_weight_andnot() is a handy helper that may help to avoid creating an intermediate mask just to calculate number of bit
cpumask: add cpumask_weight_andnot()
Similarly to cpumask_weight_and(), cpumask_weight_andnot() is a handy helper that may help to avoid creating an intermediate mask just to calculate number of bits that set in a 1st given mask, and clear in 2nd one.
Signed-off-by: Yury Norov <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5 |
|
| #
57f728d5 |
| 01-Aug-2023 |
Randy Dunlap <[email protected]> |
cpumask: kernel-doc cleanups and additions
Clean up some punctutation and abbreviations. Add kernel-doc notation for one function and function return value for 39 functions.
cpumask.h: Fix some pun
cpumask: kernel-doc cleanups and additions
Clean up some punctutation and abbreviations. Add kernel-doc notation for one function and function return value for 39 functions.
cpumask.h: Fix some punctuation (plural vs. possessive). Fix some abbreviations (ie. -> i.e., id -> ID).
Fix 35 warnings like this: include/linux/cpumask.h:161: warning: No description found for return value of 'cpumask_first'
cpumask.c: Add Return: value for 4 functions. Add kernel-doc for cpumask_any_distribute().
Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc4, v6.5-rc3, v6.5-rc2 |
|
| #
dcb60f9c |
| 13-Jul-2023 |
Randy Dunlap <[email protected]> |
cpumask: eliminate kernel-doc warnings
Update lib/cpumask.c and <linux/cpumask.h> to fix all kernel-doc warnings:
include/linux/cpumask.h:185: warning: Function parameter or member 'srcp1' not desc
cpumask: eliminate kernel-doc warnings
Update lib/cpumask.c and <linux/cpumask.h> to fix all kernel-doc warnings:
include/linux/cpumask.h:185: warning: Function parameter or member 'srcp1' not described in 'cpumask_first_and' include/linux/cpumask.h:185: warning: Function parameter or member 'srcp2' not described in 'cpumask_first_and' include/linux/cpumask.h:185: warning: Excess function parameter 'src1p' description in 'cpumask_first_and' include/linux/cpumask.h:185: warning: Excess function parameter 'src2p' description in 'cpumask_first_and'
lib/cpumask.c:59: warning: Function parameter or member 'node' not described in 'alloc_cpumask_var_node' lib/cpumask.c:169: warning: Function parameter or member 'src1p' not described in 'cpumask_any_and_distribute' lib/cpumask.c:169: warning: Function parameter or member 'src2p' not described in 'cpumask_any_and_distribute'
Fixes: 7b4967c53204 ("cpumask: Add alloc_cpumask_var_node()") Fixes: 839cad5fa54b ("cpumask: fix function description kernel-doc notation") Fixes: 93ba139ba819 ("cpumask: use find_first_and_bit()") Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Yury Norov <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6 |
|
| #
0f613bfa |
| 05-Jun-2023 |
Mark Rutland <[email protected]> |
locking/atomic: treewide: use raw_atomic*_<op>()
Now that we have raw_atomic*_<op>() definitions, there's no need to use arch_atomic*_<op>() definitions outside of the low-level atomic definitions.
locking/atomic: treewide: use raw_atomic*_<op>()
Now that we have raw_atomic*_<op>() definitions, there's no need to use arch_atomic*_<op>() definitions outside of the low-level atomic definitions.
Move treewide users of arch_atomic*_<op>() over to the equivalent raw_atomic*_<op>().
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
|
Revision tags: v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3 |
|
| #
1470afef |
| 16-Mar-2023 |
Dave Chinner <[email protected]> |
cpumask: introduce for_each_cpu_or
Equivalent of for_each_cpu_and, except it ORs the two masks together so it iterates all the CPUs present in either mask.
Signed-off-by: Dave Chinner <dchinner@red
cpumask: introduce for_each_cpu_or
Equivalent of for_each_cpu_and, except it ORs the two masks together so it iterates all the CPUs present in either mask.
Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
show more ...
|
|
Revision tags: v6.3-rc2 |
|
| #
e7304080 |
| 12-Mar-2023 |
Linus Torvalds <[email protected]> |
cpumask: relax sanity checking constraints
The cpumask_check() was unnecessarily tight, and causes problems for the users of cpumask_next().
We have a number of users that take the previous return
cpumask: relax sanity checking constraints
The cpumask_check() was unnecessarily tight, and causes problems for the users of cpumask_next().
We have a number of users that take the previous return value of one of the bit scanning functions and subtract one to keep it in "range". But since the scanning functions end up returning up to 'small_cpumask_bits' instead of the tighter 'nr_cpumask_bits', the range really needs to be using that widened form.
[ This "previous-1" behavior is also the reason we have all those comments about /* -1 is a legal arg here. */ and separate checks for that being ok. So we could have just made "small_cpumask_bits-1" be a similar special "don't check this" value.
Tetsuo Handa even suggested a patch that only does that for cpumask_next(), since that seems to be the only actual case that triggers, but that all makes it even _more_ magical and special. So just relax the check ]
One example of this kind of pattern being the 'c_start()' function in arch/x86/kernel/cpu/proc.c, but also duplicated in various forms on other architectures.
Reported-by: [email protected] Link: https://syzkaller.appspot.com/bug?extid=96cae094d90877641f32 Reported-by: Tetsuo Handa <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Fixes: 596ff4a09b89 ("cpumask: re-introduce constant-sized cpumask optimizations") Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|