arch/parisc/lib/iomap.c
Source file repositories/reference/linux-study-clean/arch/parisc/lib/iomap.c
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/lib/iomap.c- Extension
.c- Size
- 12610 bytes
- Lines
- 552
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ioport.hlinux/pci.hlinux/export.hasm/io.h
Detected Declarations
struct iomap_opsfunction ioport_read8function ioport_read16function ioport_read32function ioport_write8function ioport_write16function ioport_write32function ioport_read8rfunction ioport_read16rfunction ioport_read32rfunction ioport_write8rfunction ioport_write16rfunction ioport_write32rfunction iomem_read8function iomem_read16function iomem_read16befunction iomem_read32function iomem_read32befunction iomem_read64function iomem_read64befunction iomem_write8function iomem_write16function iomem_write16befunction iomem_write32function iomem_write32befunction iomem_write64function iomem_write64befunction iomem_read8rfunction iomem_read16rfunction iomem_read32rfunction iomem_write8rfunction iomem_write16rfunction iomem_write32rfunction ioread8function ioread16function ioread16befunction ioread32function ioread32befunction ioread64function ioread64befunction iowrite8function iowrite16function iowrite16befunction iowrite32function iowrite32befunction iowrite64function iowrite64befunction ioread8_rep
Annotated Snippet
struct iomap_ops {
unsigned int (*read8)(const void __iomem *);
unsigned int (*read16)(const void __iomem *);
unsigned int (*read16be)(const void __iomem *);
unsigned int (*read32)(const void __iomem *);
unsigned int (*read32be)(const void __iomem *);
#ifdef CONFIG_64BIT
u64 (*read64)(const void __iomem *);
u64 (*read64be)(const void __iomem *);
#endif
void (*write8)(u8, void __iomem *);
void (*write16)(u16, void __iomem *);
void (*write16be)(u16, void __iomem *);
void (*write32)(u32, void __iomem *);
void (*write32be)(u32, void __iomem *);
#ifdef CONFIG_64BIT
void (*write64)(u64, void __iomem *);
void (*write64be)(u64, void __iomem *);
#endif
void (*read8r)(const void __iomem *, void *, unsigned long);
void (*read16r)(const void __iomem *, void *, unsigned long);
void (*read32r)(const void __iomem *, void *, unsigned long);
void (*write8r)(void __iomem *, const void *, unsigned long);
void (*write16r)(void __iomem *, const void *, unsigned long);
void (*write32r)(void __iomem *, const void *, unsigned long);
};
/* Generic ioport ops. To be replaced later by specific dino/elroy/wax code */
#define ADDR2PORT(addr) ((unsigned long __force)(addr) & 0xffffff)
static unsigned int ioport_read8(const void __iomem *addr)
{
return inb(ADDR2PORT(addr));
}
static unsigned int ioport_read16(const void __iomem *addr)
{
return inw(ADDR2PORT(addr));
}
static unsigned int ioport_read32(const void __iomem *addr)
{
return inl(ADDR2PORT(addr));
}
static void ioport_write8(u8 datum, void __iomem *addr)
{
outb(datum, ADDR2PORT(addr));
}
static void ioport_write16(u16 datum, void __iomem *addr)
{
outw(datum, ADDR2PORT(addr));
}
static void ioport_write32(u32 datum, void __iomem *addr)
{
outl(datum, ADDR2PORT(addr));
}
static void ioport_read8r(const void __iomem *addr, void *dst, unsigned long count)
{
insb(ADDR2PORT(addr), dst, count);
}
static void ioport_read16r(const void __iomem *addr, void *dst, unsigned long count)
{
insw(ADDR2PORT(addr), dst, count);
}
static void ioport_read32r(const void __iomem *addr, void *dst, unsigned long count)
{
insl(ADDR2PORT(addr), dst, count);
}
static void ioport_write8r(void __iomem *addr, const void *s, unsigned long n)
{
outsb(ADDR2PORT(addr), s, n);
}
static void ioport_write16r(void __iomem *addr, const void *s, unsigned long n)
{
outsw(ADDR2PORT(addr), s, n);
}
static void ioport_write32r(void __iomem *addr, const void *s, unsigned long n)
{
outsl(ADDR2PORT(addr), s, n);
}
Annotation
- Immediate include surface: `linux/ioport.h`, `linux/pci.h`, `linux/export.h`, `asm/io.h`.
- Detected declarations: `struct iomap_ops`, `function ioport_read8`, `function ioport_read16`, `function ioport_read32`, `function ioport_write8`, `function ioport_write16`, `function ioport_write32`, `function ioport_read8r`, `function ioport_read16r`, `function ioport_read32r`.
- Atlas domain: Architecture Layer / arch/parisc.
- Implementation status: integration 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.