[PATCH 1/4] sparc: Move SPARC-specific macros to sparc.h
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Nov 5 15:09:01 UTC 2020
Clarify Doxygen comments. Fix formatting.
Update #4171.
---
.../score/cpu/sparc/include/rtems/score/cpu.h | 21 ------------
.../cpu/sparc/include/rtems/score/sparc.h | 32 ++++++++++++++++++-
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
index e2604bb76f..8c5330b8ce 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
@@ -691,27 +691,6 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
*/
#define CPU_INTERRUPT_MAXIMUM_VECTOR_NUMBER 511
-/**
- * This is the bit step in a vector number to indicate it is being installed
- * as a synchronous trap.
- */
-#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
-
-/**
- * This macro indicates that @a _trap as an asynchronous trap.
- */
-#define SPARC_ASYNCHRONOUS_TRAP( _trap ) (_trap)
-
-/**
- * This macro indicates that @a _trap as a synchronous trap.
- */
-#define SPARC_SYNCHRONOUS_TRAP( _trap ) ((_trap) + 256 )
-
-/**
- * This macro returns the real hardware vector number associated with @a _trap.
- */
-#define SPARC_REAL_TRAP_NUMBER( _trap ) ((_trap) % 256)
-
/**
* This is defined if the port has a special way to report the ISR nesting
* level. Most ports maintain the variable _ISR_Nest_level.
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
index db659cc1fa..7e127f1fd5 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/sparc.h
@@ -167,6 +167,36 @@ extern "C" {
#define SPARC_SWTRAP_IRQDIS_FP 11
#endif
+/**
+ * @brief This is the bit step in a vector number to indicate it is being
+ * installed as a synchronous trap.
+ */
+#define SPARC_SYNCHRONOUS_TRAP_BIT_MASK 0x100
+
+/**
+ * @brief Returns the asynchronous trap number associated with the specified
+ * the real hardware vector number.
+ *
+ * @param _trap is the real hardware vector number to map.
+ */
+#define SPARC_ASYNCHRONOUS_TRAP( _trap ) ( _trap )
+
+/**
+ * @brief Returns the synchronous trap number associated with the specified the
+ * real hardware vector number.
+ *
+ * @param _trap is the real hardware vector number to map.
+ */
+#define SPARC_SYNCHRONOUS_TRAP( _trap ) ( ( _trap ) + 256 )
+
+/**
+ * @brief Returns the real hardware vector number associated with the specified
+ * synchronous or asynchronous trap number.
+ *
+ * @param _trap is the synchronous or asynchronous trap number to map.
+ */
+#define SPARC_REAL_TRAP_NUMBER( _trap ) ( ( _trap ) % 256 )
+
#ifndef ASM
/**
@@ -411,7 +441,7 @@ static inline uint32_t _LEON3_Get_current_processor( void )
return asr17 >> LEON3_ASR17_PROCESSOR_INDEX_SHIFT;
}
-#endif
+#endif /* ASM */
#ifdef __cplusplus
}
--
2.26.2
More information about the devel
mailing list