arch/riscv/kernel/vendor_extensions/thead.c
Source file repositories/reference/linux-study-clean/arch/riscv/kernel/vendor_extensions/thead.c
File Facts
- System
- Linux kernel
- Corpus path
arch/riscv/kernel/vendor_extensions/thead.c- Extension
.c- Size
- 901 bytes
- Lines
- 30
- Domain
- Architecture Layer
- Bucket
- arch/riscv
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/cpufeature.hasm/vendor_extensions.hasm/vendor_extensions/thead.hlinux/array_size.hlinux/cpumask.hlinux/types.h
Detected Declarations
function disable_xtheadvector
Annotated Snippet
// 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_data riscv_isa_vendor_ext_thead[] = {
__RISCV_ISA_EXT_DATA(xtheadvector, RISCV_ISA_VENDOR_EXT_XTHEADVECTOR),
};
struct riscv_isa_vendor_ext_data_list riscv_isa_vendor_ext_list_thead = {
.ext_data_count = ARRAY_SIZE(riscv_isa_vendor_ext_thead),
.ext_data = riscv_isa_vendor_ext_thead,
};
void disable_xtheadvector(void)
{
int cpu;
for_each_possible_cpu(cpu)
clear_bit(RISCV_ISA_VENDOR_EXT_XTHEADVECTOR, riscv_isa_vendor_ext_list_thead.per_hart_isa_bitmap[cpu].isa);
clear_bit(RISCV_ISA_VENDOR_EXT_XTHEADVECTOR, riscv_isa_vendor_ext_list_thead.all_harts_isa_bitmap.isa);
}
Annotation
- Immediate include surface: `asm/cpufeature.h`, `asm/vendor_extensions.h`, `asm/vendor_extensions/thead.h`, `linux/array_size.h`, `linux/cpumask.h`, `linux/types.h`.
- Detected declarations: `function disable_xtheadvector`.
- Atlas domain: Architecture Layer / arch/riscv.
- 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.