diff options
author | Nadav Amit <namit@vmware.com> | 2021-02-20 15:17:10 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-06 12:59:10 +0100 |
commit | 291c4011dd7ac0cd0cebb727a75ee5a50d16dcf7 (patch) | |
tree | c9444ac6f4ba0152203d5e23dd5f1463a50b590e /include/linux/cpumask.h | |
parent | 09c5272e48614a30598e759c3c7bed126d22037d (diff) | |
download | linux-291c4011dd7ac0cd0cebb727a75ee5a50d16dcf7.tar.gz linux-291c4011dd7ac0cd0cebb727a75ee5a50d16dcf7.tar.bz2 linux-291c4011dd7ac0cd0cebb727a75ee5a50d16dcf7.zip |
cpumask: Mark functions as pure
cpumask_next_and() and cpumask_any_but() are pure, and marking them as
such seems to generate different and presumably better code for
native_flush_tlb_multi().
Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20210220231712.2475218-8-namit@vmware.com
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r-- | include/linux/cpumask.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 383684e30f12..c53364c4296d 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -235,7 +235,7 @@ static inline unsigned int cpumask_last(const struct cpumask *srcp) return find_last_bit(cpumask_bits(srcp), nr_cpumask_bits); } -unsigned int cpumask_next(int n, const struct cpumask *srcp); +unsigned int __pure cpumask_next(int n, const struct cpumask *srcp); /** * cpumask_next_zero - get the next unset cpu in a cpumask @@ -252,8 +252,8 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); } -int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); -int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); +int __pure cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); +int __pure cpumask_any_but(const struct cpumask *mask, unsigned int cpu); unsigned int cpumask_local_spread(unsigned int i, int node); int cpumask_any_and_distribute(const struct cpumask *src1p, const struct cpumask *src2p); |