CVS log for src/sys/sys/bus.h
Up to [FreeBSD] / src / sys / sys
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.102.2.3: download - view: text, markup, annotated - select for diffs
Sat Dec 31 15:31:34 2011 UTC (5 weeks, 5 days ago) by hselasky
Branches: RELENG_9
Diff to: previous 1.102.2.2: preferred, colored; branchpoint 1.102: preferred, colored; next MAIN 1.103: preferred, colored
Changes since revision 1.102.2.2: +1 -0 lines
SVN rev 229118 on 2011-12-31 15:31:34Z by hselasky MFC r227701, r227847 and r227849: Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Rename device_delete_all_children() into device_delete_children(). Identify a few other places where it makes sense to use device_delete_children().
Revision 1.78.2.9: download - view: text, markup, annotated - select for diffs
Fri Nov 25 17:08:39 2011 UTC (2 months, 2 weeks ago) by marius
Branches: RELENG_7
Diff to: previous 1.78.2.8: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.2.8: +2 -1 lines
SVN rev 227979 on 2011-11-25 17:08:39Z by marius MFC: r227829, r227844 - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END. Submitted by: jhb
Revision 1.85.2.11: download - view: text, markup, annotated - select for diffs
Fri Nov 25 17:08:33 2011 UTC (2 months, 2 weeks ago) by marius
Branches: RELENG_8
Diff to: previous 1.85.2.10: preferred, colored; branchpoint 1.85: preferred, colored; next MAIN 1.86: preferred, colored
Changes since revision 1.85.2.10: +2 -1 lines
SVN rev 227978 on 2011-11-25 17:08:33Z by marius MFC: r227829, r227844 - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END. Submitted by: jhb
Revision 1.102.2.1.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 25 17:07:27 2011 UTC (2 months, 2 weeks ago) by marius
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.102.2.1.2.1: preferred, colored; branchpoint 1.102.2.1: preferred, colored; next MAIN 1.102.2.2: preferred, colored
Changes since revision 1.102.2.1.2.1: +2 -1 lines
SVN rev 227977 on 2011-11-25 17:07:27Z by marius MFC: r227829, r227844 - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END. Submitted by: jhb Approved by: re (kib)
Revision 1.102.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 25 17:06:32 2011 UTC (2 months, 2 weeks ago) by marius
Branches: RELENG_9
Diff to: previous 1.102.2.1: preferred, colored; branchpoint 1.102: preferred, colored
Changes since revision 1.102.2.1: +2 -1 lines
SVN rev 227976 on 2011-11-25 17:06:32Z by marius MFC: r227829, r227844 - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END. Submitted by: jhb Approved by: re (kib)
Revision 1.105: download - view: text, markup, annotated - select for diffs
Tue Nov 22 21:56:55 2011 UTC (2 months, 2 weeks ago) by hselasky
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +1 -1 lines
SVN rev 227849 on 2011-11-22 21:56:55Z by hselasky Rename device_delete_all_children() into device_delete_children(). Suggested by: jhb @ and marius @ MFC after: 1 week
Revision 1.104: download - view: text, markup, annotated - select for diffs
Tue Nov 22 19:31:43 2011 UTC (2 months, 2 weeks ago) by marius
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +2 -1 lines
SVN rev 227829 on 2011-11-22 19:31:43Z by marius - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the example in driver.9 to use DEVMETHOD_END. Submitted by: jhb MFC after: 3 days
Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Nov 19 10:11:50 2011 UTC (2 months, 3 weeks ago) by hselasky
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +1 -0 lines
SVN rev 227701 on 2011-11-19 10:11:50Z by hselasky Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children(). MFC after: 1 week
Revision 1.102.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
Diff to: previous 1.102.2.1: preferred, colored
Changes since revision 1.102.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.102.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.85.2.10: download - view: text, markup, annotated - select for diffs
Fri Sep 16 18:26:40 2011 UTC (4 months, 3 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.85.2.9: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.9: +12 -2 lines
SVN rev 225625 on 2011-09-16 18:26:40Z by jhb MFC 225079: Add two new macros DRIVER_MODULE_ORDERED() and EARLY_DRIVER_MODULE_ORDERED() that allow a module to use an order other than the default of SI_ORDER_MIDDLE when registering a driver. This can be useful for drivers in a kld that contain multiple new-bus drivers as part of one logical device driver. A typical case would be to use SI_ORDER_LAST for the "main" driver to ensure that any other "helper" drivers are registered and available before the "main" driver attempts to attach.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Mon Aug 22 18:36:58 2011 UTC (5 months, 2 weeks ago) by jhb
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +12 -2 lines
SVN rev 225079 on 2011-08-22 18:36:58Z by jhb Add two new macros DRIVER_MODULE_ORDERED() and EARLY_DRIVER_MODULE_ORDERED() that allow a module to use an order other than the default of SI_ORDER_MIDDLE when registering a driver. This can be useful for drivers in a kld that contain multiple new-bus drivers as part of one logical device driver. A typical case would be to use SI_ORDER_LAST for the "main" driver to ensure that any other "helper" drivers are registered and available before the "main" driver attempts to attach. Tested by: kib, Jason Harmening jason harmening / gmail Approved by: re (kib) MFC after: 1 week
Revision 1.101: download - view: text, markup, annotated - select for diffs
Fri Jul 15 21:08:58 2011 UTC (6 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +1 -0 lines
SVN rev 224069 on 2011-07-15 21:08:58Z by jhb Respect the BIOS/firmware's notion of acceptable address ranges for PCI resource allocation on x86 platforms: - Add a new helper API that Host-PCI bridge drivers can use to restrict resource allocation requests to a set of address ranges for different resource types. - For the ACPI Host-PCI bridge driver, use Producer address range resources in _CRS to enumerate valid address ranges for a given Host-PCI bridge. This can be disabled by including "hostres" in the debug.acpi.disabled tunable. - For the MPTable Host-PCI bridge driver, use entries in the extended MPTable to determine the valid address ranges for a given Host-PCI bridge. This required adding code to parse extended table entries. Similar to the new PCI-PCI bridge driver, these changes are only enabled if the NEW_PCIB kernel option is enabled (which is enabled by default on amd64 and i386). Approved by: re (kib)
Revision 1.85.2.9: download - view: text, markup, annotated - select for diffs
Fri Jun 24 16:06:50 2011 UTC (7 months, 2 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.85.2.8: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.8: +5 -0 lines
SVN rev 223507 on 2011-06-24 16:06:50Z by jhb MFC 221231,221450,222600: Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a wrapper around rman_adjust_resource(). Include a generic implementation, bus_generic_adjust_resource() which passes the request up to the parent bus. There is currently no default implementation. A bus_adjust_resource() wrapper is provided for use in drivers.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Apr 29 21:36:45 2011 UTC (9 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +5 -0 lines
SVN rev 221231 on 2011-04-29 21:36:45Z by jhb Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a wrapper around rman_adjust_resource(). Include a generic implementation, bus_generic_adjust_resource() which passes the request up to the parent bus. There is currently no default implementation. A bus_adjust_resource() wrapper is provided for use in drivers.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Mon Mar 21 09:40:01 2011 UTC (10 months, 3 weeks ago) by jeff
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +3 -0 lines
SVN rev 219819 on 2011-03-21 09:40:01Z by jeff - Merge changes to the base system to support OFED. These include a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND, and other miscellaneous small features.
Revision 1.78.2.8: download - view: text, markup, annotated - select for diffs
Tue Feb 8 22:14:19 2011 UTC (12 months ago) by marius
Branches: RELENG_7
Diff to: previous 1.78.2.7: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.7: +5 -1 lines
SVN rev 218460 on 2011-02-08 22:14:19Z by marius MFC: r216961 Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for and switch sparc64 to use the first one for bus error filter handlers of bridge drivers instead of (ab)using INTR_FAST for that so we eventually can get rid of the latter. Reviewed by: jhb
Revision 1.85.2.8: download - view: text, markup, annotated - select for diffs
Tue Feb 8 22:08:00 2011 UTC (12 months ago) by marius
Branches: RELENG_8
Diff to: previous 1.85.2.7: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.7: +5 -1 lines
SVN rev 218458 on 2011-02-08 22:08:00Z by marius MFC: r216961 Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for and switch sparc64 to use the first one for bus error filter handlers of bridge drivers instead of (ab)using INTR_FAST for that so we eventually can get rid of the latter. Reviewed by: jhb
Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Jan 6 21:14:34 2011 UTC (13 months ago) by jhb
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +0 -1 lines
SVN rev 217074 on 2011-01-06 21:14:34Z by jhb Retire the INTR_FAST flag as it was obsoleted by the introduction of the filter argument to bus_setup_intr().
Revision 1.97: download - view: text, markup, annotated - select for diffs
Tue Jan 4 16:11:32 2011 UTC (13 months ago) by marius
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +5 -1 lines
SVN rev 216961 on 2011-01-04 16:11:32Z by marius Reserve INTR_MD[1-4] similarly to what BUS_DMA_BUS[1-4] are intended for and switch sparc64 to use the first one for bus error filter handlers of bridge drivers instead of (ab)using INTR_FAST for that so we eventually can get rid of the latter. Reviewed by: jhb MFC after: 1 month
Revision 1.78.2.7.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.78.2.7: preferred, colored; next MAIN 1.78.2.8: preferred, colored
Changes since revision 1.78.2.7: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.85.2.7.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.85.2.7: preferred, colored; next MAIN 1.85.2.8: preferred, colored
Changes since revision 1.85.2.7: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.78.2.7: download - view: text, markup, annotated - select for diffs
Fri Nov 19 17:24:03 2010 UTC (14 months, 3 weeks ago) by marius
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.78.2.6: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.6: +5 -1 lines
SVN rev 215537 on 2010-11-19 17:24:03Z by marius MFC: r176965 Any driver that relies on its parent to set the devclass has no way to know if has siblings that need an actual probe. Introduce a specail return value called BUS_PROBE_NOOWILDCARD. If the driver returns this, the probe is only successful for devices that have had a specific devclass set for them. Reviewed by: current@, jhb@, grehan@
Revision 1.96: download - view: text, markup, annotated - select for diffs
Wed Nov 17 22:28:04 2010 UTC (14 months, 3 weeks ago) by jhb
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +1 -0 lines
SVN rev 215443 on 2010-11-17 22:28:04Z by jhb Add a resource_list_reserved() method that returns true if a resource list entry contains a reserved resource.
Revision 1.78.2.6: download - view: text, markup, annotated - select for diffs
Mon Sep 20 11:09:31 2010 UTC (16 months, 2 weeks ago) by avg
Branches: RELENG_7
Diff to: previous 1.78.2.5: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.5: +1 -1 lines
SVN rev 212893 on 2010-09-20 11:09:31Z by avg MFC r212413: bus_add_child: change type of order parameter to u_int
Revision 1.85.2.7: download - view: text, markup, annotated - select for diffs
Mon Sep 20 07:31:08 2010 UTC (16 months, 2 weeks ago) by avg
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.85.2.6: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.6: +1 -1 lines
SVN rev 212892 on 2010-09-20 07:31:08Z by avg MFC r212413: bus_add_child: change type of order parameter to u_int
Revision 1.78.2.5: download - view: text, markup, annotated - select for diffs
Mon Sep 20 05:58:55 2010 UTC (16 months, 3 weeks ago) by avg
Branches: RELENG_7
Diff to: previous 1.78.2.4: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.4: +1 -1 lines
SVN rev 212890 on 2010-09-20 05:58:55Z by avg MFC r212213: struct device: widen type of flags and order fields to u_int
Revision 1.85.2.6: download - view: text, markup, annotated - select for diffs
Mon Sep 20 05:56:09 2010 UTC (16 months, 3 weeks ago) by avg
Branches: RELENG_8
Diff to: previous 1.85.2.5: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.5: +1 -1 lines
SVN rev 212889 on 2010-09-20 05:56:09Z by avg MFC r212213: struct device: widen type of flags and order fields to u_int
Revision 1.95: download - view: text, markup, annotated - select for diffs
Fri Sep 10 11:19:03 2010 UTC (17 months ago) by avg
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +1 -1 lines
SVN rev 212413 on 2010-09-10 11:19:03Z by avg bus_add_child: change type of order parameter to u_int This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds. Followup to: r212213 MFC after: 10 days
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Sep 4 17:28:29 2010 UTC (17 months ago) by avg
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +1 -1 lines
SVN rev 212213 on 2010-09-04 17:28:29Z by avg struct device: widen type of flags and order fields to u_int Also change int -> u_int for order parameter in device_add_child_ordered. There should not be any ABI change as struct device is private to subr_bus.c and the API change should be compatible. To do: change int -> u_int for order parameter of bus_add_child method and its implementations. The change should also be API compatible, but is a bit more churn. Suggested by: imp, jhb MFC after: 1 week
Revision 1.85.2.5: download - view: text, markup, annotated - select for diffs
Sat Jul 3 17:57:59 2010 UTC (19 months, 1 week ago) by kib
Branches: RELENG_8
Diff to: previous 1.85.2.4: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.4: +3 -0 lines
SVN rev 209666 on 2010-07-03 17:57:59Z by kib MFC r209104: Add modifications of devctl_notify(9) functions that take flags. Use flags to specify M_WAITOK/M_NOWAIT. M_WAITOK allows devctl to sleep for the memory allocation.
Revision 1.85.2.4.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.85.2.4: preferred, colored; next MAIN 1.85.2.5: preferred, colored
Changes since revision 1.85.2.4: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Jun 12 13:20:38 2010 UTC (19 months, 4 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -0 lines
SVN rev 209104 on 2010-06-12 13:20:38Z by kib Add modifications of devctl_notify(9) functions that take flags. Use flags to specify M_WAITOK/M_NOWAIT. M_WAITOK allows devctl to sleep for the memory allocation. As Warner noted, allowing the functions to sleep might cause reordering of the queued notifications. Reviewed by: imp, jh MFC after: 3 weeks
Revision 1.78.2.4.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.78.2.4: preferred, colored; next MAIN 1.78.2.5: preferred, colored
Changes since revision 1.78.2.4: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.78.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 21 17:55:47 2010 UTC (2 years ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.78.2.3: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.3: +5 -0 lines
SVN rev 202763 on 2010-01-21 17:55:47Z by jhb MFC 198134,198149,198170,198171,198391,200948: Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64, i386, and sparc64 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler().
Revision 1.85.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 21 17:54:29 2010 UTC (2 years ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.85.2.3: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.3: +5 -0 lines
SVN rev 202762 on 2010-01-21 17:54:29Z by jhb MFC 198134,198149,198170,198171,198391,200948: Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64, i386, and sparc64 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler().
Revision 1.92: download - view: text, markup, annotated - select for diffs
Wed Dec 9 21:52:53 2009 UTC (2 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +15 -0 lines
SVN rev 200315 on 2009-12-09 21:52:53Z by jhb For some buses, devices may have active resources assigned even though they are not allocated by the device driver. These resources should still appear allocated from the system's perspective so that their assigned ranges are not reused by other resource requests. The PCI bus driver has used a hack to effect this for a while now where it uses rman_set_device() to assign devices to the PCI bus when they are first encountered and later assigns them to the actual device when a driver allocates a BAR. A few downsides of this approach is that it results in somewhat confusing devinfo -r output as well as not being very easily portable to other bus drivers. This commit adds generic support for "reserved" resources to the resource list API used by many bus drivers to manage the resources of child devices. A resource may be reserved via resource_list_reserve(). This will allocate the resource from the bus' parent without activating it. resource_list_alloc() recognizes an attempt to allocate a reserved resource. When this happens it activates the resource (if requested) and then returns the reserved resource. Similarly, when a reserved resource is released via resource_list_release(), it is deactivated (if it is active) and the resource is then marked reserved again, but is left allocated from the bus' parent. To completely remove a reserved resource, a bus driver may use resource_list_unreserve(). A bus driver may use resource_list_busy() to determine if a reserved resource is allocated by a child device or if it can be unreserved. The PCI bus driver has been changed to use this framework instead of abusing rman_set_device() to keep track of reserved vs allocated resources. Submitted by: imp (an older version many moons ago) MFC after: 1 month
Revision 1.78.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 6 20:23:42 2009 UTC (2 years, 3 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.78.2.2: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.2: +2 -1 lines
SVN rev 199001 on 2009-11-06 20:23:42Z by jhb MFC 198367: Set the devclass_t pointer specified in the DRIVER_MODULE() macro sooner so it is always valid when a driver's identify routine is called.
Revision 1.85.2.3.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.85.2.3: preferred, colored; next MAIN 1.85.2.4: preferred, colored
Changes since revision 1.85.2.3: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.91: download - view: text, markup, annotated - select for diffs
Thu Oct 15 14:55:11 2009 UTC (2 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +4 -2 lines
SVN rev 198135 on 2009-10-15 14:55:11Z by jhb Style fixes to the function prototypes for bus_alloc_resources() and bus_release_resources().
Revision 1.90: download - view: text, markup, annotated - select for diffs
Thu Oct 15 14:54:35 2009 UTC (2 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +5 -0 lines
SVN rev 198134 on 2009-10-15 14:54:35Z by jhb Add a facility for associating optional descriptions with active interrupt handlers. This is primarily intended as a way to allow devices that use multiple interrupts (e.g. MSI) to meaningfully distinguish the various interrupt handlers. - Add a new BUS_DESCRIBE_INTR() method to the bus interface to associate a description with an active interrupt handler setup by BUS_SETUP_INTR. It has a default method (bus_generic_describe_intr()) which simply passes the request up to the parent device. - Add a bus_describe_intr() wrapper around BUS_DESCRIBE_INTR() that supports printf(9) style formatting using var args. - Reserve MAXCOMLEN bytes in the intr_handler structure to hold the name of an interrupt handler and copy the name passed to intr_event_add_handler() into that buffer instead of just saving the pointer to the name. - Add a new intr_event_describe_handler() which appends a description string to an interrupt handler's name. - Implement support for interrupt descriptions on amd64 and i386 by having the nexus(4) driver supply a custom bus_describe_intr method that invokes a new intr_describe() MD routine which in turn looks up the associated interrupt event and invokes intr_event_describe_handler(). Requested by: many Reviewed by: scottl MFC after: 2 weeks
Revision 1.85.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 15 19:24:18 2009 UTC (2 years, 4 months ago) by attilio
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.85.2.2: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.2: +4 -4 lines
SVN rev 197228 on 2009-09-15 19:24:18Z by attilio MFC r197224: Use explicit int values for the device states in order to allow, if necessary, in the future, adds of new states without breaking ABI between revisions. Please note that this is a special condition as we want this fix in before RC1 as we assume it is critical and so it has been handled as an instant-merge. Approved by: re (kib)
Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue Sep 15 16:59:52 2009 UTC (2 years, 4 months ago) by attilio
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +4 -4 lines
SVN rev 197224 on 2009-09-15 16:59:52Z by attilio Use explicit int values for the device states in order to allow, if necessary, in the future, adds of new states without breaking ABI between revisions. Proposed by: kib Approved by: imp
Revision 1.88: download - view: text, markup, annotated - select for diffs
Sun Sep 13 15:08:19 2009 UTC (2 years, 4 months ago) by attilio
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +1 -4 lines
SVN rev 197165 on 2009-09-13 15:08:19Z by attilio Revert r196779 in order to implement a different scheme for newbus locking methodology. Requested by: imp
Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Sep 3 13:40:41 2009 UTC (2 years, 5 months ago) by attilio
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +4 -1 lines
SVN rev 196779 on 2009-09-03 13:40:41Z by attilio Add intermediate states for attaching and detaching that will be reused by the enhached newbus locking once it is checked in. This change can be easilly MFCed to STABLE_8 at the appropriate moment. Reviewed by: jhb, scottl Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Revision 1.85.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 20 20:23:28 2009 UTC (2 years, 5 months ago) by jhb
Branches: RELENG_8
Diff to: previous 1.85.2.1: preferred, colored; branchpoint 1.85: preferred, colored
Changes since revision 1.85.2.1: +0 -8 lines
SVN rev 196405 on 2009-08-20 20:23:28Z by jhb MFC 196403: Temporarily revert the new-bus locking for 8.0 release. Approved by: re (kib)
Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Aug 20 19:17:53 2009 UTC (2 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +0 -8 lines
SVN rev 196403 on 2009-08-20 19:17:53Z by jhb Temporarily revert the new-bus locking for 8.0 release. It will be reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
Revision 1.85.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Aug 2 14:28:40 2009 UTC (2 years, 6 months ago) by attilio
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +8 -0 lines
SVN rev 196037 on 2009-08-02 14:28:40Z by attilio
Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.
For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.
Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl
No answer by: ariff, thompsa, yongari
Tested by: pho,
G. Trematerra <giovanni dot trematerra at gmail dot com>,
Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by: Yahoo! Incorporated
Approved by: re (ksmith)
Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Jun 9 23:24:04 2009 UTC (2 years, 8 months ago) by imp
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +0 -4 lines
SVN rev 193871 on 2009-06-09 23:24:04Z by imp
As discussed on arch@, restire
devclass_{add,delete,find,quiesce}_driver. They aren't needed or used
and complicate locking newbus.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Jun 9 14:26:23 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +33 -3 lines
SVN rev 193833 on 2009-06-09 14:26:23Z by jhb Add support for multiple passes of the device tree during the boot-time probe. The current device order is unchanged. This commit just adds the infrastructure and ABI changes so that it is easier to merge later changes into 8.x. - Driver attachments now have an associated pass level. Attachments are not allowed to probe or attach to drivers until the system-wide pass level is >= the attachment's pass level. By default driver attachments use the "last" pass level (BUS_PASS_DEFAULT). Driver's that wish to probe during an earlier pass use EARLY_DRIVER_MODULE() instead of DRIVER_MODULE() which accepts the pass level as an additional parameter. - A new method BUS_NEW_PASS has been added to the bus interface. This method is invoked when the system-wide pass level is changed to kick off a rescan of the device tree so that drivers that have just been made "eligible" can probe and attach. - The bus_generic_new_pass() function provides a default implementation of BUS_NEW_PASS(). It first allows drivers that were just made eligible for this pass to identify new child devices. Then it propogates the rescan to child devices that already have an attached driver by invoking their BUS_NEW_PASS() method. It also reprobes devices without a driver. - BUS_PROBE_NOMATCH() is only invoked for devices that do not have an attached driver after being scanned during the final pass. - The bus_set_pass() function is used during boot to raise the pass level. Currently it is only called once during root_bus_configure() to raise the pass level to BUS_PASS_DEFAULT. This has the effect of probing all devices in a single pass identical to previous behavior. Reviewed by: imp Approved by: re (kib)
Revision 1.78.2.2.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.78.2.2: preferred, colored; next MAIN 1.78.2.3: preferred, colored
Changes since revision 1.78.2.2: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.78.2.2.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.78.2.2: preferred, colored; next MAIN 1.78.2.3: preferred, colored
Changes since revision 1.78.2.2: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.70.2.5.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.70.2.5: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.2.5: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.78.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 28 23:54:51 2008 UTC (3 years, 7 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_2_BP, RELENG_7_1_BP
Branch point for: RELENG_7_2, RELENG_7_1
Diff to: previous 1.78.2.1: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.1: +3 -0 lines
SVN rev 180083 on 2008-06-28 23:54:51Z by jhb MFC: Add a BUS_BIND_INTR() method to the bus interface to bind an IRQ resource to a CPU. A bus_bind_intr(9) wrapper routine similar to bus_setup/teardown_intr() is added for device drivers to use. Currently it is supported on amd64, i386, and sparc64 via nexus(4) methods that simply call the intr_bind() routine.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Fri Jun 20 16:58:15 2008 UTC (3 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +1 -0 lines
SVN rev 179893 on 2008-06-20 16:58:15Z by imp Split out the probing magic of device_probe_and_attach into device_probe() so that it can be used by busses that may wish to do additional processing between probe and attach. Reviewed by: dfr@
Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Mar 20 21:24:32 2008 UTC (3 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +3 -0 lines
Implement a BUS_BIND_INTR() method in the bus interface to bind an IRQ resource to a CPU. The default method is to pass the request up to the parent similar to BUS_CONFIG_INTR() so that all busses don't have to explicitly implement bus_bind_intr. A bus_bind_intr(9) wrapper routine similar to bus_setup/teardown_intr() is added for device drivers to use. Unbinding an interrupt is done by binding it to NOCPU. The IRQ resource must be allocated, but it can happen in any order with respect to bus_setup_intr(). Currently it is only supported on amd64 and i386 via nexus(4) methods that simply call the intr_bind() routine. Tested by: gallatin
Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Mar 9 05:10:22 2008 UTC (3 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +5 -1 lines
Any driver that relies on its parent to set the devclass has no way to know if has siblings that need an actual probe. Introduce a specail return value called BUS_PROBE_NOOWILDCARD. If the driver returns this, the probe is only successful for devices that have had a specific devclass set for them. Reviewed by: current@, jhb@, grehan@
Revision 1.78.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 6 03:35:40 2008 UTC (4 years ago) by iwasaki
Branches: RELENG_7_0
CVS tags: RELENG_7_0_0_RELEASE
Diff to: previous 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78: +1 -0 lines
MFC revision: subr_bus.c:1.204, bus.h:1.79, acpi.c:1.244 o Add devctl_process_running() so that power management system driver can check whether devd(8) is running. o Enter the sleep state immediately without waiting for timeout if devd(8) is not running such as the system in single user mode. Approved by: re (kensmith)
Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 6 01:34:18 2008 UTC (4 years ago) by iwasaki
Branches: RELENG_7
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -0 lines
MFC revision: subr_bus.c:1.204, bus.h:1.79 Add devctl_process_running() so that power management system driver can check whether devd(8) is running. Approved by: re (kensmith)
Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Jan 27 16:06:37 2008 UTC (4 years ago) by iwasaki
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -0 lines
Add devctl_process_running() so that power management system driver can check whether devd(8) is running. MFC after: 1 week
Revision 1.70.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 5 11:49:44 2007 UTC (4 years, 3 months ago) by phk
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Branch point for: RELENG_6_4
Diff to: previous 1.70.2.4: preferred, colored; branchpoint 1.70: preferred, colored; next MAIN 1.71: preferred, colored
Changes since revision 1.70.2.4: +11 -0 lines
MFC: bus_alloc_resources() convenience API
Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Feb 23 12:19:07 2007 UTC (4 years, 11 months ago) by piso
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP
Branch point for: RELENG_7_0, RELENG_7
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +40 -3 lines
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
Revision 1.70.2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 15 21:33:23 2006 UTC (5 years, 1 month ago) by imp
Branches: RELENG_6
Diff to: previous 1.70.2.3: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.3: +8 -0 lines
Directly commit a compatibility shim for -current. bus_get_dma_tag(dev) in stable is spelled NULL presently. Until such time as we MFC this functionailty (which may be never), provide this alternate spelling to aide in back-porting -current drivers. When the functionality is merged, this can be retired.
Revision 1.70.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 22 18:49:14 2006 UTC (5 years, 4 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.70.2.2: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.2: +3 -0 lines
MFC: Add bus_generic_add_child(). Approved by: re (mux)
Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon Sep 11 19:42:27 2006 UTC (5 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -0 lines
Add prototype for bus_generic_add_child() missed in previous commit.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Sep 3 00:27:42 2006 UTC (5 years, 5 months ago) by jmg
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +5 -0 lines
add a newbus method for obtaining the bus's bus_dma_tag_t... This is required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op... Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection... Reviewed by: scottl (earlier version)
Revision 1.70.2.2: download - view: text, markup, annotated - select for diffs
Wed Jul 12 22:57:57 2006 UTC (5 years, 7 months ago) by imp
Branches: RELENG_6
Diff to: previous 1.70.2.1: preferred, colored; branchpoint 1.70: preferred, colored
Changes since revision 1.70.2.1: +1 -0 lines
MFC: subr_bus.c 1.194, bus_if.m 1.30, bus.h 1.75: Create bus_enumerate_hinted_children. This routine will allow drivers to use the hinted child system. Bus drivers that use this need to implmenet the bus_hinted_child method, where they actually add the child to their bus, as they see fit. The bus is repsonsible for getting the attribtues for the child, adding it in the right order, etc. ISA hinting will be updated to use this method.
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Jul 8 17:06:15 2006 UTC (5 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +1 -0 lines
Create bus_enumerate_hinted_children. This routine will allow drivers to use the hinted child system. Bus drivers that use this need to implmenet the bus_hinted_child method, where they actually add the child to their bus, as they see fit. The bus is repsonsible for getting the attribtues for the child, adding it in the right order, etc. ISA hinting will be updated to use this method. MFC After: 3 days
Revision 1.70.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 7 23:30:14 2006 UTC (5 years, 7 months ago) by imp
Branches: RELENG_6
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +135 -0 lines
MFC: phk's bus_{read,write}_* macros. These are slightly different than
-current because rman is opaque in RELENG_6, but are 100% API compatible.
If they prove to be too slow, we may be able to make rman non-opaque to
mitigate it. This should help porting drivers from -current into
-stable.
Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Apr 20 01:44:16 2006 UTC (5 years, 9 months ago) by jmg
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +1 -1 lines
const'ify resource_spec to note that we won't be changing anything while releasing resources... also, NULL out the resources as we free them...
Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Sep 24 20:11:06 2005 UTC (6 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +135 -0 lines
Add convenience macros for bus_space usage that doesn't require specification of bus tag+handle. Instead of bus_space_write_1(sc->tag, sc->handle, ...) this macros offer bus_write_1(sc->resource, ...) The name+argument transformation is constant and the the macros are generated (by hand) by the script in tools/bus_macro.sh.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Sep 24 19:31:10 2005 UTC (6 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +10 -5 lines
Add two convenience functions for device drivers: bus_alloc_resources() and bus_free_resources(). These functions take a list of resources and handle them all in one go. A flag makes it possible to mark a resource as optional. A typical device driver can save 10-30 lines of code by using these. Usage examples will follow RSN. MFC: A good idea, eventually.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sun Sep 18 01:32:09 2005 UTC (6 years, 4 months ago) by imp
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -0 lines
MFp4: Expose device_probe_child()
Revision 1.30.2.6: download - view: text, markup, annotated - select for diffs
Thu Apr 28 00:14:09 2005 UTC (6 years, 9 months ago) by julian
Branches: RELENG_4
Diff to: previous 1.30.2.5: preferred, colored; branchpoint 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30.2.5: +1 -0 lines
MFC a helper routine that will be used in a USB MFC.
Revision 1.62.2.3: download - view: text, markup, annotated - select for diffs
Thu Apr 14 18:11:13 2005 UTC (6 years, 9 months ago) by njl
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.62.2.2: preferred, colored; branchpoint 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62.2.2: +1 -0 lines
MFC: prototype for devclass_get_drivers() Pointy hat: njl
Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Apr 12 15:20:36 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +1 -0 lines
resource_list_purge: release the resources in this list, and purge the elements of this list (eg, reset it). Man page to follow
Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Apr 12 04:22:17 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +2 -1 lines
Return the resource created/found in resource_list_add to avoid an extra resouce_list_find in some places. Suggested by: sam Found by: Coventry Analysis tool.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Mon Apr 4 15:26:50 2005 UTC (6 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +1 -0 lines
Add devclass_get_drivers(9) which provides an array of pointers to driver instances in a given devclass. This is useful for systems that want to call code in driver static methods, similar to device_identify(). Reviewed by: dfr MFC after: 2 weeks
Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Mar 18 05:19:50 2005 UTC (6 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -2 lines
Use STAILQ in preference to SLIST for the resources. Insert new resources last in the list rather than first. This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
Revision 1.62.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 1 07:18:17 2005 UTC (6 years, 11 months ago) by imp
Branches: RELENG_5
CVS tags: RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.62.2.1: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.2.1: +27 -0 lines
MFC: Merge probe values from current
Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu Feb 24 19:22:54 2005 UTC (6 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +27 -0 lines
Introduce defines for different levels of match in the bus probe routine to try to standardize values a bit. Discussed on: arch@ MFC After: 3 days
Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Jan 19 06:52:19 2005 UTC (7 years ago) by imp
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -0 lines
Introduce bus_free_resource. It is a convenience function which wraps bus_release_resource by grabbing the rid from the resource.
Revision 1.62.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 15 03:52:23 2005 UTC (7 years ago) by njl
Branches: RELENG_5
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -0 lines
MFC: Add devclass_get_count(9)
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Dec 31 20:47:51 2004 UTC (7 years, 1 month ago) by imp
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +2 -0 lines
Implement device_quiesce. This method means 'you are about to be unloaded, cleanup, or return ebusy of that's inconvenient.' The default module hanlder for newbus will now call this when we get a MOD_QUIESCE event, but in the future may call this at other times. This shouldn't change any actual behavior until drivers start to use it.
Revision 1.63: download - view: text, markup, annotated - select for diffs
Wed Dec 8 02:39:56 2004 UTC (7 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +1 -0 lines
Add the devclass_get_count(9) function and man page. It gets a count of the number of devices in a devclass and is a subset of devclass_get_devices(9). Reviewed by: imp, dfr
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Jul 18 16:30:31 2004 UTC (7 years, 6 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +82 -76 lines
Add doxygen doc comments for most of newbus and the BUS interface.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Fri Jun 4 10:23:00 2004 UTC (7 years, 8 months ago) by des
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -0 lines
Add a devclass level to the dev sysctl tree, in order to support per- class variables in addition to per-device variables. In plain English, this means that dev.foo0.bar is now called dev.foo.0.bar, and it is possible to to have dev.foo.bar as well.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Jun 4 10:11:06 2004 UTC (7 years, 8 months ago) by des
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +7 -7 lines
Whitespace cleanup.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Tue May 25 12:06:25 2004 UTC (7 years, 8 months ago) by des
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -0 lines
As previously threatened, give each device its own sysctl context and subtree (under the new dev top-level node). This should greatly simplify drivers which need per-device sysctl variables (such as ndis).
Revision 1.30.2.5: download - view: text, markup, annotated - select for diffs
Wed Mar 17 17:54:25 2004 UTC (7 years, 10 months ago) by njl
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.30.2.4: preferred, colored; branchpoint 1.30: preferred, colored
Changes since revision 1.30.2.4: +6 -0 lines
MFC: bus_alloc_resource_any(9) for compatibility with 5.x. No driver conversions will be done in 4.x.
Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Mar 17 17:40:34 2004 UTC (7 years, 10 months ago) by njl
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +6 -0 lines
Add bus_alloc_resource_any(9), which does bus_alloc_resource() with the appropriate default values. Document it in the manpage. Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Abstains: bde
Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Oct 24 22:41:54 2003 UTC (8 years, 3 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +9 -0 lines
Convenience functions to generate notifications from the kernel. The ACPI code will start using these shortly. Reviewed by: njl
Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu Oct 16 09:16:28 2003 UTC (8 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +13 -32 lines
* Add multiple inheritance to kobj. Each class can have zero or more base classes and if a method is not found in a given class, its base classes are searched (in the order they were declared). This search is recursive, i.e. a method may be define in a base class of a base class. * Change the kobj method lookup algorithm to one which is SMP-safe. This relies only on the constraint that an observer of a sequence of writes of pointer-sized values will see exactly one of those values, not a mixture of two or more values. This assumption holds for all processors which FreeBSD supports. * Add locking to kobj class initialisation. * Add a simpler form of 'inheritance' for devclasses. Each devclass can have a parent devclass. Searches for drivers continue up the chain of devclasses until either a matching driver is found or a devclass is reached which has no parent. This can allow, for instance, pci drivers to match cardbus devices (assuming that cardbus declares pci as its parent devclass). * Increment __FreeBSD_version. This preserves the driver API entirely except for one minor feature used by the ISA compatibility shims. A workaround for ISA compatibility will be committed separately. The kobj and newbus ABI has changed - all modules must be recompiled.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed Sep 10 21:37:10 2003 UTC (8 years, 5 months ago) by marcel
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +14 -0 lines
Introduce BUS_CONFIG_INTR(). The method allows devices to tell parents about interrupt trigger mode and interrupt polarity. This allows ACPI for example to pass interrupt resource information up the hierarchy. The default implementation of the method therefore is to pass the request to the parent. Reviewed by: jhb, njl
Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed Jul 2 16:01:38 2003 UTC (8 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +1 -0 lines
Add a resource_disabled() helper function that returns true (non-zero) if a specified resource has been disabled via a non-zero 'disabled' hint and false otherwise.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Apr 21 18:19:08 2003 UTC (8 years, 9 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +1 -0 lines
Create a new function, device_is_attached(), that is like device_is_alive() that tells us if the device has successfully attached. device_is_alive just tells us that the device has successfully probed.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Feb 17 19:01:33 2003 UTC (8 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
Bump pnpinfo and location size to 128 bytes. Since these are computed on the fly and read into userland one at a time, this costs very little total memory. The pnpinfo sizes of pccard is more than 64 bytes due to the length of the strings that man cards have in their CIS.
Revision 1.30.2.4: download - view: text, markup, annotated - select for diffs
Thu Oct 10 15:13:33 2002 UTC (9 years, 4 months ago) by jhb
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8
Diff to: previous 1.30.2.3: preferred, colored; branchpoint 1.30: preferred, colored
Changes since revision 1.30.2.3: +10 -1 lines
MFC: Add resource_list_print_type(). Sponsored by: The Weather Channel
Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Oct 7 07:08:00 2002 UTC (9 years, 4 months ago) by imp
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -1 lines
Add wrappers around the newly created bus_child_pnpinfo_str and bus_child_location_str.
Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Sep 14 19:15:11 2002 UTC (9 years, 4 months ago) by imp
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +18 -10 lines
Add additional information returned to userland by the device querying functions. We add pnpinfo, locationinfo, devflags (the newbus flags on the device), flags (the flags that device_get_flags returns) and state to the list of things we return. pnpinfo and locationinfo are place holders at the moment that will be filled in by the device's parent (optionally). Userland programs will likely use this information from time to time and take appropriate actions. Improvements to devinfo to follow.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Sep 12 21:07:06 2002 UTC (9 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -0 lines
Add a blank line to make this more consistent with the rest of the file.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Jul 21 03:28:43 2002 UTC (9 years, 6 months ago) by imp
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -0 lines
Add bus_child_present and the child_present method to bus_if.m
Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Mar 29 06:42:51 2002 UTC (9 years, 10 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -0 lines
Add resource_list_add_next() which returns the RID for the resource added.
Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Dec 21 21:45:07 2001 UTC (10 years, 1 month ago) by tmm
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +28 -0 lines
Add a generic __BUS_ACCESSOR macro to construct ivar accessor functions, and a generic resource_list_print_type() function to print all resouces of a certain type in a resource list. Use ulmin()/ulmax() instead of min()/max() in two places to handle u_longs correctly.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Nov 1 05:08:17 2001 UTC (10 years, 3 months ago) by ache
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -1 lines
Add devclass_find_free_unit() prototype
Revision 1.30.2.3: download - view: text, markup, annotated - select for diffs
Sat Jun 16 23:05:02 2001 UTC (10 years, 7 months ago) by peter
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.30.2.2: preferred, colored; branchpoint 1.30: preferred, colored
Changes since revision 1.30.2.2: +2 -1 lines
Not a MFC, but for source compatability with -current (sound drivers). Add #define INTR_TYPE_AV INTR_TYPE_TTY.
Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Jun 16 22:42:19 2001 UTC (10 years, 7 months ago) by peter
Branches: MAIN
CVS tags: KSE_PRE_MILESTONE_2, KSE_MILESTONE_2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -1 lines
Add INTR_TYPE_AV so that we can get to the PI_AV priority in the ithread handlers. This is beneficial since it means that pcm's MPSAFE handler can get run before things that will block on Giant in the shared irq case.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Jun 12 09:40:04 2001 UTC (10 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +6 -8 lines
Hints overhaul: - Replace some very poorly thought out API hacks that should have been fixed a long while ago. - Provide some much more flexible search functions (resource_find_*()) - Use strings for storage instead of an outgrowth of the rather inconvenient temporary ioconf table from config(). We already had a fallback to using strings before malloc/vm was running anyway.
Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Apr 19 23:15:06 2001 UTC (10 years, 9 months ago) by obrien
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +40 -41 lines
style(9) edit. Prompted by email from: dfr
Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Feb 9 17:35:22 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -5 lines
Axe INTR_HEAVY, INTR_LIGHT, and INTR_THREADED. Add in a INTR_TYPE_CLK priorirty for clock interrupt handlers and an INTR_ENTROPY flag to mark interrupt sources that are good sources of entropy.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Nov 28 06:49:15 2000 UTC (11 years, 2 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +17 -11 lines
Alter the return value and arguments of the GET_RESOURCE_LIST bus method. Alter consumers of this method to conform to the new convention. Minor cosmetic adjustments to bus.h. This isn't of concern as this interface isn't in use yet.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Nov 9 10:21:23 2000 UTC (11 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +30 -1 lines
Implement a trivial but effective interface for obtaining the kernel's device tree and resource manager contents. This is the kernel side of the upcoming libdevinfo, which will expose this information to userspace applications in a trivial fashion. Remove the now-obsolete DEVICE_SYSCTLS code.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Wed Oct 18 05:15:40 2000 UTC (11 years, 3 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +10 -1 lines
Add new bus method 'GET_RESOURCE_LIST' and appropriate generic
implementation.
Add bus_generic_rl_{get,set,delete,release,alloc}_resource() functions
which provide generic operations for devices using resource list style
resource management.
This should simplify a number of bus drivers. Further commits to follow.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Sep 7 01:32:59 2000 UTC (11 years, 5 months ago) by jasone
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +15 -2 lines
Major update to the way synchronization is done in the kernel. Highlights include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Revision 1.30.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 3 06:36:38 2000 UTC (11 years, 6 months ago) by imp
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE
Diff to: previous 1.30.2.1: preferred, colored; branchpoint 1.30: preferred, colored
Changes since revision 1.30.2.1: +2 -1 lines
MFC: device_set_unit, don't use this, but it is needed for pci modem. sys/bus.h 1.31 kern/subr_bus.c 1.56
Revision 1.30.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 3 00:25:22 2000 UTC (11 years, 6 months ago) by peter
Branches: RELENG_4
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -1 lines
MFC: add device_set_softc()
Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Jul 3 13:06:22 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -1 lines
Add device_set_softc() which does the obvious. Not objected to by: dfr
Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri May 26 02:06:53 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -3 lines
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen. Requested by: msmith and others
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue May 23 20:39:12 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3 lines
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon May 1 10:45:14 2000 UTC (11 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +1 -2 lines
* Move the driver_t::refs field to kobj_t to replace kobj_t::instances. * Back out a couple of workarounds for the confusion between kobj_t::instances and driver_t::refs.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sat Apr 8 14:17:15 2000 UTC (11 years, 10 months ago) by dfr
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +5 -14 lines
* Factor out the object system from new-bus so that it can be used by non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware. This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Sat Apr 1 06:06:35 2000 UTC (11 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -1 lines
device_set_unit() DO NOT USE THIS. This was approved before 4.0 release for inclusion into the release, but bde talked me out of committing the module that needs this until after the release. It is after the release now. :-)
Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Dec 29 04:24:37 1999 UTC (12 years, 1 month ago) by peter
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_1_0_RELEASE, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -3 lines
Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Dec 3 08:41:24 1999 UTC (12 years, 2 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -5 lines
Remove the 'ivars' arguement to device_add_child() and device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Nov 18 06:05:30 1999 UTC (12 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +12 -9 lines
'const'ify a bunch of pointers in the resource_*() functions for accessing the config hint tables. This fixes a few warnings elsewhere (eg: fd).
Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Nov 8 08:12:05 1999 UTC (12 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +1 -17 lines
Zap DEV_DRIVER_MODULE(). The New world order is that drivers create their dev nodes with make_dev() in a devfs-compatable way by supplying names. This doesn't fit into a compile-time scheme like DEV_DRIVER_MODULE, especially since the cdevsw[] array's days are numbered.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Nov 8 07:14:07 1999 UTC (12 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +7 -1 lines
Don't let drivers that use DEV_DRIVER_MODULE() compile as they won't work and will leave a system stranded.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Oct 12 21:35:51 1999 UTC (12 years, 4 months ago) by dfr
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +12 -3 lines
* Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
layout of ivars.
* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.
* Simplify driver code by providing wrappers to those methods:
bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);
* Delete isa_get_rsrc and use bus_get_resource_start instead.
* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.
* Print a diagnostic message if we can't assign resources to a PnP
device.
* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Sep 7 08:42:48 1999 UTC (12 years, 5 months ago) by dfr
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -1 lines
Change isa_get/set_flags() to device_get/set_flags().
Revision 1.8.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:32:09 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:51:34 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Jul 29 01:03:04 1999 UTC (12 years, 6 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -2 lines
Alter the behavior of sys/kern/subr_bus.c:device_print_child() - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Jul 24 09:34:10 1999 UTC (12 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
This makes the in kernel printf routines conform to the documented behavior of their userland counterparts with respect to return values. Submitted by: Matthew N. Dodd <winter@jurai.net>
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Jul 4 14:58:55 1999 UTC (12 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
Remove cmaj and bmaj args from DEV_DRIVER_MODULE.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun May 30 10:27:02 1999 UTC (12 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -3 lines
* Add a function devclass_create() which looks up the named devclass and creates it if it doesn't exist. * Rename resource_list_remove() to resource_list_delete() for consistency.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri May 28 09:25:14 1999 UTC (12 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -3 lines
* Change device_add_child_after() to device_add_child_ordered() which is easier to use and more flexible. * Change BUS_ADD_CHILD to take an order argument instead of a place. * Define a partial ordering for isa devices so that sensitive devices are probed before non-sensitive ones.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat May 22 14:57:13 1999 UTC (12 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +69 -2 lines
Add some helper functions to make it easier to write a driver for a bus which needs to manage resources for its children.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri May 14 11:22:47 1999 UTC (12 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -1 lines
* Define a new static method DEVICE_IDENTIFY which is called to add device instances to a parent bus. * Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY to add new instances. * Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY for each driver attached to the parent's devclass. * Move the hint-based isa probe from the isa driver to a new isahint driver which can be shared between i386 and alpha.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun May 9 13:00:49 1999 UTC (12 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between a major number for a dev_t.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat May 8 21:59:43 1999 UTC (12 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +11 -12 lines
Move the declaration of the interrupt type from the driver structure to the BUS_SETUP_INTR call.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat May 8 18:07:37 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
Change resource_set_*() interface to be more useful.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri May 7 10:11:22 1999 UTC (12 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +5 -15 lines
Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline)
function.
Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
to the order of the cmaj/bmaj arguments!)
Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
(ditto!)
(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Apr 16 21:22:54 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: PRE_VFS_BIO_NFS_PATCH, PRE_SMP_VMSHARE, POST_VFS_BIO_NFS_PATCH, POST_SMP_VMSHARE, POST_NEWBUS
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +9 -1 lines
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Mar 29 08:54:19 1999 UTC (12 years, 10 months ago) by dfr
Branches: MAIN
CVS tags: PRE_NEWBUS
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +10 -3 lines
Add some useful functions to the device framework: * bus_setup_intr() as a wrapper for BUS_SETUP_INTR * bus_teardown_intr() as a wrapper for BUS_TEARDOWN_INTR * device_get_nameunit() which returns e.g. "foo0" for name "foo" and unit 0. * device_set_desc_copy() malloc a copy of the description string. * device_quiet(), device_is_quiet(), device_verbose() suppress probe message. Add one method to the BUS interface, BUS_CHILD_DETACHED() which is called after the child has been detached to allow the bus to clean up any memory which it allocated on behalf of the child. I also fixed a bug which corrupted the list of drivers in a devclass if a driver was added to more than one devclass.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Mar 6 16:52:04 1999 UTC (12 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +5 -4 lines
Include <sys/queue.h> so that this file is almost self-sufficient, as is specified in about 40 section 9 man pages. Translated to C (C doesn't support forward declarations of enums).
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Jan 16 17:44:08 1999 UTC (13 years ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE
Branch point for: RELENG_3
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +10 -1 lines
A few small improvements to the bus code: * A function device_printf() to make pretty-printing driver messages easier. * A function device_get_children() to query the children of a device. * Generic implementations of BUS_ALLOC_RESOURCE and BUS_RELEASE_RESOURCE. * Change bus_generic_print_child() so that it is actually useful.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Nov 14 21:58:41 1998 UTC (13 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +140 -71 lines
My changes to the new device interface: - Interface wth the new resource manager. - Allow for multiple drivers implementing a single devclass. - Remove ordering dependencies between header files. - Style cleanup. - Add DEVICE_SUSPEND and DEVICE_RESUME methods. - Move to a single-phase interrupt setup scheme. Kernel builds on the Alpha are brken until Doug gets a chance to incorporate these changes on that side. Agreed to in principle by: dfr
Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 31 09:18:52 1998 UTC (13 years, 6 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +16 -15 lines
Make it possible to have a driver registered with more than one parent bus.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed Jul 22 08:35:48 1998 UTC (13 years, 6 months ago) by dfr
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +14 -1 lines
Add some very simple support for a compiled in (from config(8)) resource database.
Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jul 12 16:20:48 1998 UTC (13 years, 7 months ago) by dfr
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -2 lines
Change interrupt api to be closer to intr_create/intr_connect.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jul 5 10:14:32 1998 UTC (13 years, 7 months ago) by dfr
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +7 -11 lines
Minor tidying.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Jun 14 13:46:09 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
CVS tags: PRE_NOBDEV
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +53 -82 lines
Major changes to the generic device framework for FreeBSD/alpha: * Eliminate bus_t and make it possible for all devices to have attached children. * Support dynamically extendable interfaces for drivers to replace both the function pointers in driver_t and bus_ops_t (which has been removed entirely. Two system defined interfaces have been defined, 'device' which is mandatory for all devices and 'bus' which is recommended for all devices which support attached children. * In addition, the alpha port defines two simple interfaces 'clock' for attaching various real time clocks to the system and 'mcclock' for the many different variations of mc146818 clocks which can be attached to different alpha platforms. This eliminates two more function pointer tables in favour of the generic method dispatch system provided by the device framework. Future device interfaces may include: * cdev and bdev interfaces for devfs to use in replacement for specfs and the fixed interfaces bdevsw and cdevsw. * scsi interface to replace struct scsi_adapter (not sure how this works in CAM but I imagine there is something similar there). * various tailored interfaces for different bus types such as pci, isa, pccard etc.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Wed Jun 10 10:57:21 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
Add initial support for the FreeBSD/alpha kernel. This is very much a work in progress and has never booted a real machine. Initial development and testing was done using SimOS (see http://simos.stanford.edu for details). On the SimOS simulator, this port successfully reaches single-user mode and has been tested with loads as high as one copy of /bin/ls :-). Obtained from: partly from NetBSD/alpha
