arch/s390/include/asm/dma-types.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/dma-types.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/dma-types.h- Extension
.h- Size
- 2563 bytes
- Lines
- 104
- Domain
- Architecture Layer
- Bucket
- arch/s390
- 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/types.hlinux/io.h
Detected Declarations
function virt_to_dma32function u32_to_dma32function dma32_to_u32function dma32_addfunction dma32_andfunction virt_to_dma64function u64_to_dma64function dma64_to_u64function dma64_addfunction dma64_and
Annotated Snippet
#ifndef _ASM_S390_DMA_TYPES_H_
#define _ASM_S390_DMA_TYPES_H_
#include <linux/types.h>
#include <linux/io.h>
/*
* typedef dma32_t
* Contains a 31 bit absolute address to a DMA capable piece of storage.
*
* For CIO, DMA addresses are always absolute addresses. These addresses tend
* to be used in architectured memory blocks (like ORB, IDAW, MIDAW). Under
* certain circumstances 31 bit wide addresses must be used because the
* address must fit in 31 bits.
*
* This type is to be used when such fields can be modelled as 32 bit wide.
*/
typedef u32 __bitwise dma32_t;
/*
* typedef dma64_t
* Contains a 64 bit absolute address to a DMA capable piece of storage.
*
* For CIO, DMA addresses are always absolute addresses. These addresses tend
* to be used in architectured memory blocks (like ORB, IDAW, MIDAW).
*
* This type is to be used to model such 64 bit wide fields.
*/
typedef u64 __bitwise dma64_t;
/*
* Although DMA addresses should be obtained using the DMA API, in cases when
* it is known that the first argument holds a virtual address that points to
* DMA-able 31 bit addressable storage, then this function can be safely used.
*/
static inline dma32_t virt_to_dma32(void *ptr)
{
return (__force dma32_t)__pa32(ptr);
}
static inline void *dma32_to_virt(dma32_t addr)
{
return __va((__force unsigned long)addr);
}
static inline dma32_t u32_to_dma32(u32 addr)
{
return (__force dma32_t)addr;
}
static inline u32 dma32_to_u32(dma32_t addr)
{
return (__force u32)addr;
}
static inline dma32_t dma32_add(dma32_t a, u32 b)
{
return (__force dma32_t)((__force u32)a + b);
}
static inline dma32_t dma32_and(dma32_t a, u32 b)
{
return (__force dma32_t)((__force u32)a & b);
}
/*
* Although DMA addresses should be obtained using the DMA API, in cases when
* it is known that the first argument holds a virtual address that points to
* DMA-able storage, then this function can be safely used.
*/
static inline dma64_t virt_to_dma64(void *ptr)
{
return (__force dma64_t)__pa(ptr);
}
static inline void *dma64_to_virt(dma64_t addr)
{
return __va((__force unsigned long)addr);
}
static inline dma64_t u64_to_dma64(u64 addr)
{
return (__force dma64_t)addr;
}
static inline u64 dma64_to_u64(dma64_t addr)
{
return (__force u64)addr;
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/io.h`.
- Detected declarations: `function virt_to_dma32`, `function u32_to_dma32`, `function dma32_to_u32`, `function dma32_add`, `function dma32_and`, `function virt_to_dma64`, `function u64_to_dma64`, `function dma64_to_u64`, `function dma64_add`, `function dma64_and`.
- Atlas domain: Architecture Layer / arch/s390.
- 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.