arch/arm64/include/asm/compat.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/compat.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/compat.h- Extension
.h- Size
- 2184 bytes
- Lines
- 110
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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-generic/compat.hlinux/types.hlinux/sched.hlinux/sched/task_stack.h
Detected Declarations
struct compat_statstruct compat_statfsfunction is_compat_taskfunction is_compat_threadfunction is_compat_thread
Annotated Snippet
struct compat_stat {
#ifdef __AARCH64EB__
short st_dev;
short __pad1;
#else
compat_dev_t st_dev;
#endif
compat_ino_t st_ino;
compat_mode_t st_mode;
compat_ushort_t st_nlink;
__compat_uid16_t st_uid;
__compat_gid16_t st_gid;
#ifdef __AARCH64EB__
short st_rdev;
short __pad2;
#else
compat_dev_t st_rdev;
#endif
compat_off_t st_size;
compat_off_t st_blksize;
compat_off_t st_blocks;
old_time32_t st_atime;
compat_ulong_t st_atime_nsec;
old_time32_t st_mtime;
compat_ulong_t st_mtime_nsec;
old_time32_t st_ctime;
compat_ulong_t st_ctime_nsec;
compat_ulong_t __unused4[2];
};
struct compat_statfs {
int f_type;
int f_bsize;
int f_blocks;
int f_bfree;
int f_bavail;
int f_files;
int f_ffree;
compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_frsize;
int f_flags;
int f_spare[4];
};
#define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
#define COMPAT_MINSIGSTKSZ 2048
static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}
static inline int is_compat_thread(struct thread_info *thread)
{
return test_ti_thread_flag(thread, TIF_32BIT);
}
long compat_arm_syscall(struct pt_regs *regs, int scno);
#else /* !CONFIG_COMPAT */
static inline int is_compat_thread(struct thread_info *thread)
{
return 0;
}
#endif /* CONFIG_COMPAT */
#endif /* __ASM_COMPAT_H */
Annotation
- Immediate include surface: `asm-generic/compat.h`, `linux/types.h`, `linux/sched.h`, `linux/sched/task_stack.h`.
- Detected declarations: `struct compat_stat`, `struct compat_statfs`, `function is_compat_task`, `function is_compat_thread`, `function is_compat_thread`.
- Atlas domain: Architecture Layer / arch/arm64.
- 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.