mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
xlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC
With this, it is clearer that .base_table_entries and .tables_num are the array size of .base_table and .tables, respectively. Change-Id: I634e65aba835ab9908cc3919355df6bc6e18d42a Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
363830df1c
commit
e28224583e
1 changed files with 3 additions and 2 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <platform_def.h>
|
||||
|
||||
#include <lib/cassert.h>
|
||||
#include <lib/utils_def.h>
|
||||
#include <lib/xlat_tables/xlat_tables_arch.h>
|
||||
#include <lib/xlat_tables/xlat_tables_defs.h>
|
||||
|
||||
|
@ -160,13 +161,13 @@ struct xlat_ctx {
|
|||
.mmap = _ctx_name##_mmap, \
|
||||
.mmap_num = (_mmap_count), \
|
||||
.tables = _ctx_name##_xlat_tables, \
|
||||
.tables_num = _xlat_tables_count, \
|
||||
.tables_num = ARRAY_SIZE(_ctx_name##_xlat_tables), \
|
||||
XLAT_CTX_INIT_TABLE_ATTR() \
|
||||
XLAT_REGISTER_DYNMAP_STRUCT(_ctx_name) \
|
||||
.next_table = 0, \
|
||||
.base_table = _ctx_name##_base_xlat_table, \
|
||||
.base_table_entries = \
|
||||
GET_NUM_BASE_LEVEL_ENTRIES(_virt_addr_space_size),\
|
||||
ARRAY_SIZE(_ctx_name##_base_xlat_table), \
|
||||
.max_pa = 0U, \
|
||||
.max_va = 0U, \
|
||||
.base_level = GET_XLAT_TABLE_LEVEL_BASE(_virt_addr_space_size),\
|
||||
|
|
Loading…
Add table
Reference in a new issue