svn commit: r304628 - in projects/powernv/powerpc: include powerpc
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Mon Aug 22 19:28:56 UTC 2016
Author: nwhitehorn
Date: Mon Aug 22 19:28:54 2016
New Revision: 304628
URL: https://svnweb.freebsd.org/changeset/base/304628
Log:
As a stopgap until PPC intr_machdep is burned to the ground, allow PICs to
learn what the IRQ <-> interrupt line mapping being used for them is.
Modified:
projects/powernv/powerpc/include/intr_machdep.h
projects/powernv/powerpc/powerpc/intr_machdep.c
Modified: projects/powernv/powerpc/include/intr_machdep.h
==============================================================================
--- projects/powernv/powerpc/include/intr_machdep.h Mon Aug 22 19:27:30 2016 (r304627)
+++ projects/powernv/powerpc/include/intr_machdep.h Mon Aug 22 19:28:54 2016 (r304628)
@@ -46,7 +46,7 @@ driver_filter_t powerpc_ipi_handler;
void intrcnt_add(const char *name, u_long **countp);
-void powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int);
+u_int powerpc_register_pic(device_t, uint32_t, u_int, u_int, u_int);
u_int powerpc_get_irq(uint32_t, u_int);
void powerpc_dispatch_intr(u_int, struct trapframe *);
Modified: projects/powernv/powerpc/powerpc/intr_machdep.c
==============================================================================
--- projects/powernv/powerpc/powerpc/intr_machdep.c Mon Aug 22 19:27:30 2016 (r304627)
+++ projects/powernv/powerpc/powerpc/intr_machdep.c Mon Aug 22 19:28:54 2016 (r304628)
@@ -317,7 +317,7 @@ powerpc_assign_intr_cpu(void *arg, int c
#endif
}
-void
+u_int
powerpc_register_pic(device_t dev, uint32_t node, u_int irqs, u_int ipis,
u_int atpic)
{
@@ -356,6 +356,8 @@ powerpc_register_pic(device_t dev, uint3
("Number of PICs exceeds maximum (%d)", MAX_PICS));
mtx_unlock(&intr_table_lock);
+
+ return (p->base);
}
u_int
@@ -385,7 +387,7 @@ powerpc_get_irq(uint32_t node, u_int pin
piclist[idx].irqs = 124;
piclist[idx].ipis = 4;
piclist[idx].base = nirqs;
- nirqs += 128;
+ nirqs += (1 << 24);
npics++;
KASSERT(npics < MAX_PICS,
More information about the svn-src-projects
mailing list