diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-28 06:17:10 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-10-31 04:52:48 -0400 |
commit | 7ab64a85e1a009046f97413a573e83fd85f7804d (patch) | |
tree | a888f86f440089d79c611ff166caf743d5ce136a | |
parent | ac526f42abdae2cdc3ae1a24c855f731e1a90232 (diff) |
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 <schwidefsky@de.ibm.com>
-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 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) | |||
71 | 71 | ||
72 | typedef unsigned long long cycles_t; | 72 | typedef unsigned long long cycles_t; |
73 | 73 | ||
74 | static inline void get_tod_clock_ext(char *clk) | 74 | static inline void get_tod_clock_ext(char clk[16]) |
75 | { | 75 | { |
76 | asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); | 76 | typedef struct { char _[sizeof(clk)]; } addrtype; |
77 | |||
78 | asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc"); | ||
77 | } | 79 | } |
78 | 80 | ||
79 | static inline unsigned long long get_tod_clock(void) | 81 | static inline unsigned long long get_tod_clock(void) |