Commit Graph

33 Commits

Author SHA1 Message Date
matt 22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
chs e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
tsutsui 6615ddefa9 Rename some MI mb89352 functions for consistency:
spcintr() -> spc_intr()
 spcattach() -> spc_attach()
2003-07-05 19:00:16 +00:00
tsutsui 3b48b7c661 Rename functions to avoid namespace conflicts:
spc_match() -> spc_mainbus_match()
 spc_attach() -> spc_mainbus_attach()
2003-07-05 18:43:11 +00:00
thorpej 158cfe844c Use PAGE_SIZE rather than NBPG. 2003-04-02 00:08:13 +00:00
he cb89d3a368 Initialize the two new members of consdev (cn_halt, cn_flush) to NULL so
that this compiles again.
2003-03-28 14:10:56 +00:00
thorpej 72a2c87923 Use aprint_normal() for cfprint routines. 2003-01-01 01:34:45 +00:00
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 c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +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
itojun e5b5171ab5 integer overflow. from silvio@qualys.com 2002-08-06 22:46:11 +00:00
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
thorpej 34820075d5 Statements must follow labels. 2002-05-30 21:09:54 +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
jdolecek ff8305bbac Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
2002-01-21 21:56:57 +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
enami 2ceebb6c0e Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
2001-03-31 00:35:21 +00:00
nisimura dfb8c2a44f Fix a minor typo in the previous change of tp->t_linesw introduction. 2000-11-07 09:23:21 +00:00
eeh 8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00
nisimura 1b3cb15ca9 Fix errors in mouse event handling;
- convert LMR bit pattern into RML since wsevent counts 0 for the leftmost
  mouse button.
- found hardware reports mouse button state in negated.
2000-10-19 10:35:34 +00:00
mrg 28d898391b remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 08:10:45 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
thorpej a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
nisimura 034d6278cf Fix an argument error of wsmouse_input() call. 2000-01-14 03:28:13 +00:00
nisimura 237f63f2d2 Put a comment about BREAK detection; DDB fails to resume. Need to clear
the condition before resume?
2000-01-12 01:59:45 +00:00
nisimura acf3c1e59a - Fix an error in clearing entire screen.
- Add 3 byte long mouse event parsing.
- Fix errors in comments.
2000-01-12 01:57:22 +00:00
nisimura e9c36a5c33 Kludge to avoid a panic in badaddr() when no framebuffer is installed. 2000-01-08 04:40:25 +00:00
nisimura f28fd51814 - Make SCSI work; by kludges of machine/bus.h. TEAC streamer tape drive
found to be tweaked.  Need extensive verifications.
- Add wsmouse node under ws; not useful this moment.
2000-01-07 05:13:08 +00:00
nisimura 3bec20781c Fix a typo of screen size; pointed by tsubai. 2000-01-06 00:19:10 +00:00
nisimura 95d00ea75d Introduce NetBSD/luna68k port into CVS repository. 2000-01-05 08:48:53 +00:00