summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/proc/proc-empty-vm.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-02-21 18:11:03 +0300
committerJason Gunthorpe <jgg@nvidia.com>2023-02-21 18:11:03 +0300
commit939204e4df962982cbc84acc26b29b421dd530a8 (patch)
tree753698947a28ff1f18857d198a671317352f16c8 /tools/testing/selftests/proc/proc-empty-vm.c
parentb4ff830eca097df51af10a9be29e8cc817327919 (diff)
parentc9c3395d5e3dcc6daee66c6908354d47bf98cb0c (diff)
downloadlinux-939204e4df962982cbc84acc26b29b421dd530a8.tar.xz
Merge tag 'v6.2' into iommufd.git for-next
Resolve conflicts from the signature change in iommu_map: - drivers/infiniband/hw/usnic/usnic_uiom.c Switch iommu_map_atomic() to iommu_map(.., GFP_ATOMIC) - drivers/vfio/vfio_iommu_type1.c Following indenting change for GFP_KERNEL Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/testing/selftests/proc/proc-empty-vm.c')
-rw-r--r--tools/testing/selftests/proc/proc-empty-vm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/testing/selftests/proc/proc-empty-vm.c b/tools/testing/selftests/proc/proc-empty-vm.c
index d95b1cb43d9d..7588428b8fcd 100644
--- a/tools/testing/selftests/proc/proc-empty-vm.c
+++ b/tools/testing/selftests/proc/proc-empty-vm.c
@@ -25,6 +25,7 @@
#undef NDEBUG
#include <assert.h>
#include <errno.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -41,7 +42,7 @@
* 1: vsyscall VMA is --xp vsyscall=xonly
* 2: vsyscall VMA is r-xp vsyscall=emulate
*/
-static int g_vsyscall;
+static volatile int g_vsyscall;
static const char *g_proc_pid_maps_vsyscall;
static const char *g_proc_pid_smaps_vsyscall;
@@ -147,11 +148,12 @@ static void vsyscall(void)
g_vsyscall = 0;
/* gettimeofday(NULL, NULL); */
+ uint64_t rax = 0xffffffffff600000;
asm volatile (
- "call %P0"
- :
- : "i" (0xffffffffff600000), "D" (NULL), "S" (NULL)
- : "rax", "rcx", "r11"
+ "call *%[rax]"
+ : [rax] "+a" (rax)
+ : "D" (NULL), "S" (NULL)
+ : "rcx", "r11"
);
g_vsyscall = 1;