Skip to content

Commit

Permalink
libteec: drop benchmark framework support
Browse files Browse the repository at this point in the history
Drop Benchmark Framework as current implementation is non-function
and obsolete, and it's not supported anymore.

Acked-by: Jens Wiklander <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
Signed-off-by: Igor Opaniuk <[email protected]>
  • Loading branch information
igoropaniuk authored and jforissier committed Jan 23, 2024
1 parent f7e4ced commit bfe3771
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 366 deletions.
4 changes: 0 additions & 4 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ LOCAL_CFLAGS += -DBINARY_PREFIX=\"TEEC\"

LOCAL_SRC_FILES := libteec/src/tee_client_api.c \
libteec/src/teec_trace.c
ifeq ($(CFG_TEE_BENCHMARK),y)
LOCAL_CFLAGS += -DCFG_TEE_BENCHMARK
LOCAL_SRC_FILES += teec_benchmark.c
endif

LOCAL_C_INCLUDES := $(LOCAL_PATH)/libteec/include

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ all: build install
build-libteec:
@echo "Building libteec.so"
@$(MAKE) --directory=libteec --no-print-directory --no-builtin-variables \
CFG_TEE_BENCHMARK=$(CFG_TEE_BENCHMARK) CFG_TEE_CLIENT_LOG_LEVEL=$(CFG_TEE_CLIENT_LOG_LEVEL)
CFG_TEE_CLIENT_LOG_LEVEL=$(CFG_TEE_CLIENT_LOG_LEVEL)

build-tee-supplicant: build-libteec
@echo "Building tee-supplicant"
Expand Down
13 changes: 0 additions & 13 deletions libteec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ endif()
################################################################################
# Configuration flags always included
################################################################################
option(CFG_TEE_BENCHMARK "Build with benchmark support" OFF)

set(CFG_TEE_CLIENT_LOG_LEVEL "1" CACHE STRING "libteec log level")
set(CFG_TEE_CLIENT_LOG_FILE "/data/tee/teec.log" CACHE STRING "Location of libteec log")

Expand All @@ -26,10 +24,6 @@ set(SRC
src/teec_trace.c
)

if(CFG_TEE_BENCHMARK)
set(SRC ${SRC} src/teec_benchmark.c)
endif()

################################################################################
# Built library
################################################################################
Expand All @@ -53,13 +47,6 @@ target_compile_definitions(teec
PRIVATE -DBINARY_PREFIX="LT"
)

################################################################################
# Optional flags
################################################################################
if(CFG_TEE_BENCHMARK)
target_compile_definitions(teec PRIVATE -DCFG_TEE_BENCHMARK)
endif()

################################################################################
# Public and private header and library dependencies
################################################################################
Expand Down
7 changes: 0 additions & 7 deletions libteec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ LIB_MAJ_MIN_P := $(LIB_NAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)

TEEC_SRCS := tee_client_api.c \
teec_trace.c
ifeq ($(CFG_TEE_BENCHMARK),y)
TEEC_SRCS += teec_benchmark.c
endif

TEEC_SRC_DIR := src
TEEC_OBJ_DIR := $(OUT_DIR)
Expand All @@ -34,10 +31,6 @@ TEEC_CFLAGS := $(addprefix -I, $(TEEC_INCLUDES)) $(CFLAGS) -D_GNU_SOURCE \
-DDEBUGLEVEL_$(CFG_TEE_CLIENT_LOG_LEVEL) \
-DBINARY_PREFIX=\"TEEC\"

ifeq ($(CFG_TEE_BENCHMARK),y)
TEEC_CFLAGS += -DCFG_TEE_BENCHMARK
endif

TEEC_LFLAGS := $(LDFLAGS) -lpthread
TEEC_LIBRARY := $(OUT_DIR)/$(LIB_MAJ_MIN_P)

Expand Down
77 changes: 0 additions & 77 deletions libteec/include/tee_bench.h

This file was deleted.

6 changes: 0 additions & 6 deletions libteec/src/tee_client_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
#endif
#include <linux/tee.h>

#include "teec_benchmark.h"

#define MIN(x, y) (((x) < (y)) ? (x) : (y))

/* How many device sequence numbers will be tried before giving up */
Expand Down Expand Up @@ -705,8 +703,6 @@ TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t cmd_id,
goto out;
}

bm_timestamp();

buf_data.buf_ptr = (uintptr_t)&buf;
buf_data.buf_len = sizeof(buf);

Expand Down Expand Up @@ -741,8 +737,6 @@ TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t cmd_id,
eorig = arg->ret_origin;
teec_post_process_operation(operation, params, shm);

bm_timestamp();

out_free_temp_refs:
teec_free_temp_refs(operation, shm);
out:
Expand Down
Loading

0 comments on commit bfe3771

Please sign in to comment.