arch/arm/lib/bswapsdi2.S
Source file repositories/reference/linux-study-clean/arch/arm/lib/bswapsdi2.S
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/lib/bswapsdi2.S- Extension
.S- Size
- 649 bytes
- Lines
- 39
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: arch/arm
- Status
- atlas-only
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/linkage.hasm/assembler.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <linux/linkage.h>
#include <asm/assembler.h>
#if __LINUX_ARM_ARCH__ >= 6
ENTRY(__bswapsi2)
rev r0, r0
bx lr
ENDPROC(__bswapsi2)
ENTRY(__bswapdi2)
rev r3, r0
rev r0, r1
mov r1, r3
bx lr
ENDPROC(__bswapdi2)
#else
ENTRY(__bswapsi2)
eor r3, r0, r0, ror #16
mov r3, r3, lsr #8
bic r3, r3, #0xff00
eor r0, r3, r0, ror #8
ret lr
ENDPROC(__bswapsi2)
ENTRY(__bswapdi2)
mov ip, r1
eor r3, ip, ip, ror #16
eor r1, r0, r0, ror #16
mov r1, r1, lsr #8
mov r3, r3, lsr #8
bic r3, r3, #0xff00
bic r1, r1, #0xff00
eor r1, r1, r0, ror #8
eor r0, r3, ip, ror #8
ret lr
ENDPROC(__bswapdi2)
#endif
Annotation
- Immediate include surface: `linux/linkage.h`, `asm/assembler.h`.
- Atlas domain: Architecture Layer / arch/arm.
- Implementation status: atlas-only.
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.