arch/mips/include/asm/paccess.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/paccess.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/paccess.h- Extension
.h- Size
- 3140 bytes
- Lines
- 115
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.h
Detected Declarations
struct __large_pstruct
Annotated Snippet
struct __large_pstruct { unsigned long buf[100]; };
#define __mp(x) (*(struct __large_pstruct *)(x))
#define __get_dbe(x, ptr, size) \
({ \
long __gu_err; \
__typeof__(*(ptr)) __gu_val; \
unsigned long __gu_addr; \
__asm__("":"=r" (__gu_val)); \
__gu_addr = (unsigned long) (ptr); \
__asm__("":"=r" (__gu_err)); \
switch (size) { \
case 1: __get_dbe_asm("lb"); break; \
case 2: __get_dbe_asm("lh"); break; \
case 4: __get_dbe_asm("lw"); break; \
case 8: __get_dbe_asm("ld"); break; \
default: __get_dbe_unknown(); break; \
} \
x = (__typeof__(*(ptr))) __gu_val; \
__gu_err; \
})
#define __get_dbe_asm(insn) \
{ \
__asm__ __volatile__( \
"1:\t" insn "\t%1,%2\n\t" \
"move\t%0,$0\n" \
"2:\n\t" \
".insn\n\t" \
".section\t.fixup,\"ax\"\n" \
"3:\tli\t%0,%3\n\t" \
"move\t%1,$0\n\t" \
"j\t2b\n\t" \
".previous\n\t" \
".section\t__dbe_table,\"a\"\n\t" \
__PA_ADDR "\t1b, 3b\n\t" \
".previous" \
:"=r" (__gu_err), "=r" (__gu_val) \
:"o" (__mp(__gu_addr)), "i" (-EFAULT)); \
}
extern void __get_dbe_unknown(void);
#define __put_dbe(x, ptr, size) \
({ \
long __pu_err; \
__typeof__(*(ptr)) __pu_val; \
long __pu_addr; \
__pu_val = (x); \
__pu_addr = (long) (ptr); \
__asm__("":"=r" (__pu_err)); \
switch (size) { \
case 1: __put_dbe_asm("sb"); break; \
case 2: __put_dbe_asm("sh"); break; \
case 4: __put_dbe_asm("sw"); break; \
case 8: __put_dbe_asm("sd"); break; \
default: __put_dbe_unknown(); break; \
} \
__pu_err; \
})
#define __put_dbe_asm(insn) \
{ \
__asm__ __volatile__( \
"1:\t" insn "\t%1,%2\n\t" \
"move\t%0,$0\n" \
"2:\n\t" \
".insn\n\t" \
".section\t.fixup,\"ax\"\n" \
"3:\tli\t%0,%3\n\t" \
"j\t2b\n\t" \
".previous\n\t" \
".section\t__dbe_table,\"a\"\n\t" \
__PA_ADDR "\t1b, 3b\n\t" \
".previous" \
: "=r" (__pu_err) \
: "r" (__pu_val), "o" (__mp(__pu_addr)), "i" (-EFAULT)); \
}
extern void __put_dbe_unknown(void);
extern unsigned long search_dbe_table(unsigned long addr);
#endif /* _ASM_PACCESS_H */
Annotation
- Immediate include surface: `linux/errno.h`.
- Detected declarations: `struct __large_pstruct`.
- 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.