diff options
author | Sander Vanheule <sander@svanheule.net> | 2022-07-02 19:08:27 +0300 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-18 03:31:41 +0300 |
commit | 4f09903078eeb9138cddce8db06100b82f8620e8 (patch) | |
tree | 8149215e5778d6616761afa3fe0793ff509dbca0 /lib/cpumask.c | |
parent | adbcaef84088713bae9af5690cf566ce4fadfa22 (diff) | |
download | linux-4f09903078eeb9138cddce8db06100b82f8620e8.tar.xz |
cpumask: add UP optimised for_each_*_cpu versions
On uniprocessor builds, the following loops will always run over a mask
that contains one enabled CPU (cpu0):
- for_each_possible_cpu
- for_each_online_cpu
- for_each_present_cpu
Provide uniprocessor-specific macros for these loops, that always run
exactly once.
Link: https://lkml.kernel.org/r/3a92869b902a075b97be5d1452c9c6badbbff0df.1656777646.git.sander@svanheule.net
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Acked-by: Yury Norov <yury.norov@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Marco Elver <elver@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/cpumask.c')
0 files changed, 0 insertions, 0 deletions