/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
/*
 * Copyright (c) 2021 MediaTek Inc.
 */

#ifndef _MTK_IOMMU_DBG_H_
#define _MTK_IOMMU_DBG_H_

int proc_vmap_show(struct seq_file *m, void *v);
void add_vunmap_record_list(struct dma_buf *db);
void add_vmap_record_list(struct dma_buf *db);
void might_add_fget_list(int fd);
void might_add_fget_list_dma(struct dma_buf *dh);
void might_add_fput_list(struct dma_buf *dh);
int fcount_record_size_store(size_t sz);
int fcount_record_size_show(struct seq_file *m, void *v);
int fcount_record_inode_store(unsigned long val);
int fcount_record_inode_show(struct seq_file *m, void *v);
int record_alive_store(bool enable);
int record_alive_show(struct seq_file *m, void *v);
int fcount_record_show_all(struct seq_file *m, void *v);
int alloc_free_start(unsigned long times);
int alloc_free_stop(void);
long get_alloc_free_cnt(void);
int leaker_start(void);
int leaker_stop(void);
struct dma_buf *get_leak_dmabuf(void);
int register_symbol(unsigned long addr);
int smc_info_dump(struct seq_file *m, void *v);
void unregister_symbol(void);
#endif
