#define pr_fmt(fmt) …
#include <uapi/drm/habanalabs_accel.h>
#include "habanalabs.h"
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <asm/msr.h>
static_assert(…);
static u32 hl_debug_struct_size[HL_DEBUG_OP_TIMESTAMP + 1] = …;
static int device_status_info(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int hw_ip_info(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int hw_events_info(struct hl_device *hdev, bool aggregate,
struct hl_info_args *args)
{ … }
static int events_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int dram_usage_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int hw_idle(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, struct hl_debug_args *args)
{ … }
static int device_utilization(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int get_clk_rate(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int get_reset_count(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int time_sync_info(struct hl_device *hdev, struct hl_info_args *args)
{ … }
static int pci_counters_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int clk_throttle_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int cs_counters_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int sync_manager_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int total_energy_consumption_info(struct hl_fpriv *hpriv,
struct hl_info_args *args)
{ … }
static int pll_frequency_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int power_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int open_stats_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int dram_pending_rows_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int dram_replaced_rows_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int last_err_open_dev_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int cs_timeout_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int razwi_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int undefined_opcode_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int dev_mem_alloc_page_sizes_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int sec_attest_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int dev_info_signed(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int eventfd_register(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int eventfd_unregister(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int engine_status_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int page_fault_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int user_mappings_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int hw_err_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int fw_err_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int engine_err_info(struct hl_fpriv *hpriv, struct hl_info_args *args)
{ … }
static int send_fw_generic_request(struct hl_device *hdev, struct hl_info_args *info_args)
{ … }
static int _hl_info_ioctl(struct hl_fpriv *hpriv, void *data,
struct device *dev)
{ … }
int hl_info_ioctl(struct drm_device *ddev, void *data, struct drm_file *file_priv)
{ … }
static int hl_info_ioctl_control(struct hl_fpriv *hpriv, void *data)
{ … }
int hl_debug_ioctl(struct drm_device *ddev, void *data, struct drm_file *file_priv)
{ … }
#define HL_IOCTL_DEF(ioctl, _func) …
static const struct hl_ioctl_desc hl_ioctls_control[] = …;
static long _hl_ioctl(struct hl_fpriv *hpriv, unsigned int cmd, unsigned long arg,
const struct hl_ioctl_desc *ioctl, struct device *dev)
{ … }
long hl_ioctl_control(struct file *filep, unsigned int cmd, unsigned long arg)
{ … }