Skip to content

Commit 87f79d8

Browse files
committed
s390/processor: always inline cpu flag helper functions
arch_cpu_idle() is marked noinstr and therefore must only call functions which are also not instrumented. Make sure that cpu flag helper functions are always inlined to avoid that the compiler generates an out-of-line function for e.g. the call within arch_cpu_idle(). Reviewed-by: Sven Schnelle <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent a9cbc1b commit 87f79d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/s390/include/asm/processor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@
4444

4545
typedef long (*sys_call_ptr_t)(struct pt_regs *regs);
4646

47-
static inline void set_cpu_flag(int flag)
47+
static __always_inline void set_cpu_flag(int flag)
4848
{
4949
S390_lowcore.cpu_flags |= (1UL << flag);
5050
}
5151

52-
static inline void clear_cpu_flag(int flag)
52+
static __always_inline void clear_cpu_flag(int flag)
5353
{
5454
S390_lowcore.cpu_flags &= ~(1UL << flag);
5555
}
5656

57-
static inline int test_cpu_flag(int flag)
57+
static __always_inline int test_cpu_flag(int flag)
5858
{
5959
return !!(S390_lowcore.cpu_flags & (1UL << flag));
6060
}
@@ -63,7 +63,7 @@ static inline int test_cpu_flag(int flag)
6363
* Test CIF flag of another CPU. The caller needs to ensure that
6464
* CPU hotplug can not happen, e.g. by disabling preemption.
6565
*/
66-
static inline int test_cpu_flag_of(int flag, int cpu)
66+
static __always_inline int test_cpu_flag_of(int flag, int cpu)
6767
{
6868
struct lowcore *lc = lowcore_ptr[cpu];
6969
return !!(lc->cpu_flags & (1UL << flag));

0 commit comments

Comments
 (0)