diff --git a/arch/arm/src/common/arm_assert.c b/arch/arm/src/common/arm_assert.c index 2d09aed8ea..89394dbff3 100644 --- a/arch/arm/src/common/arm_assert.c +++ b/arch/arm/src/common/arm_assert.c @@ -42,7 +42,6 @@ #include "arm_arch.h" #include "arm_internal.h" -#include "chip.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/arm/src/common/arm_checkstack.c b/arch/arm/src/common/arm_checkstack.c index b3b8f9b5ba..87384c56e7 100644 --- a/arch/arm/src/common/arm_checkstack.c +++ b/arch/arm/src/common/arm_checkstack.c @@ -35,7 +35,6 @@ #include "sched/sched.h" #include "arm_internal.h" -#include "chip.h" #ifdef CONFIG_STACK_COLORATION diff --git a/arch/arm/src/common/arm_initialize.c b/arch/arm/src/common/arm_initialize.c index b5962e0e36..75be389044 100644 --- a/arch/arm/src/common/arm_initialize.c +++ b/arch/arm/src/common/arm_initialize.c @@ -43,7 +43,6 @@ #include "arm_arch.h" #include "arm_internal.h" -#include "chip.h" /**************************************************************************** * Private Functions diff --git a/arch/arm/src/common/arm_internal.h b/arch/arm/src/common/arm_internal.h index 658091cb59..52a576e5c9 100644 --- a/arch/arm/src/common/arm_internal.h +++ b/arch/arm/src/common/arm_internal.h @@ -69,12 +69,6 @@ # define USE_SERIALDRIVER 1 #endif -/* Check if an interrupt stack size is configured */ - -#ifndef CONFIG_ARCH_INTERRUPTSTACK -# define CONFIG_ARCH_INTERRUPTSTACK 0 -#endif - /* For use with EABI and floating point, the stack must be aligned to 8-byte * addresses. */ @@ -87,6 +81,14 @@ #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) #define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) +/* Check if an interrupt stack size is configured */ + +#ifndef CONFIG_ARCH_INTERRUPTSTACK +# define CONFIG_ARCH_INTERRUPTSTACK 0 +#endif + +#define INTSTACK_SIZE (CONFIG_ARCH_INTERRUPTSTACK & ~STACK_ALIGN_MASK) + /* Macros to handle saving and restoring interrupt state. In the current ARM * model, the state is always copied to and from the stack and TCB. In the * Cortex-M0/3 model, the state is copied from the stack to the TCB, but only @@ -329,6 +331,11 @@ void arm_pminitialize(void); /* Interrupt handling *******************************************************/ +#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 +uintptr_t arm_intstack_alloc(void); +uintptr_t arm_intstack_top(void); +#endif + /* Exception handling logic unique to the Cortex-M family */ #if defined(CONFIG_ARCH_ARMV6M) || defined(CONFIG_ARCH_ARMV7M) || \ diff --git a/arch/arm/src/cxd56xx/chip.h b/arch/arm/src/cxd56xx/chip.h index fe3c776a63..c43ff78000 100644 --- a/arch/arm/src/cxd56xx/chip.h +++ b/arch/arm/src/cxd56xx/chip.h @@ -41,7 +41,6 @@ #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 # include "cxd56_cpuindex.h" -# include "cxd56_irq.h" #endif /**************************************************************************** diff --git a/arch/arm/src/cxd56xx/cxd56_irq.c b/arch/arm/src/cxd56xx/cxd56_irq.c index 06e80b2190..bb2b95b0fc 100644 --- a/arch/arm/src/cxd56xx/cxd56_irq.c +++ b/arch/arm/src/cxd56xx/cxd56_irq.c @@ -40,8 +40,6 @@ #include "arm_arch.h" #include "arm_internal.h" -#include "cxd56_irq.h" - #ifdef CONFIG_SMP # include "init/init.h" #endif diff --git a/arch/arm/src/cxd56xx/cxd56_irq.h b/arch/arm/src/cxd56xx/cxd56_irq.h deleted file mode 100644 index 6093e4a056..0000000000 --- a/arch/arm/src/cxd56xx/cxd56_irq.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * arch/arm/src/cxd56xx/cxd56_irq.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_ARM_SRC_CXD56XX_CXD56_IRQ_H -#define __ARCH_ARM_SRC_CXD56XX_CXD56_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The size of one interrupt stack. This is the configured value aligned - * the 8-bytes as required by the ARM EABI. - */ - -#define INTSTACK_SIZE (CONFIG_ARCH_INTERRUPTSTACK & ~7) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Functions Prototypes - ****************************************************************************/ - -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 -EXTERN uintptr_t arm_intstack_alloc(void); -EXTERN uintptr_t arm_intstack_top(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_CXD56XX_CXD56_IRQ_H */ diff --git a/arch/arm/src/imx6/chip.h b/arch/arm/src/imx6/chip.h index 45f84fa833..4c4ae15e53 100644 --- a/arch/arm/src/imx6/chip.h +++ b/arch/arm/src/imx6/chip.h @@ -32,7 +32,6 @@ #endif #include "hardware/imx_memorymap.h" -#include "imx_irq.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/arm/src/imx6/imx_irq.c b/arch/arm/src/imx6/imx_irq.c index 18bd80e2a7..a2b71a61a5 100644 --- a/arch/arm/src/imx6/imx_irq.c +++ b/arch/arm/src/imx6/imx_irq.c @@ -31,7 +31,6 @@ #include "arm_internal.h" #include "sctlr.h" #include "gic.h" -#include "imx_irq.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/arm/src/imx6/imx_irq.h b/arch/arm/src/imx6/imx_irq.h deleted file mode 100644 index 19716d5c33..0000000000 --- a/arch/arm/src/imx6/imx_irq.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * arch/arm/src/imx6/imx_irq.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_ARM_SRC_IMX6_IMX_IRQ_H -#define __ARCH_ARM_SRC_IMX6_IMX_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The size of one interrupt stack. This is the configured value aligned - * the 8-bytes as required by the ARM EABI. - */ - -#define INTSTACK_SIZE (CONFIG_ARCH_INTERRUPTSTACK & ~7) - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 -EXTERN uintptr_t arm_intstack_alloc(void); -EXTERN uintptr_t arm_intstack_top(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_IMX6_IMX_IRQ_H */ diff --git a/arch/arm/src/lc823450/chip.h b/arch/arm/src/lc823450/chip.h index b840c8fc53..952d6018c8 100644 --- a/arch/arm/src/lc823450/chip.h +++ b/arch/arm/src/lc823450/chip.h @@ -29,9 +29,6 @@ # include # include # include -# include "arm_arch.h" -# include "lc823450_irq.h" -# include "arm_arch.h" #endif /**************************************************************************** diff --git a/arch/arm/src/lc823450/lc823450_irq.c b/arch/arm/src/lc823450/lc823450_irq.c index 03a301e8bc..6c1112844b 100644 --- a/arch/arm/src/lc823450/lc823450_irq.c +++ b/arch/arm/src/lc823450/lc823450_irq.c @@ -39,7 +39,6 @@ #include "ram_vectors.h" #include "arm_arch.h" #include "arm_internal.h" -#include "chip.h" #include "lc823450_intc.h" #ifdef CONFIG_DVFS diff --git a/arch/arm/src/lc823450/lc823450_irq.h b/arch/arm/src/lc823450/lc823450_irq.h deleted file mode 100644 index 2804691216..0000000000 --- a/arch/arm/src/lc823450/lc823450_irq.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * arch/arm/src/lc823450/lc823450_irq.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_ARM_SRC_LC823450_LC823450_IRQ_H -#define __ARCH_ARM_SRC_LC823450_LC823450_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The size of one interrupt stack. This is the configured value aligned - * the 8-bytes as required by the ARM EABI. - */ - -#define INTSTACK_SIZE (CONFIG_ARCH_INTERRUPTSTACK & ~7) - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 -EXTERN uintptr_t arm_intstack_alloc(void); -EXTERN uintptr_t arm_intstack_top(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_LC823450_LC823450_IRQ_H */ diff --git a/arch/arm/src/rp2040/chip.h b/arch/arm/src/rp2040/chip.h index 7850384dfb..5b2daf361c 100644 --- a/arch/arm/src/rp2040/chip.h +++ b/arch/arm/src/rp2040/chip.h @@ -49,7 +49,6 @@ #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 3 # include "hardware/rp2040_sio.h" -# include "rp2040_irq.h" #endif /**************************************************************************** diff --git a/arch/arm/src/rp2040/rp2040_irq.c b/arch/arm/src/rp2040/rp2040_irq.c index 3349012475..08e9bd69e2 100644 --- a/arch/arm/src/rp2040/rp2040_irq.c +++ b/arch/arm/src/rp2040/rp2040_irq.c @@ -37,8 +37,6 @@ #include "arm_arch.h" #include "arm_internal.h" -#include "rp2040_irq.h" - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/arm/src/rp2040/rp2040_irq.h b/arch/arm/src/rp2040/rp2040_irq.h deleted file mode 100644 index 4c9e8344a7..0000000000 --- a/arch/arm/src/rp2040/rp2040_irq.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * arch/arm/src/rp2040/rp2040_irq.h - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -#ifndef __ARCH_ARM_SRC_RP2040_RP2040_IRQ_H -#define __ARCH_ARM_SRC_RP2040_RP2040_IRQ_H - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* The size of one interrupt stack. This is the configured value aligned - * the 8-bytes as required by the ARM EABI. - */ - -#define INTSTACK_SIZE (CONFIG_ARCH_INTERRUPTSTACK & ~7) - -/**************************************************************************** - * Public Types - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -#ifndef __ASSEMBLY__ - -#undef EXTERN -#if defined(__cplusplus) -#define EXTERN extern "C" -extern "C" -{ -#else -#define EXTERN extern -#endif - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 -EXTERN uintptr_t arm_intstack_alloc(void); -EXTERN uintptr_t arm_intstack_top(void); -#endif - -#undef EXTERN -#if defined(__cplusplus) -} -#endif - -#endif /* __ASSEMBLY__ */ -#endif /* __ARCH_ARM_SRC_RP2040_RP2040_IRQ_H */ diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h index ac1f1c8311..b3baf522cd 100644 --- a/arch/xtensa/src/common/xtensa.h +++ b/arch/xtensa/src/common/xtensa.h @@ -255,6 +255,11 @@ void xtensa_coproc_disable(struct xtensa_cpstate_s *cpstate, int cpset); /* IRQs */ +#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 15 +uintptr_t xtensa_intstack_alloc(void); +uintptr_t xtensa_intstack_top(void); +#endif + uint32_t *xtensa_int_decode(uint32_t cpuints, uint32_t *regs); uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs); uint32_t xtensa_enable_cpuint(uint32_t *shadow, uint32_t intmask); diff --git a/arch/xtensa/src/common/xtensa_checkstack.c b/arch/xtensa/src/common/xtensa_checkstack.c index 7fd4e5b80f..6fea6bc2e2 100644 --- a/arch/xtensa/src/common/xtensa_checkstack.c +++ b/arch/xtensa/src/common/xtensa_checkstack.c @@ -33,7 +33,6 @@ #include #include -#include "chip.h" #include "xtensa.h" #include "sched/sched.h" diff --git a/arch/xtensa/src/common/xtensa_dumpstate.c b/arch/xtensa/src/common/xtensa_dumpstate.c index 624302335c..7bd2ed97fa 100644 --- a/arch/xtensa/src/common/xtensa_dumpstate.c +++ b/arch/xtensa/src/common/xtensa_dumpstate.c @@ -36,7 +36,7 @@ #include #include #include -#include "chip.h" + #include "sched/sched.h" #include "xtensa.h" diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c index 4daacf8bfc..5db6872553 100644 --- a/arch/xtensa/src/common/xtensa_initialize.c +++ b/arch/xtensa/src/common/xtensa_initialize.c @@ -42,7 +42,6 @@ #include #include "xtensa.h" -#include "chip.h" /**************************************************************************** * Private Functions diff --git a/arch/xtensa/src/esp32/chip_macros.h b/arch/xtensa/src/esp32/chip_macros.h index a38e3483fd..8613b33674 100644 --- a/arch/xtensa/src/esp32/chip_macros.h +++ b/arch/xtensa/src/esp32/chip_macros.h @@ -114,11 +114,6 @@ extern "C" * Public Functions Prototypes ****************************************************************************/ -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 15 -uintptr_t xtensa_intstack_alloc(void); -uintptr_t xtensa_intstack_top(void); -#endif - #undef EXTERN #if defined(__cplusplus) } diff --git a/arch/xtensa/src/esp32s3/chip_macros.h b/arch/xtensa/src/esp32s3/chip_macros.h index 91f025329e..95ebd91ea0 100644 --- a/arch/xtensa/src/esp32s3/chip_macros.h +++ b/arch/xtensa/src/esp32s3/chip_macros.h @@ -108,11 +108,6 @@ extern "C" * Public Functions Prototypes ****************************************************************************/ -#if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 15 -uintptr_t xtensa_intstack_alloc(void); -uintptr_t xtensa_intstack_top(void); -#endif - #undef EXTERN #if defined(__cplusplus) }