PERFORCE change 100281 for review

Paolo Pisati piso at FreeBSD.org
Thu Jun 29 11:27:15 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100281

Change 100281 by piso at piso_newluxor on 2006/06/29 11:26:21

	Finished converting pic_setup_intr()&C to support
	interrupt filtering: now powerpc compiles again, and is
	in par with all the other archs.

Affected files ...

.. //depot/projects/soc2006/intr_filter/powerpc/include/intr_machdep.h#3 edit
.. //depot/projects/soc2006/intr_filter/powerpc/include/openpicvar.h#2 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powermac/hrowpic.c#2 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#4 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powerpc/nexus.c#2 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powerpc/openpic.c#2 edit
.. //depot/projects/soc2006/intr_filter/powerpc/powerpc/pic_if.m#2 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/powerpc/include/intr_machdep.h#3 (text+ko) ====

@@ -42,8 +42,8 @@
 
 void	intr_init(void (*)(void), int, void (*)(uintptr_t), void (*)(uintptr_t));
 void	intr_setup(u_int, ih_func_t *, void *, u_int);
-int	inthand_add(const char *, u_int, void (*)(void *), void *, int,
-	    void **);
+int	inthand_add(const char *, u_int, int (*)(void *), void (*)(void *), 
+	    void *, int, void **);
 int	inthand_remove(u_int, void *);
 void	intr_handle(u_int);
 

==== //depot/projects/soc2006/intr_filter/powerpc/include/openpicvar.h#2 (text+ko) ====

@@ -58,8 +58,8 @@
 struct resource	*openpic_allocate_intr(device_t, device_t, int *,
 			    u_long, u_int);
 int		openpic_setup_intr(device_t, device_t,
-			    struct resource *, int, driver_intr_t, void *,
-			    void **);
+			    struct resource *, int, driver_filter_t, 
+			    driver_intr_t, void *, void **);
 int		openpic_teardown_intr(device_t, device_t,
 			    struct resource *, void *);
 int		openpic_release_intr(device_t dev, device_t, int,

==== //depot/projects/soc2006/intr_filter/powerpc/powermac/hrowpic.c#2 (text+ko) ====

@@ -79,8 +79,8 @@
 static struct resource	*hrowpic_allocate_intr(device_t, device_t, int *,
                             u_long, u_int);
 static int		hrowpic_setup_intr(device_t, device_t,
-                            struct resource *, int, driver_intr_t, void *,
-                            void **);
+                            struct resource *, int, driver_filter_t, 
+                            driver_intr_t, void *, void **);
 static int		hrowpic_teardown_intr(device_t, device_t,
                             struct resource *, void *);
 static int		hrowpic_release_intr(device_t dev, device_t, int,
@@ -221,7 +221,8 @@
 
 static int
 hrowpic_setup_intr(device_t picdev, device_t child, struct resource *res,
-    int flags, driver_intr_t *intr, void *arg, void **cookiep)
+    int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, 
+    void **cookiep)
 {
 	struct  hrowpic_softc *sc;
 	u_long start;
@@ -240,8 +241,8 @@
 	if (error)
 		return (error);
 
-	error = inthand_add(device_get_nameunit(child), start, intr, arg,
-	    flags, cookiep);
+	error = inthand_add(device_get_nameunit(child), start, filter, intr, 
+	    arg, flags, cookiep);
 
 	if (!error) {
 		/*

==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/intr_machdep.c#4 (text+ko) ====

@@ -168,8 +168,8 @@
 }
 
 int
-inthand_add(const char *name, u_int irq, void (*handler)(void *), void *arg,
-    int flags, void **cookiep)
+inthand_add(const char *name, u_int irq, int (*filter)(void *), 
+    void (*handler)(void *), void *arg, int flags, void **cookiep)
 {
 	struct	ppc_intr_handler *ppc_ih;
 	struct	intr_event *event, *orphan;
@@ -202,7 +202,7 @@
 		}
 	}
 
-	error = intr_event_add_handler(event, name, handler, arg,
+	error = intr_event_add_handler(event, name, filter, handler, arg,
 	    intr_priority(flags), flags, cookiep);
 	if (error)
 		return (error);

==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/nexus.c#2 (text+ko) ====

@@ -112,7 +112,7 @@
 static int	nexus_read_ivar(device_t, device_t, int, uintptr_t *);
 static int	nexus_write_ivar(device_t, device_t, int, uintptr_t);
 static int	nexus_setup_intr(device_t, device_t, struct resource *, int,
-		    driver_intr_t *, void *, void **);
+		    driver_filter_t *, driver_intr_t *, void *, void **);
 static int	nexus_teardown_intr(device_t, device_t, struct resource *,
 		    void *);
 static struct	resource *nexus_alloc_resource(device_t, device_t, int, int *,
@@ -290,7 +290,7 @@
 
 static int
 nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
-    driver_intr_t *intr, void *arg, void **cookiep)
+    driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep)
 {
 	struct	nexus_softc *sc;
 
@@ -299,8 +299,8 @@
 	if (device_get_state(sc->sc_pic) != DS_ATTACHED)
 		panic("nexus_setup_intr: no pic attached\n");
 
-	return (PIC_SETUP_INTR(sc->sc_pic, child, res, flags, intr, arg,
-	    cookiep));
+	return (PIC_SETUP_INTR(sc->sc_pic, child, res, flags, filter, intr, 
+	    arg, cookiep));
 }
 
 static int

==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/openpic.c#2 (text+ko) ====

@@ -228,7 +228,8 @@
 
 int
 openpic_setup_intr(device_t dev, device_t child, struct resource *res,
-    int flags, driver_intr_t *intr, void *arg, void **cookiep)
+    int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, 
+    void **cookiep)
 {
 	struct	openpic_softc *sc;
 	u_long	start;
@@ -253,8 +254,8 @@
 	if (error)
 		return (error);
 
-	error = inthand_add(device_get_nameunit(child), start, intr, arg,
-	    flags, cookiep);
+	error = inthand_add(device_get_nameunit(child), start, filter, intr, 
+	    arg, flags, cookiep);
 
 	if (sc->sc_hwprobed)
 		openpic_enable_irq(sc, start, IST_LEVEL);

==== //depot/projects/soc2006/intr_filter/powerpc/powerpc/pic_if.m#2 (text+ko) ====

@@ -44,6 +44,7 @@
 	device_t	child;
 	struct		resource *res;
 	int		flags;
+	driver_filter_t	*filter;
 	driver_intr_t	*intr;
 	void		*arg;
 	void		**cookiep;


More information about the p4-projects mailing list