arch/mips/include/asm/ginvt.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/ginvt.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/ginvt.h- Extension
.h- Size
- 1159 bytes
- Lines
- 60
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
Dependency Surface
asm/mipsregs.h
Detected Declarations
enum ginvt_typefunction _ASM_INSN_IF_MIPSfunction ginvt_fullfunction ginvt_vafunction ginvt_mmidfunction ginvt_va_mmid
Annotated Snippet
#ifndef __MIPS_ASM_GINVT_H__
#define __MIPS_ASM_GINVT_H__
#include <asm/mipsregs.h>
enum ginvt_type {
GINVT_FULL,
GINVT_VA,
GINVT_MMID,
};
#ifdef TOOLCHAIN_SUPPORTS_GINV
# define _ASM_SET_GINV ".set ginv\n"
# define _ASM_UNSET_GINV
#else
# define _ASM_SET_GINV \
_ASM_MACRO_1R1I(ginvt, rs, type, \
_ASM_INSN_IF_MIPS(0x7c0000bd | (__rs << 21) | (\\type << 8)) \
_ASM_INSN32_IF_MM(0x0000717c | (__rs << 16) | (\\type << 9)))
# define _ASM_UNSET_GINV ".purgem ginvt\n"
#endif
static __always_inline void ginvt(unsigned long addr, enum ginvt_type type)
{
asm volatile(
".set push\n"
_ASM_SET_GINV
" ginvt %0, %1\n"
_ASM_UNSET_GINV
".set pop"
: /* no outputs */
: "r"(addr), "i"(type)
: "memory");
}
static inline void ginvt_full(void)
{
ginvt(0, GINVT_FULL);
}
static inline void ginvt_va(unsigned long addr)
{
addr &= PAGE_MASK << 1;
ginvt(addr, GINVT_VA);
}
static inline void ginvt_mmid(void)
{
ginvt(0, GINVT_MMID);
}
static inline void ginvt_va_mmid(unsigned long addr)
{
addr &= PAGE_MASK << 1;
ginvt(addr, GINVT_VA | GINVT_MMID);
}
#endif /* __MIPS_ASM_GINVT_H__ */
Annotation
- Immediate include surface: `asm/mipsregs.h`.
- Detected declarations: `enum ginvt_type`, `function _ASM_INSN_IF_MIPS`, `function ginvt_full`, `function ginvt_va`, `function ginvt_mmid`, `function ginvt_va_mmid`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.