mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
cpumask: Make for_each_cpu_wrap() available on UP as well
[ Upstream commitd207af2eab
] for_each_cpu_wrap() was originally added in the #else half of a large "#if NR_CPUS == 1" statement, but was omitted in the #if half. This patch adds the missing #if half to prevent compile errors when NR_CPUS is 1. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Michael Kelley <mhkelley@outlook.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: kys@microsoft.com Cc: martin.petersen@oracle.com Cc: mikelley@microsoft.com Fixes:c743f0a5c5
("sched/fair, cpumask: Export for_each_cpu_wrap()") Link: http://lkml.kernel.org/r/SN6PR1901MB2045F087F59450507D4FCC17CBF50@SN6PR1901MB2045.namprd19.prod.outlook.com Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c834b955d3
commit
4032cd4fd3
1 changed files with 2 additions and 0 deletions
|
@ -165,6 +165,8 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node)
|
||||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||||
#define for_each_cpu_not(cpu, mask) \
|
#define for_each_cpu_not(cpu, mask) \
|
||||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||||
|
#define for_each_cpu_wrap(cpu, mask, start) \
|
||||||
|
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start))
|
||||||
#define for_each_cpu_and(cpu, mask, and) \
|
#define for_each_cpu_and(cpu, mask, and) \
|
||||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
|
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue