arch/sparc/include/uapi/asm/envctrl.h
Source file repositories/reference/linux-study-clean/arch/sparc/include/uapi/asm/envctrl.h
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/include/uapi/asm/envctrl.h- Extension
.h- Size
- 3494 bytes
- Lines
- 105
- Domain
- Architecture Layer
- Bucket
- arch/sparc
- 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
linux/ioctl.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
* if (ioctl(fd, ENVCTRL_READ_FAN_STATUS, 0) < 0) {
* printf("ioctl fan failed\n");
* }
* if (read(fd, rslt, 1) <= 0) {
* printf("error or fan not monitored\n");
* } else {
* if (rslt[0] == ENVCTRL_ALL_FANS_GOOD) {
* printf("all fans good\n");
* } else if (rslt[0] == ENVCTRL_ALL_FANS_BAD) {
* printf("all fans bad\n");
* } else {
* if (rslt[0] & ENVCTRL_FAN0_FAILURE_MASK) {
* printf("fan 0 failed or not connected\n");
* }
* ......
*/
#define ENVCTRL_ALL_FANS_GOOD 0x00
#define ENVCTRL_FAN0_FAILURE_MASK 0x01
#define ENVCTRL_FAN1_FAILURE_MASK 0x02
#define ENVCTRL_FAN2_FAILURE_MASK 0x04
#define ENVCTRL_FAN3_FAILURE_MASK 0x08
#define ENVCTRL_FAN4_FAILURE_MASK 0x10
#define ENVCTRL_FAN5_FAILURE_MASK 0x20
#define ENVCTRL_FAN6_FAILURE_MASK 0x40
#define ENVCTRL_FAN7_FAILURE_MASK 0x80
#define ENVCTRL_ALL_FANS_BAD 0xFF
#endif /* !(_SPARC64_ENVCTRL_H) */
Annotation
- Immediate include surface: `linux/ioctl.h`.
- Atlas domain: Architecture Layer / arch/sparc.
- 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.