Rename arch/arm/src/armv7-a/syscall.h to svcall.h to work around some include path name collisions; fix some compilation errors in SYSCALL logic when debug is enabled

This commit is contained in:
Gregory Nutt
2014-08-29 07:48:16 -06:00
parent 8dd679e875
commit 8196b629a4
4 changed files with 22 additions and 17 deletions
+3 -3
View File
@@ -33,8 +33,8 @@
* *
************************************************************************************/ ************************************************************************************/
#ifndef __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #ifndef __ARCH_ARM_SRC_ARMV6_M_SVCALL_H
#define __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #define __ARCH_ARM_SRC_ARMV6_M_SVCALL_H
/************************************************************************************ /************************************************************************************
* Included Files * Included Files
@@ -142,5 +142,5 @@
* Inline Functions * Inline Functions
************************************************************************************/ ************************************************************************************/
#endif /* __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H */ #endif /* __ARCH_ARM_SRC_ARMV6_M_SVCALL_H */
+12 -7
View File
@@ -36,31 +36,36 @@
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <syscall.h>
#include <assert.h> #include <assert.h>
#include <debug.h> #include <debug.h>
#include <arch/irq.h> #include <arch/irq.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
#ifdef CONFIG_LIB_SYSCALL #include "svcall.h"
# include <syscall.h>
#endif
#include "syscall.h"
#include "up_internal.h" #include "up_internal.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Debug ********************************************************************/
/* Output debug info if stack dump is selected -- even if /* Output debug info if stack dump is selected -- even if
* debug is not selected. * debug is not selected.
*/ */
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
#else
# define svcdbg(x...)
#endif
#ifdef CONFIG_ARCH_STACKDUMP #ifdef CONFIG_ARCH_STACKDUMP
# undef lldbg # undef lldbg
# define lldbg lowsyslog # define lldbg lowsyslog
@@ -391,7 +396,7 @@ uint32_t *arm_syscall(uint32_t *regs)
regs[REG_R0] -= CONFIG_SYS_RESERVED; regs[REG_R0] -= CONFIG_SYS_RESERVED;
#else #else
slldbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]); svcdbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
#endif #endif
} }
break; break;
@@ -428,7 +433,7 @@ uint32_t *arm_syscall(uint32_t *regs)
uint32_t *arm_syscall(uint32_t *regs) uint32_t *arm_syscall(uint32_t *regs)
{ {
lldbg("Syscall from 0x%x\n", regs[REG_PC]); lldbg("SYSCALL from 0x%x\n", regs[REG_PC]);
current_regs = regs; current_regs = regs;
PANIC(); PANIC();
} }
@@ -1,5 +1,5 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/armv7-a/syscall.h * arch/arm/src/armv7-a/svcall.h
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@@ -33,8 +33,8 @@
* *
************************************************************************************/ ************************************************************************************/
#ifndef __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #ifndef __ARCH_ARM_SRC_ARMV7_A_SVCALL_H
#define __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #define __ARCH_ARM_SRC_ARMV7_A_SVCALL_H
/************************************************************************************ /************************************************************************************
* Included Files * Included Files
@@ -120,4 +120,4 @@
************************************************************************************/ ************************************************************************************/
#endif /* CONFIG_LIB_SYSCALL */ #endif /* CONFIG_LIB_SYSCALL */
#endif /* __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H */ #endif /* __ARCH_ARM_SRC_ARMV7_A_SVCALL_H */
+3 -3
View File
@@ -33,8 +33,8 @@
* *
************************************************************************************/ ************************************************************************************/
#ifndef __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #ifndef __ARCH_ARM_SRC_ARMV7_M_SVCALL_H
#define __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H #define __ARCH_ARM_SRC_ARMV7_M_SVCALL_H
/************************************************************************************ /************************************************************************************
* Included Files * Included Files
@@ -142,5 +142,5 @@
* Inline Functions * Inline Functions
************************************************************************************/ ************************************************************************************/
#endif /* __ARCH_ARM_SRC_COMMON_CORTEXM_SVCALL_H */ #endif /* __ARCH_ARM_SRC_ARMV7_M_SVCALL_H */