diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-28 11:17:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 11:28:12 -0800 |
commit | b8600e27f208d08a5924d34d3b44f5564fa83e7f (patch) | |
tree | cb28092dc22d2e215351be79112e8d0be4f9f2f1 /arch/s390 | |
parent | 78bf8811f05d10a9ecdbe5f1825a3b9e6b8d8fed (diff) |
s390/time: fix get_tod_clock_ext inline assembly
commit 7ab64a85e1a009046f97413a573e83fd85f7804d upstream.
The get_tod_clock_ext inline assembly does not specify its output
operands correctly. This can cause incorrect code to be generated.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/timex.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 819b94d2272..8beee1cceba 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) |