Commit Graph

40 Commits

Author SHA1 Message Date
ad 76274213ea Correct first arg to falloc(). 2006-07-28 08:51:05 +00:00
elad 2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
yamt d91bf59ce6 dmoverioopen: add a missing simple_lock_init(). 2006-01-17 12:10:51 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
christos be3704c73f pass the flag to fdclone. 2005-02-12 23:14:03 +00:00
he d1b8269758 Correct a typo: it's fnullop_kqfilter and not fnullop_kqueue. 2004-12-05 22:42:27 +00:00
christos 31c81b28f5 Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat
2004-11-30 04:25:43 +00:00
thorpej 29671d6616 Fix the fcntl entry points; cmd is a command, not the flags themselves.
Pointed out by Christos (he wrote the broken code originally, and I copied
it to another file later :-)
2004-11-28 07:44:05 +00:00
briggs 9082432644 Go ahead and define xor function names up to xor16. 2003-11-07 22:04:59 +00:00
briggs cad1dd99c8 Fix another used-before-initialized bug that gcc uncovered. 2003-11-07 22:04:13 +00:00
jdolecek a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
briggs 6d7027eec6 Add support for xor2-xor8 to swdmover. 2003-07-25 13:59:09 +00:00
thorpej b41675bcc3 Add a software implementation of the iSCSI CRC32C algorithm. This
serves as an example of how the immediate value can be used by a
dmover function.
2003-07-19 02:05:35 +00:00
thorpej a2a587d698 Add a well-known dmover function name for the CRC32C used by the iSCSI
protocol.
2003-07-19 02:03:11 +00:00
thorpej 5f35784b8a Add immediate value support for dmoverio transactions. 2003-07-19 02:00:18 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
thorpej 792ce8fe0d Fix typo in previous. 2003-06-14 19:03:40 +00:00
thorpej d0e1416b29 Separate out the immediate value from the input buffer. The immediate
value field can now always be used as an input, and output, or both.

This is especially handy for data movers which can e.g. calculate the
CRC32C of a buffer as it is moved (which requires both a seed [input],
and a place to stash the result [output]).
2003-06-12 17:20:43 +00:00
scw 58c736d46f In dmio_read(), make sure to set DMIO_STATE_READ_WAIT in ds->ds_flags
before going to sleep.
2003-05-30 11:37:47 +00:00
briggs 4c104c6cea In dmover_backend_alloc(), make sure we get ninputs from the best_algdesc,
not just the most recent algdesc (which might be NULL).
2003-04-26 04:44:18 +00:00
briggs cb2eb4a01a Mmmm... LOCKDEBUG...
Change from unlock -> modify -> unlock to _lock_ -> modify -> unlock.
2003-04-01 20:59:15 +00:00
dsl 60418b39b7 Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
2003-03-21 21:13:50 +00:00
thorpej 1557986bd7 Don't require that input buffers and output buffers be of the same
type.
2003-03-06 21:32:59 +00:00
thorpej a572240890 For functions with inputs and outputs, we currently require that the
buffer types be the same; don't rely on the middle-end to enforce this
for us.
2003-03-06 21:10:45 +00:00
thorpej 18e5ffe231 Fix typo. 2002-12-28 23:07:18 +00:00
thorpej 9004406585 Error out if we get an unexpected buffer type. 2002-12-10 01:09:09 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
thorpej 1cba452d86 Fix signed/unsigned comparison warnings. 2002-11-07 08:02:09 +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
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
thorpej 16003abd0f Add standard names for 5-, 6-, 7-, and 8-way XOR. 2002-08-04 02:17:06 +00:00
thorpej 4c1506f740 *Actually return* EINVAL when the output stream UIO's I/O is larger
than SSIZE_MAX.
2002-08-04 01:52:00 +00:00
thorpej 32ff91814a Add "xor2", "xor3", and "xor4" function names, which perform an
XOR on 2, 3, and 4 input streams, respectively.
2002-08-02 06:45:40 +00:00
thorpej add44d0f41 Fix a signed/unsigned botch that broke an error recovery path.
(I could have sworn I fixed this bug over a week ago...)
2002-08-02 06:35:59 +00:00
thorpej ff8c9fb45c Grr, fix typo in RCS ID tag. 2002-08-02 00:31:35 +00:00
thorpej 5d06c0e812 dmover(9) -- an interface to hardware-assisted data movers. This allows
clients to use a hardware-assisted data mover to clear a region of memory,
fill a region of memory with a specific value, copy a region of memory,
and perform simple boolean operations such as XOR on multiple regions
of memory.

Included here is a software back-end which can serve as an example of
how to write a back-end (and also provides a fall-back in case hardware
for a given function is not available), as well as a dmoverio(4) pseudo-
device which provides access to dmover(9) to userland via a message
passing interface.

dmover(9) is still a work-in-progress -- a few minor changes to the
interface are expected.
2002-08-02 00:30:37 +00:00