]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] get_clock inline assembly.
authorAndreas Krebbel <krebbel1@de.ibm.com>
Mon, 17 Jul 2006 14:09:42 +0000 (16:09 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 17 Jul 2006 14:09:42 +0000 (16:09 +0200)
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>
include/asm-s390/timex.h

index 4848057dafe498e87da4b25c562a8b2d5017b8da..5d0332a4c2bdd0b8d737aea0f8fd5d4fa96e546b 100644 (file)
@@ -19,7 +19,7 @@ static inline cycles_t get_cycles(void)
 {
        cycles_t cycles;
 
-       __asm__("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc");
+       __asm__ __volatile__ ("stck 0(%1)" : "=m" (cycles) : "a" (&cycles) : "cc");
        return cycles >> 2;
 }
 
@@ -27,7 +27,7 @@ static inline unsigned long long get_clock (void)
 {
        unsigned long long clk;
 
-       __asm__("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc");
+       __asm__ __volatile__ ("stck 0(%1)" : "=m" (clk) : "a" (&clk) : "cc");
        return clk;
 }