Skip to content

Commit cb92315

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
smp: Remove allocation mask from on_each_cpu_cond.*()
The allocation mask is no longer used by on_each_cpu_cond() and on_each_cpu_cond_mask() and can be removed. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 67719ef commit cb92315

File tree

6 files changed

+11
-20
lines changed

6 files changed

+11
-20
lines changed

arch/x86/mm/tlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
708708
(void *)info, 1);
709709
else
710710
on_each_cpu_cond_mask(tlb_is_not_lazy, flush_tlb_func_remote,
711-
(void *)info, 1, GFP_ATOMIC, cpumask);
711+
(void *)info, 1, cpumask);
712712
}
713713

714714
/*

fs/buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ static bool has_bh_in_lru(int cpu, void *dummy)
14331433

14341434
void invalidate_bh_lrus(void)
14351435
{
1436-
on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1, GFP_KERNEL);
1436+
on_each_cpu_cond(has_bh_in_lru, invalidate_bh_lru, NULL, 1);
14371437
}
14381438
EXPORT_SYMBOL_GPL(invalidate_bh_lrus);
14391439

include/linux/smp.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ void on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func,
5151
* processor.
5252
*/
5353
void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
54-
void *info, bool wait, gfp_t gfp_flags);
54+
void *info, bool wait);
5555

5656
void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
57-
void *info, bool wait, gfp_t gfp_flags,
58-
const struct cpumask *mask);
57+
void *info, bool wait, const struct cpumask *mask);
5958

6059
int smp_call_function_single_async(int cpu, call_single_data_t *csd);
6160

kernel/smp.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,6 @@ EXPORT_SYMBOL(on_each_cpu_mask);
679679
* @info: An arbitrary pointer to pass to both functions.
680680
* @wait: If true, wait (atomically) until function has
681681
* completed on other CPUs.
682-
* @gfp_flags: GFP flags to use when allocating the cpumask
683-
* used internally by the function.
684-
*
685-
* The function might sleep if the GFP flags indicates a non
686-
* atomic allocation is allowed.
687682
*
688683
* Preemption is disabled to protect against CPUs going offline but not online.
689684
* CPUs going online during the call will not be seen or sent an IPI.
@@ -692,8 +687,7 @@ EXPORT_SYMBOL(on_each_cpu_mask);
692687
* from a hardware interrupt handler or from a bottom half handler.
693688
*/
694689
void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
695-
void *info, bool wait, gfp_t gfp_flags,
696-
const struct cpumask *mask)
690+
void *info, bool wait, const struct cpumask *mask)
697691
{
698692
int cpu = get_cpu();
699693

@@ -710,10 +704,9 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
710704
EXPORT_SYMBOL(on_each_cpu_cond_mask);
711705

712706
void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
713-
void *info, bool wait, gfp_t gfp_flags)
707+
void *info, bool wait)
714708
{
715-
on_each_cpu_cond_mask(cond_func, func, info, wait, gfp_flags,
716-
cpu_online_mask);
709+
on_each_cpu_cond_mask(cond_func, func, info, wait, cpu_online_mask);
717710
}
718711
EXPORT_SYMBOL(on_each_cpu_cond);
719712

kernel/up.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ EXPORT_SYMBOL(on_each_cpu_mask);
6969
* same condtions in UP and SMP.
7070
*/
7171
void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
72-
void *info, bool wait, gfp_t gfp_flags,
73-
const struct cpumask *mask)
72+
void *info, bool wait, const struct cpumask *mask)
7473
{
7574
unsigned long flags;
7675

@@ -85,9 +84,9 @@ void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func,
8584
EXPORT_SYMBOL(on_each_cpu_cond_mask);
8685

8786
void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func,
88-
void *info, bool wait, gfp_t gfp_flags)
87+
void *info, bool wait)
8988
{
90-
on_each_cpu_cond_mask(cond_func, func, info, wait, gfp_flags, NULL);
89+
on_each_cpu_cond_mask(cond_func, func, info, wait, NULL);
9190
}
9291
EXPORT_SYMBOL(on_each_cpu_cond);
9392

mm/slub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2341,7 +2341,7 @@ static bool has_cpu_slab(int cpu, void *info)
23412341

23422342
static void flush_all(struct kmem_cache *s)
23432343
{
2344-
on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1, GFP_ATOMIC);
2344+
on_each_cpu_cond(has_cpu_slab, flush_cpu_slab, s, 1);
23452345
}
23462346

23472347
/*

0 commit comments

Comments
 (0)