mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[PIC] Make affinity helper interface (#8995)
* [PIC] Make affinity helper interface Signed-off-by: GuEe-GUI <2991707448@qq.com> * [PIC/GIC] Fixup GIC affinity init GICv2 is not support if current CPU is not startup, but RT-Thread SMP is startup after the devices init in the `main` thread. This patch fixup the cpumask to init once and check the init status in affinity interface. Signed-off-by: GuEe-GUI <2991707448@qq.com> --------- Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
@@ -40,7 +40,7 @@ struct rt_pic
|
||||
|
||||
rt_list_t list;
|
||||
|
||||
struct rt_pic_ops *ops;
|
||||
const struct rt_pic_ops *ops;
|
||||
|
||||
void *priv_data;
|
||||
void *user_data;
|
||||
@@ -91,6 +91,10 @@ struct rt_pic_isr
|
||||
struct rt_irq_desc action;
|
||||
};
|
||||
|
||||
#define RT_IRQ_AFFINITY_DECLARE(name) RT_BITMAP_DECLARE(name, RT_CPUS_NR)
|
||||
#define RT_IRQ_AFFINITY_SET(affinity, cpuid) rt_bitmap_set_bit(affinity, cpuid)
|
||||
#define RT_IRQ_AFFINITY_CLEAR(affinity, cpuid) rt_bitmap_clear_bit(affinity, cpuid)
|
||||
|
||||
#ifdef RT_USING_PIC_STATISTICS
|
||||
struct rt_pic_irq_statistics
|
||||
{
|
||||
@@ -117,7 +121,7 @@ struct rt_pic_irq
|
||||
rt_uint32_t mode;
|
||||
|
||||
rt_uint32_t priority;
|
||||
RT_BITMAP_DECLARE(affinity, RT_CPUS_NR);
|
||||
RT_IRQ_AFFINITY_DECLARE(affinity);
|
||||
|
||||
rt_list_t list;
|
||||
rt_list_t children_nodes;
|
||||
|
||||
Reference in New Issue
Block a user