Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Kbuild
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
obj-m += neuron.o

neuron-objs := neuron_arch.o neuron_dhal.o
neuron-objs := neuron_arch.o neuron_platform.o neuron_dhal.o
neuron-objs += neuron_reg_access.o
neuron-objs += neuron_module.o neuron_pci.o neuron_mempool.o neuron_dma.o neuron_ring.o neuron_ds.o
neuron-objs += neuron_module.o neuron_pci.o neuron_mempool.o neuron_dma.o neuron_dma_diag.o neuron_ring.o neuron_ds.o
neuron-objs += neuron_core.o neuron_crwl.o neuron_cdev.o neuron_topsp.o neuron_pid.o
neuron-objs += neuron_reset.o neuron_cinit.o neuron_mmap.o neuron_p2p.o
neuron-objs += neuron_nq.o
neuron-objs += neuron_mc_handle.o
neuron-objs += neuron_metrics.o neuron_sysfs_metrics.o
neuron-objs += neuron_metrics.o neuron_sysfs_metrics.o neuron_sysfs_platform.o
neuron-objs += udma/udma_iofic.o udma/udma_m2m.o udma/udma_main.o
neuron-objs += neuron_fw_io.o
neuron-objs += neuron_ham_throttle.o
neuron-objs += neuron_fw_layout.o neuron_fw_metrics_common.o
neuron-objs += neuron_dmabuf.o
neuron-objs += neuron_log.o
neuron-objs += neuron_power.o
neuron-objs += neuron_test.o
neuron-objs += vc/neuron_dhal_vc.o
neuron-objs += v2/notific.o v2/neuron_dhal_v2.o
neuron-objs += v3/notific.o v3/neuron_dhal_v3.o v3/neuron_pelect.o
neuron-objs += v4/neuron_dhal_v4.o
neuron-objs += v3/notific.o v3/neuron_dhal_v3.o v3/neuron_pelect.o v3/neuron_fw_metrics.o
neuron-objs += v4/neuron_dhal_v4.o v4/neuron_fw_metrics.o
ccflags-y += -O3 -Wall -Werror -Wno-declaration-after-statement -Wunused-macros -Wunused-local-typedefs
ccflags-y += -I$(src)/
ccflags-y += $(call cc-option,-march=armv8.2-a)

4 changes: 2 additions & 2 deletions aws-neuronx-dkms-mkdeb/debian/postinst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/sh
#!/bin/sh
# Copyright (C) 2002-2005 Flavio Stanchina
# Copyright (C) 2005-2006 Aric Cyr
# Copyright (C) 2007 Mario Limonciello
# Copyright (C) 2009 Alberto Milone

set -e

NAME=MODULE_NAME
NAME=aws-neuronx
PACKAGE_NAME=$NAME-dkms
DEB_NAME=$(echo $PACKAGE_NAME | sed 's,_,-,')
CVERSION=`dpkg-query -W -f='${Version}' $DEB_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
Expand Down
6 changes: 3 additions & 3 deletions aws-neuronx-dkms-mkdeb/debian/prerm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/sh
#!/bin/sh

NAME=MODULE_NAME
VERSION=MODULE_VERSION
NAME=aws-neuronx
VERSION=2.31.7.0

set -e

Expand Down
2 changes: 1 addition & 1 deletion dkms.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME=aws-neuronx
PACKAGE_VERSION=2.30.2.0
PACKAGE_VERSION=2.31.7.0
BUILT_MODULE_NAME[0]="neuron"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build"
CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"
Expand Down
16 changes: 0 additions & 16 deletions neuron_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,3 @@ int narch_get_instance_type_name(char *instance_type_name, size_t instance_type_
#endif
}

enum neuron_platform_type narch_detect_platform_type(const struct neuron_platform_lookup *table) {
char buf[128];
int i;

if (narch_get_instance_type_name(buf, sizeof(buf))) {
return NEURON_PLATFORM_TYPE_STD;
}

for (i = 0; table[i].inst_name != NULL; i++) {
if (strncmp(buf, table[i].inst_name, strlen(table[i].inst_name)) == 0) {
return table[i].platform_type;
}
}

return NEURON_PLATFORM_TYPE_STD;
}
28 changes: 1 addition & 27 deletions neuron_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@ enum neuron_arch {
NEURON_ARCH_NUM
};

enum neuron_platform_type {
NEURON_PLATFORM_TYPE_STD = 0,
NEURON_PLATFORM_TYPE_ULTRASERVER = 1,
NEURON_PLATFORM_TYPE_PDS = 2,
NEURON_PLATFORM_TYPE_MAX = 3,
NEURON_PLATFORM_TYPE_INVALID,
};

struct neuron_platform_lookup {
const char *inst_name;
enum neuron_platform_type platform_type;
};

enum neuron_platform_operation_type {
NEURON_PLATFORM_OP_TYPE_DEVOPEN = 0,
NEURON_PLATFORM_OP_TYPE_EXEC = 1,
};

/**
* narch_init() - Set neuron devices architecture and revision.
*
Expand Down Expand Up @@ -89,13 +71,5 @@ bool narch_is_emu(void);
*/
int narch_get_instance_type_name(char *instance_type_name, size_t instance_type_name_size);

/**
* narch_detect_platform_type() - Detect platform type from instance name.
*
* @table: Array of instance name to platform type mappings.
*
* Return: Matching platform type, or NEURON_PLATFORM_TYPE_STD if no match.
*/
enum neuron_platform_type narch_detect_platform_type(const struct neuron_platform_lookup *table);

#endif

Loading
Loading