K 10 svn:author V 5 luigi K 8 svn:date V 27 2002-02-09T23:02:40.000000Z K 7 svn:log V 1660 MFC: device polling code for RELENG_4. Most of the code resides in kern_poll.c, plus device driver modifications to individual drivers to add the *_poll() handler, plus mostly one-line changes to a bunch of other files (listed at the end of this message) to define constants or call the appropriate functions. A device_poll(4) manpage is still missing. It should contain an explaination of what DEVICE_POLLING does, which you can find at http://info.iet.unipi.it/~luigi/polling/ To use this facility: add options DEVICE_POLLING to your kernel config file, and at runtime do sysctl kern.polling.enable=1 At the moment only the "dc", "fxp" and "sis" drivers have been modified to make use of this feature. More drivers will be modified as i have a chance to test them (patches welcome, look at the changes in the above drivers). Work supported by: the Xorp Project (www.xorp.org) sys/kern/kern_poll.c the core of the polling procedures sys/conf/files.i386 kern/kern_poll.c optional device_polling sys/conf/options.i386 DEVICE_POLLING opt_global.h sys/i386/i386/swtch.s hook to poll in the idle loop sys/i386/i386/trap.c hook to poll in traps sys/i386/include/asnames.h #define _idle_poll idle_poll sys/kern/kern_clock.c calls to init and periodic poll handlers sys/net/if.h #define IFF_POLLING 0x10000 sys/net/if_var.h prototypes for functions used in device drivers sys/net/netisr.h NETISR_POLL and NETISR_POLLMORE, renumber NETISR_NETGRAPH (not objected by julian) sys/dev/fxp/if_fxp.c sys/dev/fxp/if_fxpvar.h sys/pci/if_dc.c sys/pci/if_dcreg.h sys/pci/if_sis.c sys/pci/if_sisreg.h device driver modifications END