You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/03/10 08:55:32 UTC
[incubator-nuttx] branch master updated: Fix some nxstyle
complaints in arm addrenv
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang 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 d4b0590 Fix some nxstyle complaints in arm addrenv
d4b0590 is described below
commit d4b0590abbba5924630e794723d96e4093bf4542
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Mar 10 11:44:26 2020 +0900
Fix some nxstyle complaints in arm addrenv
---
arch/arm/src/armv7-a/arm_addrenv.c | 18 +++++++++++-------
arch/arm/src/armv7-a/arm_addrenv_kstack.c | 4 +++-
arch/arm/src/armv7-a/arm_addrenv_ustack.c | 16 +++++++++-------
arch/arm/src/armv7-a/arm_addrenv_utils.c | 13 +++++++++----
4 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/arch/arm/src/armv7-a/arm_addrenv.c b/arch/arm/src/armv7-a/arm_addrenv.c
index ea6fc02..3ad2315 100644
--- a/arch/arm/src/armv7-a/arm_addrenv.c
+++ b/arch/arm/src/armv7-a/arm_addrenv.c
@@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
+
/****************************************************************************
* Address Environment Interfaces
*
@@ -96,7 +97,8 @@
* If CONFIG_ARCH_KERNEL_STACK=y is selected then the platform specific
* code must export these additional interfaces:
*
- * up_addrenv_kstackalloc - Create a stack in the kernel address environment
+ * up_addrenv_kstackalloc - Create a stack in the kernel address
+ * environment
* up_addrenv_kstackfree - Destroy the kernel stack.
*
****************************************************************************/
@@ -128,6 +130,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+
/* Configuration */
#if (CONFIG_ARCH_TEXT_VBASE & SECTION_MASK) != 0
@@ -267,9 +270,9 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,
memset(addrenv, 0, sizeof(group_addrenv_t));
- /* Back the allocation up with physical pages and set up the level 2 mapping
- * (which of course does nothing until the L2 page table is hooked into
- * the L1 page table).
+ /* Back the allocation up with physical pages and set up the level 2
+ * mapping (which of course does nothing until the L2 page table is hooked
+ * into the L1 page table).
*/
/* Allocate .text space pages */
@@ -303,7 +306,8 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,
* region.
*/
- ret = up_addrenv_initdata((uintptr_t)addrenv->data[0] & PMD_PTE_PADDR_MASK);
+ ret = up_addrenv_initdata((uintptr_t)addrenv->data[0] &
+ PMD_PTE_PADDR_MASK);
if (ret < 0)
{
berr("ERROR: Failed to initialize .bss/.data region: %d\n", ret);
@@ -484,8 +488,8 @@ ssize_t up_addrenv_heapsize(FAR const group_addrenv_t *addrenv)
* After an address environment has been established for a task group (via
* up_addrenv_create(). This function may be called to instantiate
* that address environment in the virtual address space. this might be
- * necessary, for example, to load the code for the task group from a file or
- * to access address environment private data.
+ * necessary, for example, to load the code for the task group from a file
+ * or to access address environment private data.
*
* Input Parameters:
* addrenv - The representation of the task address environment previously
diff --git a/arch/arm/src/armv7-a/arm_addrenv_kstack.c b/arch/arm/src/armv7-a/arm_addrenv_kstack.c
index 5bb2b68..f6e8078 100644
--- a/arch/arm/src/armv7-a/arm_addrenv_kstack.c
+++ b/arch/arm/src/armv7-a/arm_addrenv_kstack.c
@@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
+
/****************************************************************************
* Address Environment Interfaces
*
@@ -96,7 +97,8 @@
* If CONFIG_ARCH_KERNEL_STACK=y is selected then the platform specific
* code must export these additional interfaces:
*
- * up_addrenv_kstackalloc - Create a stack in the kernel address environment
+ * up_addrenv_kstackalloc - Create a stack in the kernel address
+ * environment
* up_addrenv_kstackfree - Destroy the kernel stack.
* up_addrenv_vkstack - Return the base address of the kernel stack
*
diff --git a/arch/arm/src/armv7-a/arm_addrenv_ustack.c b/arch/arm/src/armv7-a/arm_addrenv_ustack.c
index 4b7be01..66da563 100644
--- a/arch/arm/src/armv7-a/arm_addrenv_ustack.c
+++ b/arch/arm/src/armv7-a/arm_addrenv_ustack.c
@@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
+
/****************************************************************************
* Address Environment Interfaces
*
@@ -110,6 +111,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+
/* Configuration */
#if (CONFIG_ARCH_STACK_VBASE & SECTION_MASK) != 0
@@ -151,9 +153,9 @@ int up_addrenv_ustackalloc(FAR struct tcb_s *tcb, size_t stacksize)
memset(tcb->xcp.ustack, 0, ARCH_STACK_NSECTS * sizeof(uintptr_t *));
- /* Back the allocation up with physical pages and set up the level 2 mapping
- * (which of course does nothing until the L2 page table is hooked into
- * the L1 page table).
+ /* Back the allocation up with physical pages and set up the level 2
+ * mapping (which of course does nothing until the L2 page table is hooked
+ * into the L1 page table).
*/
/* Allocate .text space pages */
@@ -235,10 +237,10 @@ int up_addrenv_vustack(FAR const struct tcb_s *tcb, FAR void **vstack)
*
* Description:
* After an address environment has been established for a task's stack
- * (via up_addrenv_ustackalloc(). This function may be called to instantiate
- * that address environment in the virtual address space. This is a
- * necessary step before each context switch to the newly created thread
- * (including the initial thread startup).
+ * (via up_addrenv_ustackalloc(). This function may be called to
+ * instantiate that address environment in the virtual address space.
+ * This is a necessary step before each context switch to the newly created
+ * thread (including the initial thread startup).
*
* Input Parameters:
* tcb - The TCB of the thread with the stack address environment to be
diff --git a/arch/arm/src/armv7-a/arm_addrenv_utils.c b/arch/arm/src/armv7-a/arm_addrenv_utils.c
index baf24e0..f5c9715 100644
--- a/arch/arm/src/armv7-a/arm_addrenv_utils.c
+++ b/arch/arm/src/armv7-a/arm_addrenv_utils.c
@@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
+
/****************************************************************************
* Included Files
****************************************************************************/
@@ -130,8 +131,10 @@ int arm_addrenv_create_region(FAR uintptr_t **list, unsigned int listlen,
/* Temporarily map the page into the virtual address space */
l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
- mmu_l1_setentry(paddr & ~SECTION_MASK, ARCH_SCRATCH_VBASE, MMU_MEMFLAGS);
- l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE | (paddr & SECTION_MASK));
+ mmu_l1_setentry(paddr & ~SECTION_MASK, ARCH_SCRATCH_VBASE,
+ MMU_MEMFLAGS);
+ l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE |
+ (paddr & SECTION_MASK));
#endif
/* Initialize the page table */
@@ -223,8 +226,10 @@ void arm_addrenv_destroy_region(FAR uintptr_t **list, unsigned int listlen,
/* Temporarily map the page into the virtual address space */
l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
- mmu_l1_setentry(paddr & ~SECTION_MASK, ARCH_SCRATCH_VBASE, MMU_MEMFLAGS);
- l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE | (paddr & SECTION_MASK));
+ mmu_l1_setentry(paddr & ~SECTION_MASK, ARCH_SCRATCH_VBASE,
+ MMU_MEMFLAGS);
+ l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE |
+ (paddr & SECTION_MASK));
#endif
/* Return the allocated pages to the page allocator unless we were