Files
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

63 lines
2.4 KiB
C

/*
* Copyright (C) 2018 MediaTek Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef TMEM_UT_COMMON_H
#define TMEM_UT_COMMON_H
#include "private/tmem_device.h"
#include "tests/ut_api.h"
#define REGMGR_REGION_FINAL_STATE_ON (1)
#define REGMGR_REGION_FINAL_STATE_OFF (0)
#define MEM_UNORDER_SIZE_TEST_CFG_ENABLE (1)
#define MEM_UNORDER_SIZE_TEST_CFG_DISABLE (0)
#define MEM_REGION_ON_OFF_STREE_ROUND (100ULL)
#define MULTIPLE_REGION_MULTIPLE_THREAD_TEST_ENABLE (0)
#define MTEE_MCHUNKS_MULTIPLE_THREAD_TEST_ENABLE (1)
enum UT_RET_STATE all_regmgr_state_off_check(void);
enum UT_RET_STATE mem_basic_test(enum TRUSTED_MEM_TYPE mem_type,
int region_final_state);
enum UT_RET_STATE mem_alloc_simple_test(enum TRUSTED_MEM_TYPE mem_type,
u8 *mem_owner, int region_final_state,
int un_order_sz_cfg);
enum UT_RET_STATE mem_alloc_alignment_test(enum TRUSTED_MEM_TYPE mem_type,
u8 *mem_owner,
int region_final_state);
enum UT_RET_STATE mem_handle_list_init(enum TRUSTED_MEM_TYPE mem_type);
enum UT_RET_STATE mem_handle_list_deinit(void);
enum UT_RET_STATE mem_alloc_saturation_test(enum TRUSTED_MEM_TYPE mem_type,
u8 *mem_owner,
int region_final_state, int round);
enum UT_RET_STATE
mem_regmgr_region_defer_off_test(enum TRUSTED_MEM_TYPE mem_type, u8 *mem_owner,
int region_final_state);
enum UT_RET_STATE
mem_regmgr_region_online_count_test(enum TRUSTED_MEM_TYPE mem_type,
u8 *mem_owner, int region_final_state);
enum UT_RET_STATE mem_region_on_off_stress_test(enum TRUSTED_MEM_TYPE mem_type,
int region_final_state,
int round);
enum UT_RET_STATE mem_alloc_multithread_test(enum TRUSTED_MEM_TYPE mem_type);
enum UT_RET_STATE mem_alloc_mixed_size_test(enum TRUSTED_MEM_TYPE mem_type,
u8 *mem_owner,
int region_final_state);
enum UT_RET_STATE mem_multi_type_alloc_multithread_test(void);
enum UT_RET_STATE mem_mtee_mchunks_alloc_multithread_test(void);
bool is_multi_type_alloc_multithread_test_locked(void);
#endif /* end of TMEM_UT_COMMON_H */