diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-18 15:50:42 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-18 15:50:42 +0300 |
commit | b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9 (patch) | |
tree | b71ed4906bbe2ca96d68dbf1d6d6f0fe2676f1de /tools/testing/selftests/kvm/steal_time.c | |
parent | 4e52cb9e2c22c9d860910794c82461064baadd9f (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | linux-b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9.tar.xz |
Merge tag 'v5.15-rc6' into asoc-5.16
Linux 5.15-rc6
Diffstat (limited to 'tools/testing/selftests/kvm/steal_time.c')
-rw-r--r-- | tools/testing/selftests/kvm/steal_time.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c index ecec30865a74..62f2eb9ee3d5 100644 --- a/tools/testing/selftests/kvm/steal_time.c +++ b/tools/testing/selftests/kvm/steal_time.c @@ -10,7 +10,6 @@ #include <sched.h> #include <pthread.h> #include <linux/kernel.h> -#include <sys/syscall.h> #include <asm/kvm.h> #include <asm/kvm_para.h> @@ -20,7 +19,6 @@ #define NR_VCPUS 4 #define ST_GPA_BASE (1 << 30) -#define MIN_RUN_DELAY_NS 200000UL static void *st_gva[NR_VCPUS]; static uint64_t guest_stolen_time[NR_VCPUS]; @@ -118,12 +116,12 @@ struct st_time { uint64_t st_time; }; -static int64_t smccc(uint32_t func, uint32_t arg) +static int64_t smccc(uint32_t func, uint64_t arg) { unsigned long ret; asm volatile( - "mov x0, %1\n" + "mov w0, %w1\n" "mov x1, %2\n" "hvc #0\n" "mov %0, x0\n" @@ -217,20 +215,6 @@ static void steal_time_dump(struct kvm_vm *vm, uint32_t vcpuid) #endif -static long get_run_delay(void) -{ - char path[64]; - long val[2]; - FILE *fp; - - sprintf(path, "/proc/%ld/schedstat", syscall(SYS_gettid)); - fp = fopen(path, "r"); - fscanf(fp, "%ld %ld ", &val[0], &val[1]); - fclose(fp); - - return val[1]; -} - static void *do_steal_time(void *arg) { struct timespec ts, stop; |