Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171123025
D40474.id133934.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D40474.id133934.diff
View Options
diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c
--- a/sys/arm64/arm64/gic_v3.c
+++ b/sys/arm64/arm64/gic_v3.c
@@ -1092,12 +1092,11 @@
gic_v3_init_secondary(device_t dev)
{
struct gic_v3_setup_periph_args pargs;
- device_t child;
struct gic_v3_softc *sc;
gic_v3_initseq_t *init_func;
struct intr_irqsrc *isrc;
u_int cpu, irq;
- int err, i;
+ int err;
sc = device_get_softc(dev);
cpu = PCPU_GET(cpuid);
@@ -1133,11 +1132,6 @@
gic_v3_enable_intr_periph(&pargs);
}
}
-
- for (i = 0; i < sc->gic_nchildren; i++) {
- child = sc->gic_children[i];
- PIC_INIT_SECONDARY(child);
- }
}
static void
diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -117,7 +117,7 @@
/* Interrupt controller definition. */
struct intr_pic {
- SLIST_ENTRY(intr_pic) pic_next;
+ STAILQ_ENTRY(intr_pic) pic_next;
intptr_t pic_xref; /* hardware identification */
device_t pic_dev;
/* Only one of FLAG_PIC or FLAG_MSI may be set */
@@ -146,7 +146,7 @@
#endif
static struct mtx pic_list_lock;
-static SLIST_HEAD(, intr_pic) pic_list;
+static STAILQ_HEAD(, intr_pic) pic_list;
static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags);
@@ -190,7 +190,7 @@
intr_irq_init(void *dummy __unused)
{
- SLIST_INIT(&pic_list);
+ STAILQ_INIT(&pic_list);
mtx_init(&pic_list_lock, "intr pic list", NULL, MTX_DEF);
mtx_init(&isrc_table_lock, "intr isrc table", NULL, MTX_DEF);
@@ -752,7 +752,7 @@
return (NULL);
/* Note that pic->pic_dev is never NULL on registered PIC. */
- SLIST_FOREACH(pic, &pic_list, pic_next) {
+ STAILQ_FOREACH(pic, &pic_list, pic_next) {
if ((pic->pic_flags & FLAG_TYPE_MASK) !=
(flags & FLAG_TYPE_MASK))
continue;
@@ -806,7 +806,7 @@
pic->pic_dev = dev;
pic->pic_flags = flags;
mtx_init(&pic->pic_child_lock, "pic child lock", NULL, MTX_SPIN);
- SLIST_INSERT_HEAD(&pic_list, pic, pic_next);
+ STAILQ_INSERT_TAIL(&pic_list, pic, pic_next);
mtx_unlock(&pic_list_lock);
return (pic);
@@ -826,7 +826,7 @@
mtx_unlock(&pic_list_lock);
return;
}
- SLIST_REMOVE(&pic_list, pic, intr_pic, pic_next);
+ STAILQ_REMOVE(&pic_list, pic, intr_pic, pic_next);
mtx_unlock(&pic_list_lock);
free(pic, M_INTRNG);
@@ -1550,15 +1550,12 @@
void
intr_pic_init_secondary(void)
{
+ struct intr_pic *pic;
- /*
- * QQQ: Only root PIC is aware of other CPUs ???
- */
- KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__));
-
- //mtx_lock(&isrc_table_lock);
- PIC_INIT_SECONDARY(intr_irq_root_dev);
- //mtx_unlock(&isrc_table_lock);
+ //mtx_lock(&pic_list_lock);
+ STAILQ_FOREACH(pic, &pic_list, pic_next)
+ PIC_INIT_SECONDARY(pic->pic_dev);
+ //mtx_unlock(&pic_list_lock);
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 8:38 PM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38610182
Default Alt Text
D40474.id133934.diff (2 KB)
Attached To
Mode
D40474: intrng: call pic_init_secondary on all registered PICs
Attached
Detach File
Event Timeline
Log In to Comment