lib/raid/xor/loongarch/xor_simd_glue.c
Source file repositories/reference/linux-study-clean/lib/raid/xor/loongarch/xor_simd_glue.c
File Facts
- System
- Linux kernel
- Corpus path
lib/raid/xor/loongarch/xor_simd_glue.c- Extension
.c- Size
- 975 bytes
- Lines
- 38
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: implementation source
- Status
- source implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched.hasm/fpu.hxor_impl.hxor_arch.hxor_simd.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* LoongArch SIMD XOR operations
*
* Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
*/
#include <linux/sched.h>
#include <asm/fpu.h>
#include "xor_impl.h"
#include "xor_arch.h"
#include "xor_simd.h"
#define MAKE_XOR_GLUES(flavor) \
DO_XOR_BLOCKS(flavor##_inner, __xor_##flavor##_2, __xor_##flavor##_3, \
__xor_##flavor##_4, __xor_##flavor##_5); \
\
static void xor_gen_##flavor(void *dest, void **srcs, unsigned int src_cnt, \
unsigned int bytes) \
{ \
kernel_fpu_begin(); \
xor_gen_##flavor##_inner(dest, srcs, src_cnt, bytes); \
kernel_fpu_end(); \
} \
\
struct xor_block_template xor_block_##flavor = { \
.name = __stringify(flavor), \
.xor_gen = xor_gen_##flavor \
}
#ifdef CONFIG_CPU_HAS_LSX
MAKE_XOR_GLUES(lsx);
#endif /* CONFIG_CPU_HAS_LSX */
#ifdef CONFIG_CPU_HAS_LASX
MAKE_XOR_GLUES(lasx);
#endif /* CONFIG_CPU_HAS_LASX */
Annotation
- Immediate include surface: `linux/sched.h`, `asm/fpu.h`, `xor_impl.h`, `xor_arch.h`, `xor_simd.h`.
- Atlas domain: Kernel Services / lib.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.