Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrng: adjusting pic_init_secondary for further use cases #1280

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sys/arm/arm/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ arm_gic_init_secondary(device_t dev, uint32_t rootnum)
struct arm_gic_softc *sc = device_get_softc(dev);
u_int irq, cpu;

if (rootnum >= INTR_ROOT_COUNT) {
/*
* Per-processor setup for devices with PPI interrupts?
*/
return;
}

/* Set the mask so we can find this CPU to send it IPIs */
cpu = PCPU_GET(cpuid);
MPASS(cpu < GIC_MAXCPU);
Expand Down
7 changes: 7 additions & 0 deletions sys/arm/broadcom/bcm2835/bcm2836.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ bcm_lintc_init_secondary(device_t dev, uint32_t rootnum)
u_int cpu;
struct bcm_lintc_softc *sc;

if (rootnum >= INTR_ROOT_COUNT) {
/*
* Per-processor setup for devices with PPI interrupts?
*/
return;
}

cpu = PCPU_GET(cpuid);
sc = device_get_softc(dev);

Expand Down
7 changes: 7 additions & 0 deletions sys/arm64/arm64/gic_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,13 @@ gic_v3_init_secondary(device_t dev, uint32_t rootnum)
u_int cpu, irq;
int err, i;

if (rootnum >= INTR_ROOT_COUNT) {
/*
* Per-processor setup for devices with PPI interrupts?
*/
return;
}

sc = device_get_softc(dev);
cpu = PCPU_GET(cpuid);

Expand Down
7 changes: 7 additions & 0 deletions sys/arm64/arm64/gicv3_its.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,13 @@ gicv3_its_init_secondary(device_t dev, uint32_t rootnum)
{
struct gicv3_its_softc *sc;

if (rootnum >= INTR_ROOT_COUNT) {
/*
* Per-processor setup for devices with PPI interrupts?
*/
return;
}

sc = device_get_softc(dev);

/*
Expand Down
7 changes: 4 additions & 3 deletions sys/kern/subr_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,19 +1570,20 @@ dosoftints(void)
void
intr_pic_init_secondary(void)
{
struct intr_pic *pic;
device_t dev;
uint32_t rootnum;

/*
* QQQ: Only root PICs are aware of other CPUs ???
*/
//mtx_lock(&isrc_table_lock);
for (rootnum = 0; rootnum < INTR_ROOT_COUNT; rootnum++) {
dev = intr_irq_roots[rootnum].dev;
if (dev != NULL) {
PIC_INIT_SECONDARY(dev, rootnum);
}
}

SLIST_FOREACH(pic, &pic_list, pic_next)
PIC_INIT_SECONDARY(pic->pic_dev, INTR_ROOT_COUNT);
//mtx_unlock(&isrc_table_lock);
}
#endif
Expand Down
7 changes: 7 additions & 0 deletions sys/riscv/riscv/intc.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,16 @@
struct intr_irqsrc *isrc;
u_int cpu, irq;

if (rootnum >= INTR_ROOT_COUNT) {
/*
* Per-processor setup for devices with PPI interrupts?
*/
return;
}

sc = device_get_softc(dev);
cpu = PCPU_GET(cpuid);

Check warning on line 259 in sys/riscv/riscv/intc.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
/* Unmask attached interrupts */
for (irq = 0; irq < INTC_NIRQS; irq++) {
isrc = &sc->isrcs[irq].isrc;
Expand Down
Loading