mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
s390/vtime: Use get_cpu_timer()
Instead of implementing get_vtimer() use get_cpu_timer() which does the same. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
parent
fa2ae4a377
commit
095c89e99b
@ -33,14 +33,6 @@ static DEFINE_PER_CPU(u64, mt_scaling_mult) = { 1 };
|
|||||||
static DEFINE_PER_CPU(u64, mt_scaling_div) = { 1 };
|
static DEFINE_PER_CPU(u64, mt_scaling_div) = { 1 };
|
||||||
static DEFINE_PER_CPU(u64, mt_scaling_jiffies);
|
static DEFINE_PER_CPU(u64, mt_scaling_jiffies);
|
||||||
|
|
||||||
static inline u64 get_vtimer(void)
|
|
||||||
{
|
|
||||||
u64 timer;
|
|
||||||
|
|
||||||
asm volatile("stpt %0" : "=Q" (timer));
|
|
||||||
return timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void set_vtimer(u64 expires)
|
static inline void set_vtimer(u64 expires)
|
||||||
{
|
{
|
||||||
u64 timer;
|
u64 timer;
|
||||||
@ -223,7 +215,7 @@ static u64 vtime_delta(void)
|
|||||||
{
|
{
|
||||||
u64 timer = S390_lowcore.last_update_timer;
|
u64 timer = S390_lowcore.last_update_timer;
|
||||||
|
|
||||||
S390_lowcore.last_update_timer = get_vtimer();
|
S390_lowcore.last_update_timer = get_cpu_timer();
|
||||||
|
|
||||||
return timer - S390_lowcore.last_update_timer;
|
return timer - S390_lowcore.last_update_timer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user