mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 14:06:51 +07:00
[S390] Introduce get_clock_fast()
Add get_clock_fast() which uses the slightly faster stckf if available. If stckf is not available fall back to stck, which has the same width. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
388186bc92
commit
80376f347d
@ -86,6 +86,17 @@ static inline void get_clock_ext(char *clk)
|
|||||||
asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
|
asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned long long get_clock_fast(void)
|
||||||
|
{
|
||||||
|
unsigned long long clk;
|
||||||
|
|
||||||
|
if (test_facility(25))
|
||||||
|
asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
|
||||||
|
else
|
||||||
|
clk = get_clock();
|
||||||
|
return clk;
|
||||||
|
}
|
||||||
|
|
||||||
static inline unsigned long long get_clock_xt(void)
|
static inline unsigned long long get_clock_xt(void)
|
||||||
{
|
{
|
||||||
unsigned char clk[16];
|
unsigned char clk[16];
|
||||||
|
Loading…
Reference in New Issue
Block a user