提交 7ab64a85 编写于 作者: M Martin Schwidefsky

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: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 ac526f42
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册