* Returns 0 on success
*
*/
-int goya_pci_bars_map(struct hl_device *hdev)
+static int goya_pci_bars_map(struct hl_device *hdev)
{
struct pci_dev *pdev = hdev->pdev;
int rc;
return 0;
}
-void goya_reset_link_through_bridge(struct hl_device *hdev)
+static void goya_reset_link_through_bridge(struct hl_device *hdev)
{
struct pci_dev *pdev = hdev->pdev;
struct pci_dev *parent_port;
* Unmap PCI bars
*
*/
-int goya_early_fini(struct hl_device *hdev)
+static int goya_early_fini(struct hl_device *hdev)
{
goya_pci_bars_unmap(hdev);
* @hdev: pointer to hl_device structure
*
*/
-int goya_sw_fini(struct hl_device *hdev)
+static int goya_sw_fini(struct hl_device *hdev)
{
struct goya_device *goya = hdev->asic_specific;
* Returns 0 on success
*
*/
-int goya_init_cpu_queues(struct hl_device *hdev)
+static int goya_init_cpu_queues(struct hl_device *hdev)
{
struct goya_device *goya = hdev->asic_specific;
struct hl_eq *eq;
return rc;
}
-int goya_mmap(struct hl_fpriv *hpriv, struct vm_area_struct *vma)
-{
- return -EINVAL;
-}
-
-int goya_cb_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
+static int goya_cb_mmap(struct hl_device *hdev, struct vm_area_struct *vma,
u64 kaddress, phys_addr_t paddress, u32 size)
{
int rc;
return rc;
}
-void goya_ring_doorbell(struct hl_device *hdev, u32 hw_queue_id, u32 pi)
+static void goya_ring_doorbell(struct hl_device *hdev, u32 hw_queue_id, u32 pi)
{
u32 db_reg_offset, db_value;
bool invalid_queue = false;
/* Not needed in Goya */
}
-void *goya_dma_alloc_coherent(struct hl_device *hdev, size_t size,
+static void *goya_dma_alloc_coherent(struct hl_device *hdev, size_t size,
dma_addr_t *dma_handle, gfp_t flags)
{
return dma_alloc_coherent(&hdev->pdev->dev, size, dma_handle, flags);
}
-void goya_dma_free_coherent(struct hl_device *hdev, size_t size, void *cpu_addr,
- dma_addr_t dma_handle)
+static void goya_dma_free_coherent(struct hl_device *hdev, size_t size,
+ void *cpu_addr, dma_addr_t dma_handle)
{
dma_free_coherent(&hdev->pdev->dev, size, cpu_addr, dma_handle);
}
return base;
}
-int goya_send_job_on_qman0(struct hl_device *hdev, struct hl_cs_job *job)
+static int goya_send_job_on_qman0(struct hl_device *hdev, struct hl_cs_job *job)
{
struct goya_device *goya = hdev->asic_specific;
struct packet_msg_prot *fence_pkt;
return ret_val;
}
-void *goya_dma_pool_zalloc(struct hl_device *hdev, size_t size, gfp_t mem_flags,
- dma_addr_t *dma_handle)
+static void *goya_dma_pool_zalloc(struct hl_device *hdev, size_t size,
+ gfp_t mem_flags, dma_addr_t *dma_handle)
{
if (size > GOYA_DMA_POOL_BLK_SIZE)
return NULL;
return dma_pool_zalloc(hdev->dma_pool, mem_flags, dma_handle);
}
-void goya_dma_pool_free(struct hl_device *hdev, void *vaddr,
- dma_addr_t dma_addr)
+static void goya_dma_pool_free(struct hl_device *hdev, void *vaddr,
+ dma_addr_t dma_addr)
{
dma_pool_free(hdev->dma_pool, vaddr, dma_addr);
}
-void *goya_cpu_accessible_dma_pool_alloc(struct hl_device *hdev, size_t size,
- dma_addr_t *dma_handle)
+static void *goya_cpu_accessible_dma_pool_alloc(struct hl_device *hdev,
+ size_t size, dma_addr_t *dma_handle)
{
u64 kernel_addr;
return (void *) (uintptr_t) kernel_addr;
}
-void goya_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size,
- void *vaddr)
+static void goya_cpu_accessible_dma_pool_free(struct hl_device *hdev,
+ size_t size, void *vaddr)
{
/* roundup to CPU_PKT_SIZE */
size = (size + (CPU_PKT_SIZE - 1)) & CPU_PKT_MASK;
size);
}
-int goya_dma_map_sg(struct hl_device *hdev, struct scatterlist *sg, int nents,
- enum dma_data_direction dir)
+static int goya_dma_map_sg(struct hl_device *hdev, struct scatterlist *sg,
+ int nents, enum dma_data_direction dir)
{
if (!dma_map_sg(&hdev->pdev->dev, sg, nents, dir))
return -ENOMEM;
return 0;
}
-void goya_dma_unmap_sg(struct hl_device *hdev, struct scatterlist *sg,
- int nents, enum dma_data_direction dir)
+static void goya_dma_unmap_sg(struct hl_device *hdev, struct scatterlist *sg,
+ int nents, enum dma_data_direction dir)
{
dma_unmap_sg(&hdev->pdev->dev, sg, nents, dir);
}
-u32 goya_get_dma_desc_list_size(struct hl_device *hdev,
- struct sg_table *sgt)
+u32 goya_get_dma_desc_list_size(struct hl_device *hdev, struct sg_table *sgt)
{
struct scatterlist *sg, *sg_next_iter;
u32 count, dma_desc_cnt;
return rc;
}
-int goya_parse_cb_no_mmu(struct hl_device *hdev, struct hl_cs_parser *parser)
+static int goya_parse_cb_no_mmu(struct hl_device *hdev,
+ struct hl_cs_parser *parser)
{
u64 patched_cb_handle;
int rc;
return rc;
}
-int goya_parse_cb_no_ext_quque(struct hl_device *hdev,
- struct hl_cs_parser *parser)
+static int goya_parse_cb_no_ext_quque(struct hl_device *hdev,
+ struct hl_cs_parser *parser)
{
struct asic_fixed_properties *asic_prop = &hdev->asic_prop;
struct goya_device *goya = hdev->asic_specific;
WREG32(mmPSOC_GLOBAL_CONF_SCRATCHPAD_6, val);
}
-int goya_context_switch(struct hl_device *hdev, u32 asid)
+static int goya_context_switch(struct hl_device *hdev, u32 asid)
{
struct asic_fixed_properties *prop = &hdev->asic_prop;
struct packet_lin_dma *clear_sram_pkt;
return rc;
}
-void goya_restore_phase_topology(struct hl_device *hdev)
+static void goya_restore_phase_topology(struct hl_device *hdev)
{
int i, num_of_sob_in_longs, num_of_mon_in_longs;
* lead to undefined behavior and therefore, should be done with extreme care
*
*/
-int goya_debugfs_read32(struct hl_device *hdev, u64 addr, u32 *val)
+static int goya_debugfs_read32(struct hl_device *hdev, u64 addr, u32 *val)
{
struct asic_fixed_properties *prop = &hdev->asic_prop;
int rc = 0;
* lead to undefined behavior and therefore, should be done with extreme care
*
*/
-int goya_debugfs_write32(struct hl_device *hdev, u64 addr, u32 val)
+static int goya_debugfs_write32(struct hl_device *hdev, u64 addr, u32 val)
{
struct asic_fixed_properties *prop = &hdev->asic_prop;
int rc = 0;
return hdev->pdev->device;
}
-int goya_get_eeprom_data(struct hl_device *hdev, void *data, size_t max_size)
+static int goya_get_eeprom_data(struct hl_device *hdev, void *data,
+ size_t max_size)
{
struct goya_device *goya = hdev->asic_specific;
struct asic_fixed_properties *prop = &hdev->asic_prop;
.halt_engines = goya_halt_engines,
.suspend = goya_suspend,
.resume = goya_resume,
- .mmap = goya_mmap,
.cb_mmap = goya_cb_mmap,
.ring_doorbell = goya_ring_doorbell,
.flush_pq_write = goya_flush_pq_write,