Commit 35af0d46 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Martin Schwidefsky

s390: correct some inline assembly constraints

Inline assembly code changed in this patch should really use "Q"
constraint "Memory reference without index register and with short
displacement". The kernel build with kasan instrumentation enabled
might occasionally break otherwise (due to stack instrumentation).
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 6b1f16ba
...@@ -23,7 +23,7 @@ void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags) ...@@ -23,7 +23,7 @@ void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
if (flags & KERNEL_FPC) if (flags & KERNEL_FPC)
/* Save floating point control */ /* Save floating point control */
asm volatile("stfpc %0" : "=m" (state->fpc)); asm volatile("stfpc %0" : "=Q" (state->fpc));
if (!MACHINE_HAS_VX) { if (!MACHINE_HAS_VX) {
if (flags & KERNEL_VXR_V0V7) { if (flags & KERNEL_VXR_V0V7) {
......
...@@ -37,7 +37,7 @@ static inline u64 get_vtimer(void) ...@@ -37,7 +37,7 @@ static inline u64 get_vtimer(void)
{ {
u64 timer; u64 timer;
asm volatile("stpt %0" : "=m" (timer)); asm volatile("stpt %0" : "=Q" (timer));
return timer; return timer;
} }
...@@ -48,7 +48,7 @@ static inline void set_vtimer(u64 expires) ...@@ -48,7 +48,7 @@ static inline void set_vtimer(u64 expires)
asm volatile( asm volatile(
" stpt %0\n" /* Store current cpu timer value */ " stpt %0\n" /* Store current cpu timer value */
" spt %1" /* Set new value imm. afterwards */ " spt %1" /* Set new value imm. afterwards */
: "=m" (timer) : "m" (expires)); : "=Q" (timer) : "Q" (expires));
S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer; S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer;
S390_lowcore.last_update_timer = expires; S390_lowcore.last_update_timer = expires;
} }
...@@ -135,8 +135,8 @@ static int do_account_vtime(struct task_struct *tsk) ...@@ -135,8 +135,8 @@ static int do_account_vtime(struct task_struct *tsk)
#else #else
" stck %1" /* Store current tod clock value */ " stck %1" /* Store current tod clock value */
#endif #endif
: "=m" (S390_lowcore.last_update_timer), : "=Q" (S390_lowcore.last_update_timer),
"=m" (S390_lowcore.last_update_clock)); "=Q" (S390_lowcore.last_update_clock));
clock = S390_lowcore.last_update_clock - clock; clock = S390_lowcore.last_update_clock - clock;
timer -= S390_lowcore.last_update_timer; timer -= S390_lowcore.last_update_timer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment