Date: Fri, 6 May 2011 13:48:54 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221526 - in head/sys: ia64/isa isa powerpc/mpc85xx sparc64/isa x86/isa Message-ID: <201105061348.p46DmsM7050613@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri May 6 13:48:53 2011 New Revision: 221526 URL: http://svn.freebsd.org/changeset/base/221526 Log: Retire isa_setup_intr() and isa_teardown_intr() and use the generic bus versions instead. They were never needed as bus_generic_intr() and bus_teardown_intr() had been changed to pass the original child device up in 42734, but the ISA bus was not converted to new-bus until 45720. Modified: head/sys/ia64/isa/isa.c head/sys/isa/isa_common.c head/sys/isa/isa_common.h head/sys/powerpc/mpc85xx/isa.c head/sys/sparc64/isa/isa.c head/sys/x86/isa/isa.c Modified: head/sys/ia64/isa/isa.c ============================================================================== --- head/sys/ia64/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/ia64/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -135,25 +135,3 @@ isa_release_resource(device_t bus, devic struct resource_list *rl = &idev->id_resources; return resource_list_release(rl, bus, child, type, rid, r); } - -/* - * We can't use the bus_generic_* versions of these methods because those - * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to - * deal). - */ -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t filter, void (*ihand)(void *), void *arg, - void **cookiep) -{ - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/isa/isa_common.c ============================================================================== --- head/sys/isa/isa_common.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/isa/isa_common.c Fri May 6 13:48:53 2011 (r221526) @@ -1071,8 +1071,8 @@ static device_method_t isa_methods[] = { DEVMETHOD(bus_write_ivar, isa_write_ivar), DEVMETHOD(bus_child_detached, isa_child_detached), DEVMETHOD(bus_driver_added, isa_driver_added), - DEVMETHOD(bus_setup_intr, isa_setup_intr), - DEVMETHOD(bus_teardown_intr, isa_teardown_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_resource_list,isa_get_resource_list), DEVMETHOD(bus_alloc_resource, isa_alloc_resource), Modified: head/sys/isa/isa_common.h ============================================================================== --- head/sys/isa/isa_common.h Fri May 6 13:24:10 2011 (r221525) +++ head/sys/isa/isa_common.h Fri May 6 13:48:53 2011 (r221526) @@ -73,11 +73,5 @@ extern struct resource *isa_alloc_resour extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -extern int isa_setup_intr(device_t bus, device_t child, struct resource *r, - int flags, driver_filter_t *filter, void (*ihand)(void *), void *arg, - void **cookiep); -extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie); - extern driver_t isa_driver; extern devclass_t isa_devclass; Modified: head/sys/powerpc/mpc85xx/isa.c ============================================================================== --- head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -82,20 +82,3 @@ isa_release_resource(device_t bus, devic return (resource_list_release(rl, bus, child, type, rid, r)); } - -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t filter, void (*ihand)(void *), void *arg, void **cookiep) -{ - - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/sparc64/isa/isa.c ============================================================================== --- head/sys/sparc64/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/sparc64/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -359,26 +359,3 @@ isa_release_resource(device_t bus, devic return (bus_generic_rl_release_resource(bus, child, type, rid, res)); } - -int -isa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, - driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) -{ - - /* - * Just pass through. This is going to be handled by either - * one of the parent PCI buses or the nexus device. - * The interrupt had been routed before it was added to the - * resource list of the child. - */ - return (bus_generic_setup_intr(dev, child, irq, flags, filter, intr, - arg, cookiep)); -} - -int -isa_teardown_intr(device_t dev, device_t child, struct resource *irq, - void *cookie) -{ - - return (bus_generic_teardown_intr(dev, child, irq, cookie)); -} Modified: head/sys/x86/isa/isa.c ============================================================================== --- head/sys/x86/isa/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/x86/isa/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -238,28 +238,6 @@ isa_release_resource(device_t bus, devic } /* - * We can't use the bus_generic_* versions of these methods because those - * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to - * deal). - */ -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t *filter, void (*ihand)(void *), void *arg, - void **cookiep) -{ - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} - -/* * On this platform, isa can also attach to the legacy bus. */ DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105061348.p46DmsM7050613>