habanalabs: separate common code to dedicated folders
We separate some of the common code source files to different folders for a better maintainability and testability. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
edb07cb69c
commit
8563e19159
|
@ -1,7 +1,13 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
include $(src)/common/mmu/Makefile
|
||||||
|
habanalabs-y += $(HL_COMMON_MMU_FILES)
|
||||||
|
|
||||||
|
include $(src)/common/pci/Makefile
|
||||||
|
habanalabs-y += $(HL_COMMON_PCI_FILES)
|
||||||
|
|
||||||
HL_COMMON_FILES := common/habanalabs_drv.o common/device.o common/context.o \
|
HL_COMMON_FILES := common/habanalabs_drv.o common/device.o common/context.o \
|
||||||
common/asid.o common/habanalabs_ioctl.o \
|
common/asid.o common/habanalabs_ioctl.o \
|
||||||
common/command_buffer.o common/hw_queue.o common/irq.o \
|
common/command_buffer.o common/hw_queue.o common/irq.o \
|
||||||
common/sysfs.o common/hwmon.o common/memory.o \
|
common/sysfs.o common/hwmon.o common/memory.o \
|
||||||
common/command_submission.o common/mmu.o common/mmu_v1.o \
|
common/command_submission.o common/firmware_if.o
|
||||||
common/firmware_if.o common/pci.o
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
HL_COMMON_MMU_FILES := common/mmu/mmu.o common/mmu/mmu_v1.o
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include "habanalabs.h"
|
#include "../habanalabs.h"
|
||||||
|
|
||||||
bool hl_is_dram_va(struct hl_device *hdev, u64 virt_addr)
|
bool hl_is_dram_va(struct hl_device *hdev, u64 virt_addr)
|
||||||
{
|
{
|
|
@ -5,8 +5,8 @@
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "habanalabs.h"
|
#include "../habanalabs.h"
|
||||||
#include "../include/hw_ip/mmu/mmu_general.h"
|
#include "../../include/hw_ip/mmu/mmu_general.h"
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
HL_COMMON_PCI_FILES := common/pci/pci.o
|
|
@ -5,8 +5,8 @@
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "habanalabs.h"
|
#include "../habanalabs.h"
|
||||||
#include "../include/hw_ip/pci/pci_general.h"
|
#include "../../include/hw_ip/pci/pci_general.h"
|
||||||
|
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
|
Loading…
Reference in New Issue