mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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: Alexandre Ghiti <alexghiti@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Ian Rogers <irogers@google.com>
This commit is contained in:
committed by
Palmer Dabbelt
parent
60bd501164
commit
26ba042414
@@ -284,7 +284,8 @@ static struct test_case tests__basic_mmap[] = {
|
||||
"permissions"),
|
||||
TEST_CASE_REASON("User space counter reading of instructions",
|
||||
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"
|
||||
#else
|
||||
"unsupported"
|
||||
@@ -292,7 +293,8 @@ static struct test_case tests__basic_mmap[] = {
|
||||
),
|
||||
TEST_CASE_REASON("User space counter reading of 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"
|
||||
#else
|
||||
"unsupported"
|
||||
|
||||
Reference in New Issue
Block a user