Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[S390] get_clock inline assembly.

Add missing volatile to the get_clock / get_cycles inline assemblies
to avoid that consecutive calls get optimized away.

Signed-off-by: Andreas Krebbel <krebbel1@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Andreas Krebbel and committed by
Martin Schwidefsky
53ba5e09 13ffa927

+2 -2
+2 -2
include/asm-s390/timex.h
··· 19 19 { 20 20 cycles_t cycles; 21 21 22 - __asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); 22 + __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc"); 23 23 return cycles >> 2; 24 24 } 25 25 ··· 27 27 { 28 28 unsigned long long clk; 29 29 30 - __asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); 30 + __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc"); 31 31 return clk; 32 32 } 33 33