From 4e506d24b032b1e132df1bb102209b720c6a4fbe Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 13 Aug 2020 11:56:41 +0200 Subject: [PATCH] Fix building DFLTCC with clang --- arch/s390/dfltcc_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/s390/dfltcc_common.c b/arch/s390/dfltcc_common.c index bae40a2b5..b8ccfd825 100644 --- a/arch/s390/dfltcc_common.c +++ b/arch/s390/dfltcc_common.c @@ -22,10 +22,15 @@ static inline int is_dfltcc_enabled(void) { * compiling with -m31, gcc defaults to ESA mode, however, since the kernel * is 64-bit, it's always z/Architecture mode at runtime. */ - __asm__ volatile(".machinemode push\n" + __asm__ volatile( +#ifndef __clang__ + ".machinemode push\n" ".machinemode zarch\n" +#endif "stfle %[facilities]\n" +#ifndef __clang__ ".machinemode pop\n" +#endif : [facilities] "=Q" (facilities), [r0] "+r" (r0) :: "cc"); return is_bit_set((const char *)facilities, DFLTCC_FACILITY); } -- 2.47.3