This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 1297c23e7d arch/arm64/arm64_mmu: add mmu_nxrt_config
1297c23e7d is described below

commit 1297c23e7de5f96b19bd84c5d3f06cef0f8e2a27
Author: Hidenori Matsubayashi <hidenori.matsubaya...@gmail.com>
AuthorDate: Sat Oct 8 22:22:30 2022 +0900

    arch/arm64/arm64_mmu: add mmu_nxrt_config
    
    This change is a refactoring to match the userspace mmu_regions 
implementation.
    
    Signed-off-by: Hidenori Matsubayashi <hidenori.matsubaya...@gmail.com>
---
 arch/arm64/src/common/arm64_mmu.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/src/common/arm64_mmu.c 
b/arch/arm64/src/common/arm64_mmu.c
index cc55e01452..709ef89237 100644
--- a/arch/arm64/src/common/arm64_mmu.c
+++ b/arch/arm64/src/common/arm64_mmu.c
@@ -184,6 +184,12 @@ static const struct arm_mmu_region mmu_nxrt_regions[] =
                         MT_NORMAL | MT_RW | MT_SECURE),
 };
 
+static const struct arm_mmu_config mmu_nxrt_config =
+{
+  .num_regions = ARRAY_SIZE(mmu_nxrt_regions),
+  .mmu_regions = mmu_nxrt_regions,
+};
+
 /***************************************************************************
  * Private Functions
  ***************************************************************************/
@@ -507,9 +513,9 @@ static void setup_page_tables(void)
 
   /* setup translation table for mirtos execution regions */
 
-  for (index = 0; index < ARRAY_SIZE(mmu_nxrt_regions); index++)
+  for (index = 0; index < mmu_nxrt_config.num_regions; index++)
     {
-      region = &mmu_nxrt_regions[index];
+      region = &mmu_nxrt_config.mmu_regions[index];
       if (region->size || region->attrs)
         {
           init_xlat_tables(region);

Reply via email to