arch/arm64: update to follow NuttX C Coding Standard
This change moves the static vars to the appropriate place to follow the coding standard. It also adds comments as sections and `static` where necessary. Signed-off-by: Hidenori Matsubayashi <hidenori.matsubayashi@gmail.com>
This commit is contained in:
parent
0b03a2316f
commit
b0f9241ec1
|
@ -1,4 +1,4 @@
|
|||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
* arch/arm64/src/common/arm64_cpu_psci.c
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -16,11 +16,11 @@
|
|||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <debug.h>
|
||||
|
@ -36,11 +36,15 @@
|
|||
|
||||
#include "arm64_cpu_psci.h"
|
||||
|
||||
/***************************************************************************
|
||||
* Private Data
|
||||
***************************************************************************/
|
||||
|
||||
static struct psci_interface psci_data;
|
||||
|
||||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
static int psci_to_dev_err(int ret)
|
||||
{
|
||||
|
@ -137,9 +141,9 @@ static int psci_detect(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
/***************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
***************************************************************************/
|
||||
|
||||
uint32_t psci_version(void)
|
||||
{
|
||||
|
|
|
@ -59,9 +59,13 @@
|
|||
|
||||
#define IGROUPR_VAL 0xFFFFFFFFU
|
||||
|
||||
/***************************************************************************
|
||||
* Private Data
|
||||
***************************************************************************/
|
||||
|
||||
/* Redistributor base addresses for each core */
|
||||
|
||||
unsigned long gic_rdists[CONFIG_SMP_NCPUS];
|
||||
static unsigned long gic_rdists[CONFIG_SMP_NCPUS];
|
||||
|
||||
/***************************************************************************
|
||||
* Private Functions
|
||||
|
|
|
@ -131,12 +131,6 @@
|
|||
#define NUM_BASE_LEVEL_ENTRIES GET_NUM_BASE_LEVEL_ENTRIES( \
|
||||
CONFIG_ARM64_VA_BITS)
|
||||
|
||||
static uint64_t base_xlat_table[NUM_BASE_LEVEL_ENTRIES] aligned_data(
|
||||
NUM_BASE_LEVEL_ENTRIES * sizeof(uint64_t));
|
||||
|
||||
static uint64_t xlat_tables[CONFIG_MAX_XLAT_TABLES][XLAT_TABLE_ENTRIES]
|
||||
aligned_data(XLAT_TABLE_ENTRIES * sizeof(uint64_t));
|
||||
|
||||
#if (CONFIG_ARM64_PA_BITS == 48)
|
||||
#define TCR_PS_BITS TCR_PS_BITS_256TB
|
||||
#elif (CONFIG_ARM64_PA_BITS == 44)
|
||||
|
@ -155,6 +149,12 @@ aligned_data(XLAT_TABLE_ENTRIES * sizeof(uint64_t));
|
|||
* Private Data
|
||||
***************************************************************************/
|
||||
|
||||
static uint64_t base_xlat_table[NUM_BASE_LEVEL_ENTRIES] aligned_data(
|
||||
NUM_BASE_LEVEL_ENTRIES * sizeof(uint64_t));
|
||||
|
||||
static uint64_t xlat_tables[CONFIG_MAX_XLAT_TABLES][XLAT_TABLE_ENTRIES]
|
||||
aligned_data(XLAT_TABLE_ENTRIES * sizeof(uint64_t));
|
||||
|
||||
/* NuttX RTOS execution regions with appropriate attributes */
|
||||
|
||||
static const struct arm_mmu_region mmu_nxrt_regions[] =
|
||||
|
|
Loading…
Reference in New Issue