data_type large_stringclasses 3
values | source large_stringclasses 29
values | code large_stringlengths 98 49.4M | filepath large_stringlengths 5 161 ⌀ | message large_stringclasses 234
values | commit large_stringclasses 234
values | subject large_stringclasses 418
values | critique large_stringlengths 101 1.26M ⌀ | metadata dict |
|---|---|---|---|---|---|---|---|---|
source | linux | // SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2023 SiFive
* Author: Andy Chiu <andy.chiu@sifive.com>
*/
#include <linux/export.h>
#include <linux/sched/signal.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/prctl.h>
#include <... | arch/riscv/kernel/vector.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright 2024 Rivos, Inc
*/
#include <asm/vendorid_list.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/andes.h>
#include <asm/vendor_extensions/mips.h>
#include <asm/vendor_extensions/sifive.h>
#include <asm/vendor_extensions/thead.h>
#include <l... | arch/riscv/kernel/vendor_extensions.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <linux/vmcore_info.h>
#include <linux/pagemap.h>
void arch_crash_save_vmcoreinfo(void)
{
VMCOREINFO_NUMBER(phys_ram_base);
vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
#ifdef ... | arch/riscv/kernel/vmcore_info.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 Regents of the University of California
* Copyright (C) 2017 SiFive
* Copyright (C) 2020 Vitaly Wool, Konsulko AB
*/
#include <asm/pgtable.h>
#define LOAD_OFFSET KERNEL_LINK_ADDR
/* No __ro_after_init data in the .rodata section - which will alway... | arch/riscv/kernel/vmlinux-xip.lds.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 Regents of the University of California
* Copyright (C) 2017 SiFive
*/
#define RO_EXCEPTION_TABLE_ALIGN 4
#define RUNTIME_DISCARD_EXIT
#ifdef CONFIG_XIP_KERNEL
#include "vmlinux-xip.lds.S"
#else
#include <asm/pgtable.h>
#define LOAD_OFFSET KERNEL... | arch/riscv/kernel/vmlinux.lds.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#define vdso_start compat_vdso_start
#define vdso_end compat_vdso_end
#define __VDSO_PATH "arch/riscv/kernel/compat_vdso/compat_vdso.so"
#include "../vdso/vdso.S" | arch/riscv/kernel/compat_vdso/compat_vdso.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/csr.h>
#include <linux/processor.h>
#include "pi.h"
/*
* To avoid rewriting code include asm/archrandom.h and create macros
* for the functions that won't be included.
*/
#undef riscv_has_extension_unlikely
#define riscv_has_extension_likely(...) false
#undef... | arch/riscv/kernel/pi/archrandom_early.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <linux/types.h>
#include <linux/init.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
#include "pi.h"
static char early_cmdline[COMMAND_LINE_SIZE];
static char *get_early_cmdline(uintptr_t dtb_pa)
{
const char *f... | arch/riscv/kernel/pi/cmdline_early.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <linux/types.h>
#include <linux/init.h>
#include <linux/libfdt.h>
#include <linux/ctype.h>
#include <asm/csr.h>
#include "pi.h"
u64 get_kaslr_seed(uintptr_t dtb_pa)
{
int node, len;
fdt64_t *prop;
u64 ret;
node = fdt_path_offset((void *)dtb_pa, "/chosen");
if (n... | arch/riscv/kernel/pi/fdt_early.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
#ifndef _RISCV_PI_H_
#define _RISCV_PI_H_
#include <linux/types.h>
/*
* The following functions are exported (but prefixed). Declare them here so
* that LLVM does not complain it lacks the 'static' keyword (which, if
* added, makes LLVM complain because the function is unused... | arch/riscv/kernel/pi/pi.h | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0+
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <asm/sections.h>
#include "decode-insn.h"
#include "simulate-insn.h"
/* Return:
* INSN_REJECTED If instruction is one not allowed to kprobe,
* INSN_GOOD_N... | arch/riscv/kernel/probes/decode-insn.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0+ */
#ifndef _RISCV_KERNEL_KPROBES_DECODE_INSN_H
#define _RISCV_KERNEL_KPROBES_DECODE_INSN_H
#include <asm/sections.h>
#include <asm/kprobes.h>
enum probe_insn {
INSN_REJECTED,
INSN_GOOD_NO_SLOT,
INSN_GOOD,
};
enum probe_insn __kprobes
riscv_probe_decode_insn(probe_opcode_t *ad... | arch/riscv/kernel/probes/decode-insn.h | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0+
#define pr_fmt(fmt) "kprobes: " fmt
#include <linux/kprobes.h>
#include <linux/extable.h>
#include <linux/slab.h>
#include <linux/stop_machine.h>
#include <linux/vmalloc.h>
#include <asm/ptrace.h>
#include <linux/uaccess.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
#in... | arch/riscv/kernel/probes/kprobes.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Generic return hook for riscv.
*/
#include <linux/kprobes.h>
#include <linux/rethook.h>
#include "rethook.h"
/* This is called from arch_rethook_trampoline() */
unsigned long __used arch_rethook_trampoline_callback(struct pt_regs *regs)
{
return rethook_trampoline_hand... | arch/riscv/kernel/probes/rethook.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __RISCV_RETHOOK_H
#define __RISCV_RETHOOK_H
unsigned long arch_rethook_trampoline_callback(struct pt_regs *regs);
void arch_rethook_prepare(struct rethook_node *rhn, struct pt_regs *regs, bool mcount);
#endif | arch/riscv/kernel/probes/rethook.h | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0+ */
/*
* Author: Patrick Stählin <me@packi.ch>
*/
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/asm-offsets.h>
.text
.altmacro
.macro save_all_base_regs
REG_S x1, PT_RA(sp)
REG_S x3, PT_GP(sp)
REG_S x4, PT_TP(sp)
REG_S x5, PT_T0(sp)
REG_S x6, PT_T1(s... | arch/riscv/kernel/probes/rethook_trampoline.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0+
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include "decode-insn.h"
#include "simulate-insn.h"
static inline bool rv_insn_reg_get_val(struct pt_regs *regs, u32 index,
unsigned long *ptr)
{
if (index == 0)
*ptr = 0;
else if (index... | arch/riscv/kernel/probes/simulate-insn.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0+ */
#ifndef _RISCV_KERNEL_PROBES_SIMULATE_INSN_H
#define _RISCV_KERNEL_PROBES_SIMULATE_INSN_H
#include <asm/insn.h>
#define RISCV_INSN_REJECTED(name, code) \
do { \
if (riscv_insn_is_##name(code)) { \
return INSN_REJECTED; \
} \
} while (0)
#define ... | arch/riscv/kernel/probes/simulate-insn.h | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <linux/highmem.h>
#include <linux/ptrace.h>
#include <linux/uprobes.h>
#include <asm/insn.h>
#include "decode-insn.h"
#define UPROBE_TRAP_NR UINT_MAX
bool is_swbp_insn(uprobe_opcode_t *insn)
{
#ifdef CONFIG_RISCV_ISA_C
return (*insn & 0xffff) == UPROBE_SWBP_INSN;
#... | arch/riscv/kernel/probes/uprobes.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0+ */
#include <linux/linkage.h>
#include <asm/asm.h>
#include "test-kprobes.h"
SYM_FUNC_START(test_kprobes_add)
li a1, KPROBE_TEST_MAGIC_UPPER
li a2, KPROBE_TEST_MAGIC_LOWER
test_kprobes_add_addr1:
add a1, a1, a2
test_kprobes_add_addr2:
add a0, a1, x0
ret
SYM_FUNC_END(test_kpro... | arch/riscv/kernel/tests/kprobes/test-kprobes-asm.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0+
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include <kunit/test.h>
#include "test-kprobes.h"
static int kprobe_dummy_handler(struct kprobe *kp, struct pt_regs *regs)
{
return 0;
}
static void test_kprobe_riscv(struct kunit *test)
{
unsigned int num_kprobe = 0;
long (... | arch/riscv/kernel/tests/kprobes/test-kprobes.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0+ */
#ifndef TEST_KPROBES_H
#define TEST_KPROBES_H
/*
* The magic value that all the functions in the test_kprobes_functions array return. The test
* installs kprobes into these functions, and verify that the functions still correctly return this
* value.
*/
#define KPROBE_TEST_M... | arch/riscv/kernel/tests/kprobes/test-kprobes.h | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2023 Rivos Inc.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <kunit/test.h>
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Test module linking");
extern int test_set32(void);
extern int test_set16(void);
extern int test_s... | arch/riscv/kernel/tests/module_test/test_module_linking_main.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_set16
test_set16:
lw a0, set16
la t0, set16
#ifdef CONFIG_32BIT
slli t0, t0, 16
srli t0, t0, 16
#else
slli t0, t0, 48
srli t0, t0, 48
#endif
sub a0, a0, t0
ret
.data
set16:
.reloc set16, R_RISCV_SET16, set16
.wo... | arch/riscv/kernel/tests/module_test/test_set16.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_set32
test_set32:
lw a0, set32
la t0, set32
#ifndef CONFIG_32BIT
slli t0, t0, 32
srli t0, t0, 32
#endif
sub a0, a0, t0
ret
.data
set32:
.reloc set32, R_RISCV_SET32, set32
.word 0 | arch/riscv/kernel/tests/module_test/test_set32.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_set6
test_set6:
lw a0, set6
la t0, set6
#ifdef CONFIG_32BIT
slli t0, t0, 26
srli t0, t0, 26
#else
slli t0, t0, 58
srli t0, t0, 58
#endif
sub a0, a0, t0
ret
.data
set6:
.reloc set6, R_RISCV_SET6, set6
.word 0 | arch/riscv/kernel/tests/module_test/test_set6.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_set8
test_set8:
lw a0, set8
la t0, set8
#ifdef CONFIG_32BIT
slli t0, t0, 24
srli t0, t0, 24
#else
slli t0, t0, 56
srli t0, t0, 56
#endif
sub a0, a0, t0
ret
.data
set8:
.reloc set8, R_RISCV_SET8, set8
.word 0 | arch/riscv/kernel/tests/module_test/test_set8.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_sub16
test_sub16:
lh a0, sub16
addi a0, a0, -32
ret
first:
.space 32
second:
.data
sub16:
.reloc sub16, R_RISCV_ADD16, second
.reloc sub16, R_RISCV_SUB16, first
.half 0 | arch/riscv/kernel/tests/module_test/test_sub16.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_sub32
test_sub32:
lw a0, sub32
addi a0, a0, -32
ret
first:
.space 32
second:
.data
sub32:
.reloc sub32, R_RISCV_ADD32, second
.reloc sub32, R_RISCV_SUB32, first
.word 0 | arch/riscv/kernel/tests/module_test/test_sub32.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_sub6
test_sub6:
lb a0, sub6
addi a0, a0, -32
ret
first:
.space 32
second:
.data
sub6:
.reloc sub6, R_RISCV_SET6, second
.reloc sub6, R_RISCV_SUB6, first
.byte 0 | arch/riscv/kernel/tests/module_test/test_sub6.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_sub64
test_sub64:
#ifdef CONFIG_32BIT
lw a0, sub64
#else
ld a0, sub64
#endif
addi a0, a0, -32
ret
first:
.space 32
second:
.data
sub64:
.reloc sub64, R_RISCV_ADD64, second
.reloc sub64, R_RISCV_SUB64, first
.wo... | arch/riscv/kernel/tests/module_test/test_sub64.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_sub8
test_sub8:
lb a0, sub8
addi a0, a0, -32
ret
first:
.space 32
second:
.data
sub8:
.reloc sub8, R_RISCV_ADD8, second
.reloc sub8, R_RISCV_SUB8, first
.byte 0 | arch/riscv/kernel/tests/module_test/test_sub8.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2023 Rivos Inc.
*/
.text
.global test_uleb_basic
test_uleb_basic:
lw a0, second
addi a0, a0, -127
ret
.global test_uleb_large
test_uleb_large:
lw a0, fourth
addi a0, a0, -0x07e8
ret
.data
first:
.space 127
second:
.reloc second, R_RISCV_SET_ULEB128,... | arch/riscv/kernel/tests/module_test/test_uleb128.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2017 SiFive
*/
#include <linux/linkage.h>
#include <asm/unistd.h>
#include <asm/assembler.h>
.text
/* int __vdso_flush_icache(void *start, void *end, unsigned long flags); */
SYM_FUNC_START(__vdso_flush_icache)
.cfi_startproc
vdso_lpad
#ifdef CONFIG_... | arch/riscv/kernel/vdso/flush_icache.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2017 SiFive
*/
#include <linux/linkage.h>
#include <asm/unistd.h>
#include <asm/assembler.h>
.text
/* int __vdso_getcpu(unsigned *cpu, unsigned *node, void *unused); */
SYM_FUNC_START(__vdso_getcpu)
.cfi_startproc
vdso_lpad
/* For now, just do the s... | arch/riscv/kernel/vdso/getcpu.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025 Xi Ruoyao <xry111@xry111.site>. All Rights Reserved.
*/
#include <linux/types.h>
ssize_t __vdso_getrandom(void *buffer, size_t len, unsigned int flags, void *opaque_state, size_t opaque_len)
{
return __cvdso_getrandom(buffer, len, flags, opaque_state,... | arch/riscv/kernel/vdso/getrandom.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2023 Rivos, Inc
*/
#include <linux/string.h>
#include <linux/types.h>
#include <vdso/datapage.h>
#include <vdso/helpers.h>
extern int riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
size_t cpusetsize, unsigned long *cpus,
unsigned int flags);
... | arch/riscv/kernel/vdso/hwprobe.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
* Here we can supply some information useful to userland.
*/
#include <linux/elfnote.h>
#include <linux/version.h>
#include <asm/assembler.h>
ELFNOTE_START(Linux, 0, "a")
.long LINUX_VE... | arch/riscv/kernel/vdso/note.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2014 Regents of the University of California
*/
#include <linux/linkage.h>
#include <asm/unistd.h>
#include <asm/assembler.h>
.text
SYM_FUNC_START(__vdso_rt_sigreturn)
.cfi_startproc
.cfi_signal_frame
vdso_lpad
li a7, __NR_rt_sigreturn
ecall
.cfi... | arch/riscv/kernel/vdso/rt_sigreturn.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2023 Rivos, Inc */
#include <linux/linkage.h>
#include <asm/unistd.h>
#include <asm/assembler.h>
.text
SYM_FUNC_START(riscv_hwprobe)
.cfi_startproc
vdso_lpad
li a7, __NR_riscv_hwprobe
ecall
ret
.cfi_endproc
SYM_FUNC_END(riscv_hwprobe)
emit_riscv_feature_... | arch/riscv/kernel/vdso/sys_hwprobe.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2014 Regents of the University of California
*/
#include <linux/init.h>
#include <linux/linkage.h>
#include <asm/page.h>
#ifndef __VDSO_PATH
#define __VDSO_PATH "arch/riscv/kernel/vdso/vdso.so"
#endif
__PAGE_ALIGNED_DATA
.globl vdso_start, vdso_end
... | arch/riscv/kernel/vdso/vdso.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 Regents of the University of California
*/
#include <asm/page.h>
#include <asm/vdso.h>
#include <vdso/datapage.h>
OUTPUT_ARCH(riscv)
SECTIONS
{
VDSO_VVAR_SYMS
. = SIZEOF_HEADERS;
.hash : { *(.hash) } :text
.gnu.hash : { *(.gnu.hash) }
.dy... | arch/riscv/kernel/vdso/vdso.lds.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2025 Xi Ruoyao <xry111@xry111.site>. All Rights Reserved.
*
* Based on arch/loongarch/vdso/vgetrandom-chacha.S.
*/
#include <asm/asm.h>
#include <linux/linkage.h>
#include <asm/assembler.h>
.text
.macro ROTRI rd rs imm
slliw t0, \rs, 32 - \imm
srliw \rd... | arch/riscv/kernel/vdso/vgetrandom-chacha.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copied from arch/arm64/kernel/vdso/vgettimeofday.c
*
* Copyright (C) 2018 ARM Ltd.
* Copyright (C) 2020 SiFive
*/
#include <linux/time.h>
#include <linux/types.h>
#include <vdso/gettime.h>
int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
{
return _... | arch/riscv/kernel/vdso/vgettimeofday.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright 2025 Rivos, Inc
*/
#define vdso_start vdso_cfi_start
#define vdso_end vdso_cfi_end
#define __VDSO_PATH "arch/riscv/kernel/vdso_cfi/vdso-cfi.so"
#include "../vdso/vdso.S" | arch/riscv/kernel/vdso_cfi/vdso-cfi.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/cpufeature.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/andes.h>
#include <linux/array_size.h>
#include <linux/types.h>
/* All Andes vendor extensions supported in Linux */
static const struct riscv_isa_ext_data riscv_isa_vendor_ext_ande... | arch/riscv/kernel/vendor_extensions/andes.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025 MIPS.
*/
#include <asm/cpufeature.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/mips.h>
#include <linux/array_size.h>
#include <linux/cpumask.h>
#include <linux/types.h>
/* All MIPS vendor extensions supported in Linux */
stat... | arch/riscv/kernel/vendor_extensions/mips.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025 MIPS.
*/
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/mips.h>
#include <asm/vendor_extensions/mips_hwprobe.h>
#include <asm/vendor_extensions/vendor_hwprobe.h>
#include <linux/cpumask.h>
#include <linux/types.h>
#include <uapi/a... | arch/riscv/kernel/vendor_extensions/mips_hwprobe.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/cpufeature.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/sifive.h>
#include <linux/array_size.h>
#include <linux/types.h>
/* All SiFive vendor extensions supported in Linux */
static const struct riscv_isa_ext_data riscv_isa_vendor_ext_si... | arch/riscv/kernel/vendor_extensions/sifive.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/vendor_extensions/sifive.h>
#include <asm/vendor_extensions/sifive_hwprobe.h>
#include <asm/vendor_extensions/vendor_hwprobe.h>
#include <linux/cpumask.h>
#include <linux/types.h>
#include <uapi/asm/hwprobe.h>
#include <uapi/asm/vendor/sifive.h>
void hwprobe_is... | arch/riscv/kernel/vendor_extensions/sifive_hwprobe.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/cpufeature.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/thead.h>
#include <linux/array_size.h>
#include <linux/cpumask.h>
#include <linux/types.h>
/* All T-Head vendor extensions supported in Linux */
static const struct riscv_isa_ext_da... | arch/riscv/kernel/vendor_extensions/thead.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
#include <asm/vendor_extensions/thead.h>
#include <asm/vendor_extensions/thead_hwprobe.h>
#include <asm/vendor_extensions/vendor_hwprobe.h>
#include <linux/cpumask.h>
#include <linux/types.h>
#include <uapi/asm/hwprobe.h>
#include <uapi/asm/vendor/thead.h>
void hwprobe_isa_v... | arch/riscv/kernel/vendor_extensions/thead_hwprobe.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
* Copyright (C) 2022 Ventana Micro Systems Inc.
*
* Authors:
* Anup Patel <apatel@ventanamicro.com>
*/
#include <linux/kernel.h>
#include <linux/bitops.h>
#include <linux/irq.h>
#include <linux/irqchip/risc... | arch/riscv/kvm/aia.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
* Copyright (C) 2022 Ventana Micro Systems Inc.
*
* Authors:
* Anup Patel <apatel@ventanamicro.com>
*/
#include <linux/irqchip/riscv-aplic.h>
#include <linux/kvm_host.h>
#include <linux/math.h>
#include <li... | arch/riscv/kvm/aia_aplic.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
* Copyright (C) 2022 Ventana Micro Systems Inc.
*
* Authors:
* Anup Patel <apatel@ventanamicro.com>
*/
#include <linux/bits.h>
#include <linux/irqchip/riscv-imsic.h>
#include <linux/kvm_host.h>
#include <li... | arch/riscv/kvm/aia_device.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
* Copyright (C) 2022 Ventana Micro Systems Inc.
*
* Authors:
* Anup Patel <apatel@ventanamicro.com>
*/
#include <linux/atomic.h>
#include <linux/bitmap.h>
#include <linux/irqchip/riscv-imsic.h>
#include <li... | arch/riscv/kvm/aia_imsic.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
* Copyright (c) 2025 Ventana Micro Systems Inc.
*/
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/kvm_host.h>
#include <linux/module.h>
#include <linux/pgtable.h>
#include <asm/kvm_gstage.h... | arch/riscv/kvm/gstage.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/kvm_host.h>
#include <asm/cpufeature.h>
#include <asm/kvm_mmu.h... | arch/riscv/kvm/main.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/errno.h>
#include <linux/hugetlb.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/kvm_h... | arch/riscv/kvm/mmu.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2024 Ventana Micro Systems Inc.
*/
#include <linux/kvm_host.h>
#include <linux/vmalloc.h>
#include <asm/kvm_nacl.h>
DEFINE_STATIC_KEY_FALSE(kvm_riscv_nacl_available);
DEFINE_STATIC_KEY_FALSE(kvm_riscv_nacl_sync_csr_available);
DEFINE_STATIC_KEY_FALSE(kvm_riscv_... | arch/riscv/kvm/nacl.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2022 Ventana Micro Systems Inc.
*/
#include <linux/bitmap.h>
#include <linux/cpumask.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/smp.h>
#include <linux/kvm_host.h>
#include <asm/cacheflush.h>
#include <asm/csr.h>
... | arch/riscv/kvm/tlb.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Tracepoints for RISC-V KVM
*
* Copyright 2024 Beijing ESWIN Computing Technology Co., Ltd.
*
*/
#if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_KVM_H
#include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kvm
TRACE_EVENT(kvm_... | arch/riscv/kvm/trace.h | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kdebug.h>
#include <linux/module.h>
#include <linux/percpu.h>
#... | arch/riscv/kvm/vcpu.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/kvm_host.h>
#include <asm/csr.h>
#include <asm/insn-def.h>
#include <asm/kvm_mmu.h>
#include <asm/kvm_nacl.h>
static int gstage_page_fau... | arch/riscv/kvm/vcpu_exit.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/uaccess.h>
#include ... | arch/riscv/kvm/vcpu_fp.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
* Copyright (c) 2022 Ventana Micro Systems Inc.
*/
#include <linux/bitops.h>
#include <linux/kvm_host.h>
#include <asm/cpufeature.h>
#include <asm/insn.h>
struct insn_func {
unsigned long mask;
unsigned lo... | arch/riscv/kvm/vcpu_insn.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
* Copyright (C) 2023 Ventana Micro Systems Inc.
*
* Authors:
* Anup Patel <apatel@ventanamicro.com>
*/
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/uaccess.h>
#i... | arch/riscv/kvm/vcpu_onereg.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023 Rivos Inc
*
* Authors:
* Atish Patra <atishp@rivosinc.com>
*/
#define pr_fmt(fmt) "riscv-kvm-pmu: " fmt
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/perf/riscv_pmu.h>
#include <asm/csr.h>
#include <asm/k... | arch/riscv/kvm/vcpu_pmu.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_sbi.h>
#ifndef CONFIG_RISCV_SB... | arch/riscv/kvm/vcpu_sbi.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/version.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_sbi.... | arch/riscv/kvm/vcpu_sbi_base.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2025 Ventana Micro Systems Inc.
*/
#include <linux/kvm_host.h>
#include <asm/kvm_vcpu_sbi.h>
#include <asm/sbi.h>
const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental = {
.extid_start = SBI_EXT_EXPERIMENTAL_START,
.extid_end = SBI_EXT_EXPERIMENTAL_EN... | arch/riscv/kvm/vcpu_sbi_forward.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2025 Rivos Inc.
*
* Authors:
* Clément Léger <cleger@rivosinc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <asm/cpufeature.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_sbi.h>
#include <asm/kvm_vcpu_sbi_fwf... | arch/riscv/kvm/vcpu_sbi_fwft.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/wordpart.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_sbi... | arch/riscv/kvm/vcpu_sbi_hsm.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023 Rivos Inc
*
* Authors:
* Atish Patra <atishp@rivosinc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <asm/csr.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_sbi.h>
static int kvm_sbi_ext_pmu_handler(stru... | arch/riscv/kvm/vcpu_sbi_pmu.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_timer.h>
#include <asm/kvm_vcpu... | arch/riscv/kvm/vcpu_sbi_replace.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2023 Ventana Micro Systems Inc.
*/
#include <linux/kconfig.h>
#include <linux/kernel.h>
#include <linux/kvm_host.h>
#include <linux/mm.h>
#include <linux/sizes.h>
#include <asm/bug.h>
#include <asm/current.h>
#include <asm/kvm_vcpu_sbi.h>
#include <asm/page.h>
... | arch/riscv/kvm/vcpu_sbi_sta.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2024 Ventana Micro Systems Inc.
*/
#include <linux/kvm_host.h>
#include <linux/wordpart.h>
#include <asm/kvm_vcpu_sbi.h>
#include <asm/sbi.h>
static int kvm_sbi_ext_susp_handler(struct kvm_vcpu *vcpu, struct kvm_run *run,
struct kvm_vcpu_sbi_return *re... | arch/riscv/kvm/vcpu_sbi_system.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <asm/sbi.h>
#include <asm/kvm_vcpu_timer.h>
#include <asm/kvm_vcpu... | arch/riscv/kvm/vcpu_sbi_v01.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/asm-offsets.h>
#include <asm/csr.h>
.macro SAVE_HOST_GPRS
/* Save Host GPRs (except A0... | arch/riscv/kvm/vcpu_switch.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Atish Patra <atish.patra@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/uaccess.h>
#include <clocksource/timer-riscv.h>
#include <a... | arch/riscv/kvm/vcpu_timer.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022 SiFive
*
* Authors:
* Vincent Chen <vincent.chen@sifive.com>
* Greentime Hu <greentime.hu@sifive.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/uaccess.h>
#include <asm/cpufeature.h>
#include ... | arch/riscv/kvm/vcpu_vector.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/kvm_host.h>
#include <asm/kvm_mmu.h>... | arch/riscv/kvm/vm.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 Western Digital Corporation or its affiliates.
*
* Authors:
* Anup Patel <anup.patel@wdc.com>
*/
#include <linux/bitops.h>
#include <linux/cpumask.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/smp.h>
#in... | arch/riscv/kvm/vmid.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2023 Ventana Micro Systems Inc.
*/
#include <linux/linkage.h>
#include <linux/export.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
#include <asm/hwcap.h>
#include <asm/insn-def.h>
#include <asm/page.h>
#define CBOZ_ALT(order, old, new) ... | arch/riscv/lib/clear_page.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
/*
* Checksum library
*
* Influenced by arch/arm64/lib/csum.c
* Copyright (C) 2023-2024 Rivos Inc.
*/
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <linux/jump_label.h>
#include <linux/kasan-checks.h>
#include <linux/kernel.h>
#include <asm/cpufeature.h>
#incl... | arch/riscv/lib/csum.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Regents of the University of California
*/
#include <linux/delay.h>
#include <linux/math.h>
#include <linux/param.h>
#include <linux/timex.h>
#include <linux/types.h>
#include <linux/export.h>
#include <asm/processor.h>
/*
* This is copies from arch... | arch/riscv/lib/delay.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0
#include <linux/error-injection.h>
#include <linux/kprobes.h>
void override_function_with_return(struct pt_regs *regs)
{
instruction_pointer_set(regs, regs->ra);
}
NOKPROBE_SYMBOL(override_function_with_return); | arch/riscv/lib/error-inject.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2013 Regents of the University of California
*/
#include <linux/linkage.h>
#include <asm/asm.h>
/* void *memcpy(void *, const void *, size_t) */
SYM_FUNC_START(__memcpy)
move t6, a0 /* Preserve return value */
/* Defer to byte-oriented copy for smal... | arch/riscv/lib/memcpy.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2022 Michael T. Kloos <michael@michaelkloos.com>
*/
#include <linux/linkage.h>
#include <asm/asm.h>
SYM_FUNC_START(__memmove)
/*
* Returns
* a0 - dest
*
* Parameters
* a0 - Inclusive first byte of dest
* a1 - Inclusive first byte of s... | arch/riscv/lib/memmove.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2013 Regents of the University of California
*/
#include <linux/linkage.h>
#include <asm/asm.h>
/* void *memset(void *, int, size_t) */
SYM_FUNC_START(__memset)
move t0, a0 /* Preserve return value */
/* Defer to byte-oriented fill for small sizes ... | arch/riscv/lib/memset.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2023 SiFive
* Author: Andy Chiu <andy.chiu@sifive.com>
*/
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/vector.h>
#include <asm/simd.h>
#ifdef CONFIG_MMU
#include <asm/asm-prototypes.h>
#endif
#ifdef CONFIG_MMU
size_t riscv_v_usercopy... | arch/riscv/lib/riscv_v_helpers.c | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
#include <asm/hwcap.h>
/* int strcmp(const char *cs, const char *ct) */
SYM_FUNC_START(strcmp)
__ALTERNATIVE_CFG("nop", "j strcmp_zbb", 0, RISCV_ISA_EXT_ZBB,
IS_ENABLED(CONFIG_RISCV_ISA_... | arch/riscv/lib/strcmp.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
#include <asm/hwcap.h>
/* int strlen(const char *s) */
SYM_FUNC_START(strlen)
__ALTERNATIVE_CFG("nop", "j strlen_zbb", 0, RISCV_ISA_EXT_ZBB,
IS_ENABLED(CONFIG_RISCV_ISA_ZBB) && IS_ENABLE... | arch/riscv/lib/strlen.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/alternative-macros.h>
#include <asm/hwcap.h>
/* int strncmp(const char *cs, const char *ct, size_t count) */
SYM_FUNC_START(strncmp)
__ALTERNATIVE_CFG("nop", "j strncmp_zbb", 0, RISCV_ISA_EXT_ZBB,
IS_ENABLED(... | arch/riscv/lib/strncmp.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2018 Free Software Foundation, Inc.
*/
#include <linux/linkage.h>
#include <linux/export.h>
SYM_FUNC_START(__lshrti3)
beqz a2, .L1
li a5,64
sub a5,a5,a2
sext.w a4,a5
blez a5, .L2
sext.w a2,a2
srl a0,a0,a2
sll a4,a1,a4
srl a2,a1,a2
or a0,a0,a4
... | arch/riscv/lib/tishift.S | null | null | null | null | null |
source | linux | #include <linux/linkage.h>
#include <linux/export.h>
#include <asm/asm.h>
#include <asm/asm-extable.h>
#include <asm/csr.h>
#include <asm/hwcap.h>
#include <asm/alternative-macros.h>
.macro fixup op reg addr lbl
100:
\op \reg, \addr
_asm_extable 100b, \lbl
.endm
SYM_FUNC_START(__asm_copy_to_user)
#ifdef CONFIG_RI... | arch/riscv/lib/uaccess.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/asm-extable.h>
#include <asm/csr.h>
#define pDst a0
#define pSrc a1
#define iNum a2
#define iVL a3
#define ELEM_LMUL_SETTING m8
#define vData v0
.macro fixup op reg addr lbl
100:
\op \reg, \addr
_asm_extabl... | arch/riscv/lib/uaccess_vector.S | null | null | null | null | null |
source | linux | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2021 SiFive
*/
#include <linux/linkage.h>
#include <linux/export.h>
#include <asm/asm.h>
SYM_FUNC_START(xor_regs_2_)
vsetvli a3, a0, e8, m8, ta, ma
vle8.v v0, (a1)
vle8.v v8, (a2)
sub a0, a0, a3
vxor.vv v16, v0, v8
add a2, a2, a3
vse8.v v16, (... | arch/riscv/lib/xor.S | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
*/
#include <asm/dma-noncoherent.h>
struct riscv_nonstd_cache_ops noncoherent_cache_ops __ro_after_init;
void
riscv_noncoherent_register_cache_ops(const struct riscv_nonstd_cache_ops *ops)
{
if (!ops)
... | arch/riscv/mm/cache-ops.c | null | null | null | null | null |
source | linux | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2017 SiFive
*/
#include <linux/acpi.h>
#include <linux/of.h>
#include <linux/prctl.h>
#include <asm/acpi.h>
#include <asm/cacheflush.h>
#ifdef CONFIG_SMP
#include <asm/sbi.h>
static void ipi_remote_fence_i(void *info)
{
return local_flush_icache_all();
... | arch/riscv/mm/cacheflush.c | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.