Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/riscv/include/uapi/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#ifndef __ASSEMBLER__

#include <linux/bits.h>
#include <linux/types.h>

#define PTRACE_GETFDPIC 33
Expand Down
2 changes: 2 additions & 0 deletions tools/testing/selftests/riscv/cfi/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: GPL-2.0

CFLAGS += $(KHDR_INCLUDES)
CFLAGS += -I$(top_srcdir)/tools/include

Expand Down
2 changes: 2 additions & 0 deletions tools/testing/selftests/riscv/vector/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Copyright (C) 2021 ARM Limited
# Originally tools/testing/arm64/abi/Makefile

CFLAGS += -I$(top_srcdir)/tools/include

TEST_GEN_PROGS := v_initval vstate_prctl vstate_ptrace validate_v_ptrace
TEST_GEN_PROGS_EXTENDED := vstate_exec_nolibc v_exec_initval_nolibc
TEST_GEN_LIBS := v_helpers.c sys_hwprobe.c
Expand Down
16 changes: 10 additions & 6 deletions tools/testing/selftests/riscv/vector/validate_v_ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <unistd.h>
#include <errno.h>

#include <linux/bits.h>
#include <linux/ptrace.h>
#include <linux/elf.h>

Expand Down Expand Up @@ -290,10 +291,11 @@ TEST(ptrace_v_syscall_clobbering)

/* verify initial vsetvli settings */

if (is_xtheadvector_supported())
if (is_xtheadvector_supported()) {
EXPECT_EQ(5UL, regset_data->vtype);
else
} else {
EXPECT_EQ(9UL, regset_data->vtype);
}

EXPECT_EQ(regset_data->vlenb, regset_data->vl);
EXPECT_EQ(vlenb, regset_data->vlenb);
Expand Down Expand Up @@ -619,10 +621,11 @@ TEST_F(v_csr_invalid, ptrace_v_invalid_values)

/* verify initial vsetvli settings */

if (is_xtheadvector_supported())
if (is_xtheadvector_supported()) {
EXPECT_EQ(5UL, regset_data->vtype);
else
} else {
EXPECT_EQ(9UL, regset_data->vtype);
}

EXPECT_EQ(regset_data->vlenb, regset_data->vl);
EXPECT_EQ(vlenb, regset_data->vlenb);
Expand Down Expand Up @@ -827,10 +830,11 @@ TEST_F(v_csr_valid, ptrace_v_valid_values)

/* verify initial vsetvli settings */

if (is_xtheadvector_supported())
if (is_xtheadvector_supported()) {
EXPECT_EQ(5UL, regset_data->vtype);
else
} else {
EXPECT_EQ(9UL, regset_data->vtype);
}

EXPECT_EQ(regset_data->vlenb, regset_data->vl);
EXPECT_EQ(vlenb, regset_data->vlenb);
Expand Down
Loading