Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53ba5e09 authored by Andreas Krebbel's avatar Andreas Krebbel Committed by Martin Schwidefsky
Browse files

[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: default avatarAndreas Krebbel <krebbel1@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 13ffa927
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}