Commit b977f03e authored by Heiko Carstens's avatar Heiko Carstens

s390/processor: let cpu helper functions return boolean values

Let cpu helper functions return boolean values. This also allows to
make the code a bit simpler by getting rid of the "!!" construct.
Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent d9c2cf67
......@@ -54,19 +54,20 @@ static __always_inline void clear_cpu_flag(int flag)
S390_lowcore.cpu_flags &= ~(1UL << flag);
}
static __always_inline int test_cpu_flag(int flag)
static __always_inline bool test_cpu_flag(int flag)
{
return !!(S390_lowcore.cpu_flags & (1UL << flag));
return S390_lowcore.cpu_flags & (1UL << flag);
}
/*
* Test CIF flag of another CPU. The caller needs to ensure that
* CPU hotplug can not happen, e.g. by disabling preemption.
*/
static __always_inline int test_cpu_flag_of(int flag, int cpu)
static __always_inline bool test_cpu_flag_of(int flag, int cpu)
{
struct lowcore *lc = lowcore_ptr[cpu];
return !!(lc->cpu_flags & (1UL << flag));
return lc->cpu_flags & (1UL << flag);
}
#define arch_needs_cpu() test_cpu_flag(CIF_NOHZ_DELAY)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment