#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/gfp.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/sizes.h>
#ifdef CONFIG_X86
#include <asm/set_memory.h>
#endif
#include "atomisp_internal.h"
#include "mmu/isp_mmu.h"
#define NR_PAGES_2GB …
static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
unsigned int end_isp_virt);
static unsigned int atomisp_get_pte(phys_addr_t pt, unsigned int idx)
{ … }
static void atomisp_set_pte(phys_addr_t pt,
unsigned int idx, unsigned int pte)
{ … }
static void *isp_pt_phys_to_virt(phys_addr_t phys)
{ … }
static phys_addr_t isp_pte_to_pgaddr(struct isp_mmu *mmu,
unsigned int pte)
{ … }
static unsigned int isp_pgaddr_to_pte_valid(struct isp_mmu *mmu,
phys_addr_t phys)
{ … }
static phys_addr_t alloc_page_table(struct isp_mmu *mmu)
{ … }
static void free_page_table(struct isp_mmu *mmu, phys_addr_t page)
{ … }
static void mmu_remap_error(struct isp_mmu *mmu,
phys_addr_t l1_pt, unsigned int l1_idx,
phys_addr_t l2_pt, unsigned int l2_idx,
unsigned int isp_virt, phys_addr_t old_phys,
phys_addr_t new_phys)
{ … }
static void mmu_unmap_l2_pte_error(struct isp_mmu *mmu,
phys_addr_t l1_pt, unsigned int l1_idx,
phys_addr_t l2_pt, unsigned int l2_idx,
unsigned int isp_virt, unsigned int pte)
{ … }
static void mmu_unmap_l1_pte_error(struct isp_mmu *mmu,
phys_addr_t l1_pt, unsigned int l1_idx,
unsigned int isp_virt, unsigned int pte)
{ … }
static void mmu_unmap_l1_pt_error(struct isp_mmu *mmu, unsigned int pte)
{ … }
static int mmu_l2_map(struct isp_mmu *mmu, phys_addr_t l1_pt,
unsigned int l1_idx, phys_addr_t l2_pt,
unsigned int start, unsigned int end, phys_addr_t phys)
{ … }
static int mmu_l1_map(struct isp_mmu *mmu, phys_addr_t l1_pt,
unsigned int start, unsigned int end,
phys_addr_t phys)
{ … }
static int mmu_map(struct isp_mmu *mmu, unsigned int isp_virt,
phys_addr_t phys, unsigned int pgnr)
{ … }
static void mmu_l2_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
unsigned int l1_idx, phys_addr_t l2_pt,
unsigned int start, unsigned int end)
{ … }
static void mmu_l1_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
unsigned int start, unsigned int end)
{ … }
static void mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
unsigned int pgnr)
{ … }
static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
unsigned int end_isp_virt)
{ … }
int isp_mmu_map(struct isp_mmu *mmu, unsigned int isp_virt,
phys_addr_t phys, unsigned int pgnr)
{ … }
void isp_mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
unsigned int pgnr)
{ … }
static void isp_mmu_flush_tlb_range_default(struct isp_mmu *mmu,
unsigned int start,
unsigned int size)
{ … }
int isp_mmu_init(struct isp_mmu *mmu, struct isp_mmu_client *driver)
{ … }
void isp_mmu_exit(struct isp_mmu *mmu)
{ … }