arch/xtensa/mm/ioremap.c
Source file repositories/reference/linux-study-clean/arch/xtensa/mm/ioremap.c
File Facts
- System
- Linux kernel
- Corpus path
arch/xtensa/mm/ioremap.c- Extension
.c- Size
- 808 bytes
- Lines
- 36
- Domain
- Architecture Layer
- Bucket
- arch/xtensa
- 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.
Dependency Surface
linux/io.hlinux/pgtable.hasm/cacheflush.hasm/io.h
Detected Declarations
function Copyrightfunction iounmapexport ioremap_protexport iounmap
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* ioremap implementation.
*
* Copyright (C) 2015 Cadence Design Systems Inc.
*/
#include <linux/io.h>
#include <linux/pgtable.h>
#include <asm/cacheflush.h>
#include <asm/io.h>
void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
pgprot_t prot)
{
unsigned long pfn = __phys_to_pfn((phys_addr));
WARN_ON(pfn_valid(pfn));
return generic_ioremap_prot(phys_addr, size, prot);
}
EXPORT_SYMBOL(ioremap_prot);
void iounmap(volatile void __iomem *addr)
{
unsigned long va = (unsigned long) addr;
if ((va >= XCHAL_KIO_CACHED_VADDR &&
va - XCHAL_KIO_CACHED_VADDR < XCHAL_KIO_SIZE) ||
(va >= XCHAL_KIO_BYPASS_VADDR &&
va - XCHAL_KIO_BYPASS_VADDR < XCHAL_KIO_SIZE))
return;
generic_iounmap(addr);
}
EXPORT_SYMBOL(iounmap);
Annotation
- Immediate include surface: `linux/io.h`, `linux/pgtable.h`, `asm/cacheflush.h`, `asm/io.h`.
- Detected declarations: `function Copyright`, `function iounmap`, `export ioremap_prot`, `export iounmap`.
- Atlas domain: Architecture Layer / arch/xtensa.
- 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.