arch/sparc/include/asm/io_64.h
Source file repositories/reference/linux-study-clean/arch/sparc/include/asm/io_64.h
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/include/asm/io_64.h- Extension
.h- Size
- 11456 bytes
- Lines
- 475
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/compiler.hlinux/types.hasm/page.hasm/asi.hasm-generic/pci_iomap.h
Detected Declarations
struct pci_devstruct devicefunction __raw_readbfunction __raw_readwfunction __raw_readlfunction __raw_readqfunction __raw_writebfunction __raw_writewfunction __raw_writelfunction __raw_writeqfunction readbfunction readwfunction readlfunction readqfunction writebfunction writewfunction writelfunction writeqfunction inbfunction inwfunction inlfunction outbfunction outwfunction outlfunction readsbfunction readswfunction readslfunction writesbfunction writeswfunction writeslfunction sbus_readbfunction sbus_readwfunction sbus_readlfunction sbus_readqfunction sbus_writebfunction sbus_writewfunction sbus_writelfunction sbus_writeqfunction sbus_memset_iofunction memset_iofunction sbus_memcpy_fromiofunction memcpy_fromiofunction sbus_memcpy_toiofunction memcpy_toiofunction iounmapfunction sbus_can_dma_64bitfunction sbus_can_burst64
Annotated Snippet
#ifndef __SPARC64_IO_H
#define __SPARC64_IO_H
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <asm/page.h> /* IO address mapping routines need this */
#include <asm/asi.h>
#include <asm-generic/pci_iomap.h>
#define pci_iomap pci_iomap
/* BIO layer definitions. */
extern unsigned long kern_base, kern_size;
/* __raw_{read,write}{b,w,l,q} uses direct access.
* Access the memory as big endian bypassing the cache
* by using ASI_PHYS_BYPASS_EC_E
*/
#define __raw_readb __raw_readb
static inline u8 __raw_readb(const volatile void __iomem *addr)
{
u8 ret;
__asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_raw_readb */"
: "=r" (ret)
: "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
return ret;
}
#define __raw_readw __raw_readw
static inline u16 __raw_readw(const volatile void __iomem *addr)
{
u16 ret;
__asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_raw_readw */"
: "=r" (ret)
: "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
return ret;
}
#define __raw_readl __raw_readl
static inline u32 __raw_readl(const volatile void __iomem *addr)
{
u32 ret;
__asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_raw_readl */"
: "=r" (ret)
: "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
return ret;
}
#define __raw_readq __raw_readq
static inline u64 __raw_readq(const volatile void __iomem *addr)
{
u64 ret;
__asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_raw_readq */"
: "=r" (ret)
: "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
return ret;
}
#define __raw_writeb __raw_writeb
static inline void __raw_writeb(u8 b, const volatile void __iomem *addr)
{
__asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_raw_writeb */"
: /* no outputs */
: "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
}
#define __raw_writew __raw_writew
static inline void __raw_writew(u16 w, const volatile void __iomem *addr)
{
__asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_raw_writew */"
: /* no outputs */
: "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
}
#define __raw_writel __raw_writel
static inline void __raw_writel(u32 l, const volatile void __iomem *addr)
{
__asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_raw_writel */"
: /* no outputs */
: "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E));
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/compiler.h`, `linux/types.h`, `asm/page.h`, `asm/asi.h`, `asm-generic/pci_iomap.h`.
- Detected declarations: `struct pci_dev`, `struct device`, `function __raw_readb`, `function __raw_readw`, `function __raw_readl`, `function __raw_readq`, `function __raw_writeb`, `function __raw_writew`, `function __raw_writel`, `function __raw_writeq`.
- 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.