From: Martin Schwidefsky Date: Mon, 28 Oct 2013 10:17:10 +0000 (+0100) Subject: s390/time: fix get_tod_clock_ext inline assembly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ab64a85e1a009046f97413a573e83fd85f7804d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git s390/time: fix get_tod_clock_ext inline assembly The get_tod_clock_ext inline assembly does not specify its output operands correctly. This can cause incorrect code to be generated. Cc: stable@vger.kernel.org # 3.12 Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 819b94d22720..8beee1cceba4 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h @@ -71,9 +71,11 @@ static inline void local_tick_enable(unsigned long long comp) typedef unsigned long long cycles_t; -static inline void get_tod_clock_ext(char *clk) +static inline void get_tod_clock_ext(char clk[16]) { - asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); + typedef struct { char _[sizeof(clk)]; } addrtype; + + asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc"); } static inline unsigned long long get_tod_clock(void)