Commit 26ba0424 authored by Alexandre Ghiti's avatar Alexandre Ghiti Committed by Palmer Dabbelt

perf: tests: Adapt mmap-basic.c for riscv

riscv now supports mmaping hardware counters to userspace so adapt the test
to run on this architecture.
Signed-off-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Reviewed-by: default avatarIan Rogers <irogers@google.com>
parent 60bd5011
...@@ -284,7 +284,8 @@ static struct test_case tests__basic_mmap[] = { ...@@ -284,7 +284,8 @@ static struct test_case tests__basic_mmap[] = {
"permissions"), "permissions"),
TEST_CASE_REASON("User space counter reading of instructions", TEST_CASE_REASON("User space counter reading of instructions",
mmap_user_read_instr, mmap_user_read_instr,
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
(defined(__riscv) && __riscv_xlen == 64)
"permissions" "permissions"
#else #else
"unsupported" "unsupported"
...@@ -292,7 +293,8 @@ static struct test_case tests__basic_mmap[] = { ...@@ -292,7 +293,8 @@ static struct test_case tests__basic_mmap[] = {
), ),
TEST_CASE_REASON("User space counter reading of cycles", TEST_CASE_REASON("User space counter reading of cycles",
mmap_user_read_cycles, mmap_user_read_cycles,
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
(defined(__riscv) && __riscv_xlen == 64)
"permissions" "permissions"
#else #else
"unsupported" "unsupported"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment