File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed
Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,15 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void *context));
160160 */
161161void rt_hw_us_delay (rt_uint32_t us );
162162
163+ int rt_hw_cpu_id (void );
164+
165+ #if defined(RT_USING_SMP ) || defined(RT_USING_AMP )
166+ /**
167+ * ipi function
168+ */
169+ void rt_hw_ipi_send (int ipi_vector , unsigned int cpu_mask );
170+ #endif
171+
163172#ifdef RT_USING_SMP
164173#include <cpuport.h> /* for spinlock from arch */
165174
@@ -172,8 +181,6 @@ void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock);
172181void rt_hw_spin_lock (rt_hw_spinlock_t * lock );
173182void rt_hw_spin_unlock (rt_hw_spinlock_t * lock );
174183
175- int rt_hw_cpu_id (void );
176-
177184extern rt_hw_spinlock_t _cpus_lock ;
178185extern rt_hw_spinlock_t _rt_critical_lock ;
179186
@@ -185,11 +192,6 @@ extern rt_hw_spinlock_t _rt_critical_lock;
185192#define RT_DEFINE_SPINLOCK (x ) rt_hw_spinlock_t x = __RT_HW_SPIN_LOCK_UNLOCKED(x)
186193#define RT_DECLARE_SPINLOCK (x )
187194
188- /**
189- * ipi function
190- */
191- void rt_hw_ipi_send (int ipi_vector , unsigned int cpu_mask );
192-
193195/**
194196 * boot secondary cpu
195197 */
Original file line number Diff line number Diff line change @@ -38,6 +38,22 @@ config RT_USING_SMART
3838 help
3939 RT-Thread Smart is a microkernel based operating system on RT-Thread.
4040
41+ config RT_USING_AMP
42+ bool "Enable AMP(Asymmetric Multi-Processing)"
43+ default n
44+ if RT_USING_AMP
45+ choice
46+ prompt "Select the AMP role"
47+ default RT_AMP_SLAVE
48+
49+ config RT_AMP_MASTER
50+ bool "amp role MASTER"
51+
52+ config RT_AMP_SLAVE
53+ bool "amp role SLAVE"
54+ endchoice
55+ endif
56+
4157config RT_USING_SMP
4258 bool "Enable SMP(Symmetric multiprocessing)"
4359 default n
@@ -50,7 +66,7 @@ config RT_USING_SMP
5066config RT_CPUS_NR
5167 int "Number of CPUs"
5268 default 2
53- depends on RT_USING_SMP
69+ depends on RT_USING_SMP || RT_USING_AMP
5470 help
5571 Number of CPUs in the system
5672
You can’t perform that action at this time.
0 commit comments