Skip to contentSkip to conversation

s390: mark __ctl_set_bit and __ctl_clear_bit as __always_inline

PATCH Applied Guenter Roeck 2 participants 2 messages Jun 9, 2019 – Jun 10, 2019 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: mark __ctl_set_bit and __ctl_clear_bit as __always_inline

s390:tinyconfig fails to build with gcc 8.3.0.

arch/s390/include/asm/ctl_reg.h:52:2: error: impossible constraint in 'asm'
asm volatile( \
^~~
arch/s390/include/asm/ctl_reg.h:62:2: note: in expansion of macro '__ctl_store'
__ctl_store(reg, cr, cr);
^~~~~~~~~~~
s390/include/asm/ctl_reg.h:41:2: error: impossible constraint in 'asm'
asm volatile( \
^~~
arch/s390/include/asm/ctl_reg.h:64:2:
note: in expansion of macro '__ctl_load'
__ctl_load(reg, cr, cr);
^~~~~~~~~~

Marking __ctl_set_bit and __ctl_clear_bit as __always_inline fixes the problem.

Fixes 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING")
---
 arch/s390/include/asm/ctl_reg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/include/asm/ctl_reg.h +2 -2
index 4600453536c2..3bda757317cf 100644
@@ -55,7 +55,7 @@
 		: "i" (low), "i" (high));				\
 } while (0)
 
-static inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
+static __always_inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
 {
 	unsigned long reg;
 
@@ -64,7 +64,7 @@ static inline void __ctl_set_bit(unsigned int cr, unsigned int bit)
 	__ctl_load(reg, cr, cr);
 }
 
-static inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
+static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
 {
 	unsigned long reg;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Guenter Roeck

s390:tinyconfig fails to build with gcc 8.3.0.

...

Quoted 8 lines

Marking __ctl_set_bit and __ctl_clear_bit as __always_inline fixes the problem.

Fixes 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING")
---
 arch/s390/include/asm/ctl_reg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks!