#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/io.h>
#include <linux/sysfs.h>
#include "hmm/hmm.h"
#include "hmm/hmm_bo.h"
#include "atomisp_internal.h"
#include "asm/cacheflush.h"
#include "mmu/isp_mmu.h"
#include "mmu/sh_mmu_mrfld.h"
struct hmm_bo_device bo_device;
static ia_css_ptr dummy_ptr = …;
static bool hmm_initialized;
static const char hmm_bo_type_string[] = …;
static ssize_t bo_show(struct device *dev, struct device_attribute *attr,
char *buf, struct list_head *bo_list, bool active)
{ … }
static ssize_t active_bo_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t free_bo_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(active_bo);
static DEVICE_ATTR_RO(free_bo);
static struct attribute *sysfs_attrs_ctrl[] = …;
static struct attribute_group atomisp_attribute_group[] = …;
int hmm_init(void)
{ … }
void hmm_cleanup(void)
{ … }
static ia_css_ptr __hmm_alloc(size_t bytes, enum hmm_bo_type type,
void *vmalloc_addr)
{ … }
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 virt)
{ … }
static inline int hmm_check_bo(struct hmm_buffer_object *bo, unsigned int ptr)
{ … }
static int load_and_flush_by_kmap(ia_css_ptr virt, void *data,
unsigned int bytes)
{ … }
static int load_and_flush(ia_css_ptr virt, void *data, unsigned int bytes)
{ … }
int hmm_load(ia_css_ptr virt, void *data, unsigned int bytes)
{ … }
int hmm_flush(ia_css_ptr virt, 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)
{ … }
phys_addr_t hmm_virt_to_phys(ia_css_ptr virt)
{ … }
int hmm_mmap(struct vm_area_struct *vma, ia_css_ptr virt)
{ … }
void *hmm_vmap(ia_css_ptr virt, bool cached)
{ … }
void hmm_flush_vmap(ia_css_ptr virt)
{ … }
void hmm_vunmap(ia_css_ptr virt)
{ … }