Commit Graph

52 Commits

Author SHA1 Message Date
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
thorpej
89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
thorpej
217c799fe7 Use CFATTACH_DECL(). 2002-10-01 21:24:43 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
msaitoh
3bc4d0b5aa remove extra CRLF conversion 2002-08-16 08:56:27 +00:00
msaitoh
7c10da8b66 fix some overflow cases. 2002-05-19 15:10:46 +00:00
uch
6d338ff407 Use "#define<tab>", white space nits. 2002-04-28 17:10:32 +00:00
msaitoh
ccc0ee640f add missing softintr_establish() call. 2002-04-28 11:38:48 +00:00
msaitoh
f6bf722a2e fix around PTR and PDR 2002-04-26 10:22:53 +00:00
uch
7803620f8d mmeye specific devices are moved to mmeye/dev 2002-03-24 18:08:42 +00:00
uch
24ec477a45 Rework interrupt code.
+ Fully utilize SH SR.I[0:3] interrupt level.
 + software interrupt is emulated by TMU1, 2 one shot interrupt.
 + implement generic soft interrupts.
 + implement clockframe correctly.
2002-03-24 18:04:39 +00:00
uch
049c84193e shb device is integrated to sh3/dev/shb.c and clean up locators. 2002-03-24 18:00:41 +00:00
atatat
31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
uch
6042c0a3fc Initial support for KGDB on the sh3. 2002-03-02 22:26:25 +00:00
uch
6bda0e36c3 use sh_clock_get_pclock() instead of PCLOCK. 2002-02-24 19:35:42 +00:00
uch
f694c9fdd7 New NetBSD/sh3 clock framework.
+ hardclock source is moved from TMU1 to TMU0.
 + SH3/SH4 common kernel support.
 + PCLOCK estimation.
 + remove duplicated code.
2002-02-22 19:43:58 +00:00
uch
b3f7b11fe7 ANSIfy KNF. 2002-02-12 15:26:45 +00:00
uch
4202622d3c if PCLOCK isn't setted, use estimated value calculated by kernel. 2002-02-01 17:52:54 +00:00
soren
875bff0962 To make dev/pcmcia work on platforms with 64-bit bus_addr_t and
32-bit bus_size_t (sparc), change the pcmcia_mem_map(9) offsetp
argument to bus_size_t as it is used as a bus_space offset.
2001-12-15 13:23:20 +00:00
msaitoh
78db8b9715 add missing check for framing error 2001-09-10 08:50:33 +00:00
wiz
0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
lukem
d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
scw
2963ff5c58 Add l_poll' to struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
thorpej
45de366b2e Rename __GENERIC_SOFT_INTERRUPTS to __HAVE_GENERIC_SOFT_INTERRUPTS,
and place the definition in <machine/types.h>.  This can now be used
as a flag to indicate whether or not <machine/intr.h> can be included
to get the generic soft interrupt API.
2001-01-14 23:50:28 +00:00
msaitoh
007d059977 - fix \n conversion from \n\r to \r\n
- cleanup
2000-11-22 21:14:25 +00:00
eeh
8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00
msaitoh
d191cbf210 add interrupt mode into wdog
To use:

	ioctl(fd, SIOWDOGSETMODE, &val)

	val:	WDOGM_RESET	-> reset when counter expired
		WDOGM_INTR	-> print PC when counter expired (new!)

This interface is still under experimental.
2000-10-31 02:04:12 +00:00
msaitoh
13bed0a344 - fix error handing in getc.
Now we can handle BREAK signal and framing error correctly.

- cleanup.
2000-10-31 01:08:41 +00:00
tsubai
a964ecd1a9 Correct iosize. 2000-09-01 10:43:33 +00:00
msaitoh
dafe13f724 callout()->callout_reset() 2000-07-11 18:46:22 +00:00
mrg
fa00dc597a remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:44:02 +00:00
msaitoh
03cf0ea64a clear ORER, FER and PER bit of the SCSSR reg.
(This bits aren't cleared automatically)
2000-06-19 09:32:00 +00:00
msaitoh
4d2677e3a0 clear the ER bit of the SCSSR2 reg.
(This bit isn't cleared automatically)
2000-06-19 09:30:35 +00:00
msaitoh
e61941261f remove a debug log 2000-04-20 14:04:04 +00:00
tsubai
8bd19349a1 Fill paa_busname field in pcmciabus_attach_args. 2000-04-20 11:51:27 +00:00
msaitoh
35ba37f2f7 fix the sci[f]cninit() bugs to work both SCI and SCIF at the same time. 2000-03-27 16:24:08 +00:00
thorpej
7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
msaitoh
f51b1c6783 add RCSID and copyright 2000-02-24 17:10:16 +00:00
msaitoh
e2cc2d00d7 watchdog timer 2000-02-24 17:07:34 +00:00
msaitoh
0e12305a13 global variable declaration 2000-02-24 16:42:54 +00:00
msaitoh
c956cdcabe bugfixes:
o SCI accesses SCI registers (not SCIF) correctly
 o If there is serial inputs in boot time, it could hangup in interrupt routine
 o some cleanups(KNF)
2000-02-22 01:37:11 +00:00
msaitoh
b3fa48ba9d implement send/recieve break signal routines 2000-01-07 10:50:14 +00:00
msaitoh
3c51010f6a - unset RS/CS flow control bit from default setting
- GC
1999-10-06 09:19:46 +00:00
msaitoh
adc175c443 check SCI(F)CONSOLE 1999-09-17 01:23:00 +00:00
msaitoh
9211d6bed4 sync with sci*.h and tmureg.h 1999-09-16 21:17:26 +00:00
tsubai
40905bd3ec Catch up with -current. 1999-09-14 10:22:34 +00:00
msaitoh
427928b3a1 add some comments. 1999-09-13 19:13:09 +00:00