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 WITH Linux-syscall-note */ #ifndef __LOONGARCH_UAPI_ASM_UCONTEXT_H #define __LOONGARCH_UAPI_ASM_UCONTEXT_H /** * struct ucontext - user context structure * @uc_flags: * @uc_link: * @uc_stack: * @uc_mcontext: holds basic processor state * @uc_sigmask: * @uc_extcontext: holds e...
arch/loongarch/include/uapi/asm/ucontext.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #include <asm/bitsperlong.h> #if __BITS_PER_LONG == 32 #include <asm/unistd_32.h> #else #include <asm/unistd_64.h> #endif
arch/loongarch/include/uapi/asm/unistd.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/uaccess.h> static inline int __get_inst(u32 *i, u32 *p, bool user) { return user ? get_user(*i, (u32 __user *)p) : get_kernel_nofault(*i, p); } static inline int __get_addr(unsigned long *a, unsigned long *p, bool user) { return user ? get_user(*a, (unsigned l...
arch/loongarch/kernel/access-helper.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * acpi.c - Architecture-Specific Low-Level ACPI Boot Support * * Author: Jianmin Lv <lvjianmin@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/acpi.h> #i...
arch/loongarch/kernel/acpi.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only #include <linux/export.h> #include <linux/mm.h> #include <linux/module.h> #include <asm/alternative.h> #include <asm/cacheflush.h> #include <asm/inst.h> #include <asm/sections.h> int __read_mostly alternatives_patched; EXPORT_SYMBOL_GPL(alternatives_patched); #define MAX_PATC...
arch/loongarch/kernel/alternative.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * asm-offsets.c: Calculate pt_regs and task_struct offsets. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #define COMPILE_OFFSETS #include <linux/types.h> #include <linux/sched.h> #include <linux/mm.h> #include <linux/kbuild.h> #include <linux/suspend...
arch/loongarch/kernel/asm-offsets.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * LoongArch cacheinfo support * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/cacheinfo.h> #include <linux/topology.h> #include <asm/bootinfo.h> #include <asm/cpu-info.h> int init_cache_level(unsigned int cpu) { int cache_present =...
arch/loongarch/kernel/cacheinfo.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Processor capabilities determination functions. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/ptrace.h> #include <linux/smp.h> #include <linux/stddef.h> #include <linux/export.h> #incl...
arch/loongarch/kernel/cpu-probe.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/crash_dump.h> #include <linux/io.h> #include <linux/uio.h> ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn, size_t csize, unsigned long offset) { void *vaddr; if (!csize) return 0; vaddr = memremap(__pfn_to_phys(pfn), PAGE_SIZE, MEMREMAP_...
arch/loongarch/kernel/crash_dump.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/acpi.h> #include <linux/dma-direct.h> void acpi_arch_dma_setup(struct device *dev) { int ret; u64 mask, end; const struct bus_dma_region *map = NULL; ret = acpi_dma_get_range(dev, &map); ...
arch/loongarch/kernel/dma.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/pe.h> #include <linux/sizes.h> .macro __EFI_PE_HEADER .long IMAGE_NT_SIGNATURE .Lcoff_header: #ifdef CONFIG_32BIT .short IMAGE_FILE_MACHINE_LOONGARCH32 /* Machine */ #else .short IMAGE...
arch/loongarch/kernel/efi-header.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * EFI initialization * * Author: Jianmin Lv <lvjianmin@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/acpi.h> #include <linux/efi.h> #include <linux/efi-bgrt.h> #include <li...
arch/loongarch/kernel/efi.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/binfmts.h> #include <linux/elf.h> #include <linux/sched.h> #include <asm/cpu-features.h> #include <asm/cpu-info.h> int arch_elf_pt_proc(void *_...
arch/loongarch/kernel/elf.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1994 - 2000, 2001, 2003 Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2001 MIPS Technologies, Inc. */ #include <asm/asm.h> #include ...
arch/loongarch/kernel/entry.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/acpi.h> #include <linux/clk.h> #include <linux/efi.h> #include <linux/export.h> #include <linux/memblock.h> #include <linux/of_clk.h> #include ...
arch/loongarch/kernel/env.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Author: Lu Zeng <zenglu@loongson.cn> * Pei Huang <huangpei@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/asm.h> #include <asm/asmmacro.h>...
arch/loongarch/kernel/fpu.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/ftrace.h> #include <linux/syscalls.h> #include <linux/uaccess.h> #include <asm/asm.h> #include <asm/asm-offsets.h> #include <asm/cacheflush.h> #include <asm/inst.h> #include...
arch/loongarch/kernel/ftrace.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Based on arch/arm64/kernel/ftrace.c * * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/ftrace.h> #include <linux/kprobes.h> #include <linux/uaccess.h> #include <asm/inst.h> #include <asm/module.h> static int ftrace_modify_code(unsigned long ...
arch/loongarch/kernel/ftrace_dyn.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1994 - 2000, 2001, 2003 Ralf Baechle * Copyright (C) 1999, 2000 Silicon Graphics, Inc. * Copyright (C) 2002, 2007 Maciej W. Rozycki * Copyright (C) 2001, 2012 MIPS T...
arch/loongarch/kernel/genex.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/threads.h> #include <asm/addrspace.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/bug.h> #include <asm/regdef.h> #include <asm/loongarch.h> #include ...
arch/loongarch/kernel/head.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022-2023 Loongson Technology Corporation Limited */ #define pr_fmt(fmt) "hw-breakpoint: " fmt #include <linux/hw_breakpoint.h> #include <linux/kprobes.h> #include <linux/perf_event.h> #include <asm/hw_breakpoint.h> /* Breakpoint currently in use for each BRP....
arch/loongarch/kernel/hw_breakpoint.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * LoongArch idle loop support. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/cpu.h> #include <linux/irqflags.h> #include <asm/cpu.h> #include <asm/idle.h> void __cpuidle arch_cpu_idle(void) { __arch_cpu_idle(); raw_local_irq_disable(...
arch/loongarch/kernel/idle.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #ifndef __LOONGARCH_KERNEL_IMAGE_VARS_H #define __LOONGARCH_KERNEL_IMAGE_VARS_H #ifdef CONFIG_EFI_STUB __efistub_strcmp = strcmp; __efistub_kernel_entry = kernel_entry; __efistub_kernel_asize = ker...
arch/loongarch/kernel/image-vars.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/sizes.h> #include <linux/uaccess.h> #include <linux/set_memory.h> #include <linux/stop_machine.h> #include <asm/cacheflush.h> #include <asm/inst.h> static DEFINE_RAW_SPINLOCK(patch_lock); voi...
arch/loongarch/kernel/inst.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/kernel.h> #include <linux/acpi.h> #include <linux/atomic.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/irqchip.h> #include <linux/kernel_stat.h...
arch/loongarch/kernel/irq.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2023 Loongson Technology Corporation Limited * * Based on arch/arm64/kernel/jump_label.c */ #include <linux/kernel.h> #include <linux/jump_label.h> #include <asm/inst.h> void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type) {...
arch/loongarch/kernel/jump_label.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> #include <linux/export.h> #include <linux/debugfs.h> #include <linux/kstrtox.h> #include <asm/loongarch.h> struct dentry *arch_debugfs_dir; EXPORT_SYMBOL(arch_debugfs_dir); static int sfb_state, tso_state; static void set_sfb_state(void *info) { int val = ...
arch/loongarch/kernel/kdebugfs.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Load EFI vmlinux file for the kexec_file_load syscall. * * Author: Youling Tang <tangyouling@kylinos.cn> * Copyright (C) 2025 KylinSoft Corporation. */ #define pr_fmt(fmt) "kexec_file(EFI): " fmt #include <linux/err.h> #include <linux/errno.h> #include <linux/kernel.h> #i...
arch/loongarch/kernel/kexec_efi.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Load ELF vmlinux file for the kexec_file_load syscall. * * Author: Youling Tang <tangyouling@kylinos.cn> * Copyright (C) 2025 KylinSoft Corporation. */ #define pr_fmt(fmt) "kexec_file(ELF): " fmt #include <linux/elf.h> #include <linux/kexec.h> #include <linux/slab.h>...
arch/loongarch/kernel/kexec_elf.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2023 Loongson Technology Corporation Limited */ #include <linux/cpu.h> #include <linux/export.h> #include <linux/init.h> #include <asm/fpu.h> #include <asm/smp.h> static unsigned int euen_mask = CSR_EUEN_FPEN; /* * The critical section between kernel_fpu...
arch/loongarch/kernel/kfpu.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * LoongArch KGDB support * * Copyright (C) 2023 Loongson Technology Corporation Limited */ #include <linux/hw_breakpoint.h> #include <linux/kdebug.h> #include <linux/kgdb.h> #include <linux/objtool.h> #include <linux/processor.h> #include <linux/ptrace.h> #include <linux...
arch/loongarch/kernel/kgdb.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only #include <linux/kdebug.h> #include <linux/kprobes.h> #include <linux/preempt.h> #include <asm/break.h> #define KPROBE_BP_INSN __emit_break(BRK_KPROBE_BP) #define KPROBE_SSTEPBP_INSN __emit_break(BRK_KPROBE_SSTEPBP) DEFINE_PER_CPU(struct kprobe *, current_kprobe); DEFINE_PER_C...
arch/loongarch/kernel/kprobes.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Author: Qi Hu <huqi@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/asm-extable.h> #include <asm/asm-offsets.h> #include <asm/e...
arch/loongarch/kernel/lbt.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * machine_kexec.c for kexec * * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/compiler.h> #include <linux/cpu.h> #include <linux/kexec.h> #include <linux/crash_dump.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/libfdt.h...
arch/loongarch/kernel/machine_kexec.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * kexec_file for LoongArch * * Author: Youling Tang <tangyouling@kylinos.cn> * Copyright (C) 2025 KylinSoft Corporation. * * Most code is derived from LoongArch port of kexec-tools */ #define pr_fmt(fmt) "kexec_file: " fmt #include <linux/ioport.h> #include <linux/kernel....
arch/loongarch/kernel/machine_kexec_file.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * LoongArch specific _mcount support * * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/ftrace.h> #include <asm/regdef.h> #include <asm/stackframe.h> .text #define MCOUNT_S0_OFFSET (0) #define MCOUNT_RA_OFFSET (SZRE...
arch/loongarch/kernel/mcount.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <asm/ftrace.h> #include <asm/regdef.h> #include <asm/stackframe.h> .text /* * Due to -fpatchable-function-entry=2: the compiler inserted 2 NOPs before the * regular C function prologue. When PC arri...
arch/loongarch/kernel/mcount_dyn.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/efi.h> #include <linux/initrd.h> #include <linux/memblock.h> #include <asm/bootinfo.h> #include <asm/loongson.h> #include <asm/sections.h> void __init memblock_init(void) { u32 mem_t...
arch/loongarch/kernel/mem.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/elf.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleloader.h> #include <linux/ftrace.h> #include <linux/sort.h> Elf_Addr module_emit_got_entry(struct module *mod, ...
arch/loongarch/kernel/module-sections.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0+ /* * Author: Hanlu Li <lihanlu@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #define pr_fmt(fmt) "kmod: " fmt #include <linux/moduleloader.h> #include <linux/elf.h> #include <linux/mm.h> #inc...
arch/loongarch/kernel/module.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Xiang Gao <gaoxiang@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/mm.h> #include <linux/mmzone.h> #include <linux...
arch/loongarch/kernel/numa.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/types.h> #include <linux/interrupt.h> #include <linux/irq_work.h> #include <linux/jump_label.h> #include <linux/kvm_para.h> #include <linux/reboot.h> #include <linux/static_call.h> #include <linux/sched/cputime.h> #include <asm/paravirt.h> static int has_steal_clock;...
arch/loongarch/kernel/paravirt.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Linux performance counter support for LoongArch. * * Copyright (C) 2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 2010 MIPS Technologies, Inc. * Copyright (C) 2011 Cavium Networks, Inc. * Author: Deng-Cheng Zhu */ #include <linux/cp...
arch/loongarch/kernel/perf_event.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 2013 Cavium, Inc. */ #include <linux/perf_event.h> #include <asm/ptrace.h> #ifdef CONFIG_32BIT u64 perf_reg_abi(struct task_struct *tsk) { return PERF_SAMPLE_REGS_ABI_32; }...
arch/loongarch/kernel/perf_regs.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/delay.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/seq_file.h> #include <asm/bootinfo.h> #include <asm/cpu.h> #include <asm/cpu-features.h> #include <asm/idle.h> #includ...
arch/loongarch/kernel/proc.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others. * Copyright (C) 2005, 2006 by Ralf Baechle (ralf@linux-mips.org) * Copyright...
arch/loongarch/kernel/process.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Hanlu Li <lihanlu@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1992 Ross Biro * Copyright (C) Linus Torvalds * Copyright (C) 1994, 95, 96, 9...
arch/loongarch/kernel/ptrace.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Support for Kernel relocation at boot time * * Copyright (C) 2023 Loongson Technology Corporation Limited */ #include <linux/elf.h> #include <linux/kernel.h> #include <linux/printk.h> #include <linux/panic_notifier.h> #include <linux/start_kernel.h> #include <asm/bootinfo.h...
arch/loongarch/kernel/relocate.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * relocate_kernel.S for kexec * * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/kexec.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/regdef.h> #include <asm/loongarch.h> #include <asm/stackframe.h> #include <asm/addrspace.h...
arch/loongarch/kernel/relocate_kernel.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/kernel.h> #include <linux/acpi.h> #include <linux/efi.h> #include <linux/export.h> #include <linux/pm.h> #include <linux/types.h> #include <linux/reboot.h> #include <linux/delay.h> #include <lin...
arch/loongarch/kernel/reset.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Generic return hook for LoongArch. */ #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_handl...
arch/loongarch/kernel/rethook.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LOONGARCH_RETHOOK_H #define __LOONGARCH_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/loongarch/kernel/rethook.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0+ */ #include <linux/linkage.h> #include <asm/stackframe.h> .text .macro save_all_base_regs cfi_st ra, PT_R1 cfi_st tp, PT_R2 cfi_st a0, PT_R4 cfi_st a1, PT_R5 cfi_st a2, PT_R6 cfi_st a3, PT_R7 cfi_st a4, PT_R8 cfi_st a5, PT_R9 cfi_st a6, PT_R10 cfi_st a7, PT_R11 cfi_s...
arch/loongarch/kernel/rethook_trampoline.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1995 Linus Torvalds * Copyright (C) 1995 Waldorf Electronics * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 Ralf Baechle * Copyright (C) 1996 Stoned Elipot ...
arch/loongarch/kernel/setup.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0+ /* * Author: Hanlu Li <lihanlu@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1994 - 2000 Ralf Baechle * Copyrigh...
arch/loongarch/kernel/signal.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 2000, 2001 Kanoj Sarcar * Copyright (C) 2000, 2001 Ralf Baechle * Copyright (C) 2000, 2001 Silicon Graphics, Inc. * Copyright (C) 2000, 2001, 2003 Broadcom Corp...
arch/loongarch/kernel/smp.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Stack trace management functions * * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/sched.h> #include <linux/stacktrace.h> #include <linux/uaccess.h> #include <asm/stacktrace.h> #include <asm/unwind.h> void arch_stack_walk(stack_trace_consume...
arch/loongarch/kernel/stacktrace.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/asm-offsets.h> #include <asm/loongarch.h> #include <asm/regdef.h> #include <asm/stackframe.h> #include <asm/thread_info.h> /* * task_struct *__s...
arch/loongarch/kernel/switch.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0+ /* * Author: Hanlu Li <lihanlu@loongson.cn> * Huacai Chen <chenhuacai@loongson.cn> * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/capability.h> #include <linux/entry-common.h> #include <linux/errno.h> #include <linux/linkage.h> #i...
arch/loongarch/kernel/syscall.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * LoongArch specific sysrq operations. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/init.h> #include <linux/smp.h> #include <linux/spinlock.h> #include <linux/sysrq.h> #include <linux/workqueue.h> #include <asm/cpu-features.h> #includ...
arch/loongarch/kernel/sysrq.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Common time service routines for LoongArch machines. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/clockchips.h> #include <linux/cpuhotplug.h> #include <linux/delay.h> #include <linux/export.h> #include <linux/init.h> #include <linux/...
arch/loongarch/kernel/time.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/acpi.h> #include <linux/cpu.h> #include <linux/cpumask.h> #include <linux/init.h> #include <linux/node.h> #include <linux/nodemask.h> #include <linux/percpu.h> #include <asm/bootinfo.h> #include <acpi/processor.h> #ifdef CONFIG_HOTPLUG_CPU bool arch_cpu_is_hotplugga...
arch/loongarch/kernel/topology.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/bitfield.h> #include <linux/bitops.h> #include <linux/bug.h> #include <linux/compiler.h> #include <linux/context_tracking.h> #include <linux/entry...
arch/loongarch/kernel/traps.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Handle unaligned accesses by emulation. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1996, 1998, 1999, 2002 by Ralf Baechle * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) 2014 Imagination Technolo...
arch/loongarch/kernel/unaligned.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022-2023 Loongson Technology Corporation Limited */ #include <linux/kernel.h> #include <linux/ftrace.h> #include <asm/unwind.h> bool default_next_frame(struct unwind_state *state) { struct stack_info *info = &state->stack_info; unsigned long addr; if (unwi...
arch/loongarch/kernel/unwind.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <asm/unwind.h> #include <linux/export.h> unsigned long unwind_get_return_address(struct unwind_state *state) { return __unwind_get_return_address(state); } EXPORT_SYMBOL_GPL(unwind_get_return_address); v...
arch/loongarch/kernel/unwind_guess.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only #include <linux/export.h> #include <linux/module.h> #include <linux/objtool.h> #include <linux/sort.h> #include <asm/exception.h> #include <asm/orc_header.h> #include <asm/orc_lookup.h> #include <asm/orc_types.h> #include <asm/ptrace.h> #include <asm/setup.h> #include <asm/stack...
arch/loongarch/kernel/unwind_orc.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2022 Loongson Technology Corporation Limited */ #include <linux/cpumask.h> #include <linux/export.h> #include <linux/ftrace.h> #include <linux/kallsyms.h> #include <asm/inst.h> #include <asm/loongson.h> #include <asm/ptrace.h> #include <asm/setup.h> #include <as...
arch/loongarch/kernel/unwind_prologue.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only #include <linux/highmem.h> #include <linux/ptrace.h> #include <linux/sched.h> #include <linux/uprobes.h> #include <asm/cacheflush.h> #define UPROBE_TRAP_NR UINT_MAX int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long addr) { i...
arch/loongarch/kernel/uprobes.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Author: Huacai Chen <chenhuacai@loongson.cn> * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/binfmts.h> #include <linux/elf.h> #include <linux/err.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/kernel.h> #include <li...
arch/loongarch/kernel/vdso.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/sizes.h> #include <asm/asm-offsets.h> #include <asm/thread_info.h> #include <asm/orc_lookup.h> #define PAGE_SIZE _PAGE_SIZE #define RO_EXCEPTION_TABLE_ALIGN 4 #define PHYSADDR_MASK 0xffffffffffff /* 48-bit */ /* * Put .bss..swapper_pg_dir as the first thing in...
arch/loongarch/kernel/vmlinux.lds.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/err.h> #include <linux/errno.h> #include <linux/kvm_host.h> #include <linux/module.h> #include <linux/preempt.h> #include <linux/vmalloc.h> #include <trace/events/kvm.h> #include <asm/fpu.h> #i...
arch/loongarch/kvm/exit.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/err.h> #include <linux/errno.h> #include <asm/kvm_csr.h> #include <asm/kvm_vcpu.h> static unsigned int priority_to_irq[EXCCODE_INT_NUM] = { [INT_TI] = CPU_TIMER, [INT_IPI] = CPU_IPI, [INT_S...
arch/loongarch/kvm/interrupt.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2024 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <trace/events/kvm.h> #include <asm/kvm_pch_pic.h> static int kvm_set_pic_irq(struct kvm_kernel_irq_routing_entry *e, struct kvm *kvm, int irq_source_id, int level, bool line_...
arch/loongarch/kvm/irqfd.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/err.h> #include <linux/module.h> #include <linux/kvm_host.h> #include <asm/cacheflush.h> #include <asm/cpufeature.h> #include <asm/kvm_csr.h> #include <asm/kvm_eiointc.h> #include <asm/kvm_pch_...
arch/loongarch/kvm/main.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/highmem.h> #include <linux/hugetlb.h> #include <linux/kvm_host.h> #include <linux/page-flags.h> #include <linux/uaccess.h> #include <asm/mmu_context.h> #include <asm/pgalloc.h> #include <asm/tl...
arch/loongarch/kvm/mmu.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/linkage.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/loongarch.h> #include <asm/regdef.h> #include <asm/unwind_hints.h> #define HGPR_OFFSET(x) (PT_R0 + 8*x) #define GGPR...
arch/loongarch/kvm/switch.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <asm/delay.h> #include <asm/kvm_csr.h> #include <asm/kvm_vcpu.h> /* * ktime_to_tick() - Scale ktime_t to timer tick value. */ static inline u64 ktime_to_tick(struct kvm_...
arch/loongarch/kvm/timer.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <asm/tlb.h> #include <asm/kvm_csr.h> /* * kvm_flush_tlb_all() - Flush all root TLB entries for guests. * * Invalidate all entries including GVA-->GPA and GPA-->HPA mapp...
arch/loongarch/kvm/tlb.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_KVM_H #include <linux/tracepoint.h> #include <asm/kvm_csr.h> #undef TRACE_SYSTEM #define TRACE_SYSTEM kvm /* * Tracepoints f...
arch/loongarch/kvm/trace.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <asm/fpu.h> #include <asm/lbt.h> #include <asm/loongarch.h> #include <asm/setup.h> #include <asm/time.h> #include <asm/timex.h> #define CREATE_TRACE_POINTS #include "trace...
arch/loongarch/kvm/vcpu.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2023 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <asm/kvm_mmu.h> #include <asm/kvm_vcpu.h> #include <asm/kvm_csr.h> #include <asm/kvm_eiointc.h> #include <asm/kvm_pch_pic.h> const struct _kvm_stats_desc kvm_vm_stats_desc...
arch/loongarch/kvm/vm.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2024 Loongson Technology Corporation Limited */ #include <asm/kvm_eiointc.h> #include <asm/kvm_vcpu.h> #include <linux/count_zeros.h> static void eiointc_set_sw_coreisr(struct loongarch_eiointc *s) { int ipnum, cpu, cpuid, irq; struct kvm_vcpu *vcpu; for (i...
arch/loongarch/kvm/intc/eiointc.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2024 Loongson Technology Corporation Limited */ #include <linux/kvm_host.h> #include <asm/kvm_ipi.h> #include <asm/kvm_vcpu.h> static void ipi_set(struct kvm_vcpu *vcpu, uint32_t data) { uint32_t status; struct kvm_interrupt irq; spin_lock(&vcpu->arch.ipi_s...
arch/loongarch/kvm/intc/ipi.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2024 Loongson Technology Corporation Limited */ #include <asm/kvm_eiointc.h> #include <asm/kvm_pch_pic.h> #include <asm/kvm_vcpu.h> #include <linux/count_zeros.h> /* update the isr according to irq level and route irq to eiointc */ static void pch_pic_update_ir...
arch/loongarch/kvm/intc/pch_pic.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/export.h> #include <linux/compiler.h> #include <uapi/linux/swab.h> /* To silence -Wmissing-prototypes. */ unsigned long long __bswapdi2(unsigned long long u); unsigned long long notrace __bswapdi2(unsigned long long u) { return ___constant_swab64(u); } EXPORT_SYMBO...
arch/loongarch/lib/bswapdi.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/export.h> #include <linux/compiler.h> #include <uapi/linux/swab.h> /* To silence -Wmissing-prototypes. */ unsigned int __bswapsi2(unsigned int u); unsigned int notrace __bswapsi2(unsigned int u) { return ___constant_swab32(u); } EXPORT_SYMBOL(__bswapsi2);
arch/loongarch/lib/bswapsi.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/asm-extable.h> #include <asm/cpu.h> #include <asm/regdef.h> #include <asm/unwind_hints...
arch/loongarch/lib/clear_user.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/asm-extable.h> #include <asm/cpu.h> #include <asm/regdef.h> #include <asm/unwind_hints...
arch/loongarch/lib/copy_user.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only // Copyright (C) 2019-2020 Arm Ltd. #include <linux/compiler.h> #include <linux/export.h> #include <linux/kasan-checks.h> #include <linux/kernel.h> #include <net/checksum.h> static u64 accumulate(u64 sum, u64 data) { sum += data; if (sum < data) sum += 1; return sum; } ...
arch/loongarch/lib/csum.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/delay.h> #include <linux/export.h> #include <linux/smp.h> #include <linux/timex.h> #include <asm/processor.h> void __delay(unsigned long cycles) { u64 t0 = get_cycles(); while ((unsigned lo...
arch/loongarch/lib/delay.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited * * Derived from MIPS: * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle. * Copyright (C) 1999 by Silicon Graphics, Inc. */ #include <linux/kernel.h> #include <linux/mm.h> #include <a...
arch/loongarch/lib/dump_tlb.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->regs[1]); } NOKPROBE_SYMBOL(override_function_with_return);
arch/loongarch/lib/error-inject.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/cpu.h> #include <asm/regdef.h> #include <asm/unwind_hints.h> .section .noinstr.text, ...
arch/loongarch/lib/memcpy.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/cpu.h> #include <asm/regdef.h> .section .noinstr.text, "ax" SYM_FUNC_START(memmove) ...
arch/loongarch/lib/memmove.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/export.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/cpu.h> #include <asm/regdef.h> #include <asm/unwind_hints.h> .macro fill_to_64 r0 bs...
arch/loongarch/lib/memset.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ #include <asm/asmmacro.h> #include <linux/export.h> #include <linux/linkage.h> SYM_FUNC_START(__ashlti3) srli.d t2, a0, 1 nor t3, zero, a2 sll.d t1, a1, a2 srl.d t2, t2, t3 andi t0, a2, 64 sll.d a0, a0, a2 or t1, t2, t1 maskeqz a1, a0, t0 masknez a0, a0, t0 maskne...
arch/loongarch/lib/tishift.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2020-2022 Loongson Technology Corporation Limited */ #include <linux/linkage.h> #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/asm-extable.h> #include <asm/errno.h> #include <asm/regdef.h> .L_fixup_handle_unaligned: li.w a0, -EFAULT jr ra /...
arch/loongarch/lib/unaligned.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-or-later /* * LoongArch SIMD XOR operations * * Copyright (C) 2023 WANG Xuerui <git@xen0n.name> */ #include "xor_simd.h" /* * Process one cache line (64 bytes) per loop. This is assuming all future * popular LoongArch cores are similar performance-characteristics-wise to the ...
arch/loongarch/lib/xor_simd.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Simple interface to link xor_simd.c and xor_simd_glue.c * * Separating these files ensures that no SIMD instructions are run outside of * the kfpu critical section. */ #ifndef __LOONGARCH_LIB_XOR_SIMD_H #define __LOONGARCH_LIB_XOR_SIMD_H #ifdef CONFIG_CPU_HAS_...
arch/loongarch/lib/xor_simd.h
null
null
null
null
null