drivers/staging/media/atomisp/include/hmm/hmm.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/include/hmm/hmm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/include/hmm/hmm.h- Extension
.h- Size
- 1835 bytes
- Lines
- 71
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/types.hlinux/slab.hlinux/mm.hhmm_common.hhmm/hmm_bo.hia_css_types.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef __HMM_H__
#define __HMM_H__
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include "hmm_common.h"
#include "hmm/hmm_bo.h"
#include "ia_css_types.h"
#define mmgr_NULL ((ia_css_ptr)0)
#define mmgr_EXCEPTION ((ia_css_ptr) - 1)
int hmm_init(void);
void hmm_cleanup(void);
ia_css_ptr hmm_alloc(size_t bytes);
ia_css_ptr hmm_create_from_vmalloc_buf(size_t bytes, void *vmalloc_addr);
void hmm_free(ia_css_ptr ptr);
int hmm_load(ia_css_ptr virt, void *data, unsigned int bytes);
int hmm_store(ia_css_ptr virt, const void *data, unsigned int bytes);
int hmm_set(ia_css_ptr virt, int c, unsigned int bytes);
int hmm_flush(ia_css_ptr virt, unsigned int bytes);
/*
* get kernel memory physical address from ISP virtual address.
*/
phys_addr_t hmm_virt_to_phys(ia_css_ptr virt);
/*
* map ISP memory starts with virt to kernel virtual address
* by using vmap. return NULL if failed.
*
* virt must be the start address of ISP memory (return by hmm_alloc),
* do not pass any other address.
*/
void *hmm_vmap(ia_css_ptr virt, bool cached);
void hmm_vunmap(ia_css_ptr virt);
/*
* flush the cache for the vmapped buffer.
* if the buffer has not been vmapped, return directly.
*/
void hmm_flush_vmap(ia_css_ptr virt);
/*
* map ISP memory starts with virt to specific vma.
*
* used for mmap operation.
*
* virt must be the start address of ISP memory (return by hmm_alloc),
* do not pass any other address.
*/
int hmm_mmap(struct vm_area_struct *vma, ia_css_ptr virt);
extern struct hmm_bo_device bo_device;
#endif
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/types.h`, `linux/slab.h`, `linux/mm.h`, `hmm_common.h`, `hmm/hmm_bo.h`, `ia_css_types.h`.
- Atlas domain: Driver Families / drivers/staging.
- 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.