Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/arc/dev/opms.c
RevisionDateAuthorComments
 1.26  26-Sep-2021  thorpej Driver "kqfilter" entry points return an error code, so if an invalid
filter is requested, return EINVAL rather than 1.
 1.25  26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.24  19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.23  03-Sep-2018  riastradh branches: 1.23.12;
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.22  25-Oct-2017  maya branches: 1.22.2; 1.22.4;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.21  25-Jul-2014  dholland branches: 1.21.8; 1.21.18;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.20  16-Mar-2014  dholland branches: 1.20.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.19  01-Jul-2011  dyoung branches: 1.19.2; 1.19.12; 1.19.16;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.18  13-Jun-2008  cegger use device_lookup_private to get softc
 1.17  01-Mar-2008  rmind branches: 1.17.2; 1.17.4; 1.17.6; 1.17.8;
Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.16  04-Mar-2007  christos branches: 1.16.20; 1.16.36; 1.16.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.15  15-Apr-2006  tsutsui branches: 1.15.14;
Include "ioconf.h" rather than declare struct cfdriver foo_cd in each file.
 1.14  24-Dec-2005  perry branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10; 1.14.12;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.13  11-Dec-2005  christos merge ktrace-lwp.
 1.12  11-Mar-2005  matt branches: 1.12.4;
Fix typo.
 1.11  22-Jan-2005  tsutsui branches: 1.11.2;
- remove __P()
- use ANSI function decls
- u_intNN_t -> uintNN_t
- some KNF
 1.10  07-Aug-2003  agc branches: 1.10.8;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9  15-Jul-2003  lukem __KERNEL_RCSID()
 1.8  19-Jan-2003  tsutsui branches: 1.8.2;
TAB/space cleanup.
 1.7  26-Nov-2002  christos si_ -> sel_
 1.6  25-Oct-2002  jdolecek add a missing opmskqfilter() prototype
 1.5  23-Oct-2002  jdolecek 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
 1.4  06-Sep-2002  gehenna 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.
 1.3  28-Sep-2001  chs branches: 1.3.4; 1.3.12;
don't depend on other headers to include sys/proc.h for us.
 1.2  16-Sep-2001  wiz Spell 'occurred' with two 'r's.
 1.1  13-Jun-2001  soda branches: 1.1.2; 1.1.4; 1.1.6;
split pccons driver into "pccons" and "opms",
also split into bus-dependent frontend and bus-independent backend.
 1.1.6.1  01-Oct-2001  fvdl Catch up with -current.
 1.1.4.5  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.4.4  02-Oct-2002  jdolecek do not need the (void *) cast for kn_hook anymore
 1.1.4.3  16-Jun-2002  jdolecek make compile
 1.1.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.1  09-Sep-2001  thorpej Add kqueue support (not compiled yet).
 1.1.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.3.12.1  17-May-2002  gehenna Add device switch.
 1.3.4.4  11-Dec-2002  thorpej Sync with HEAD.
 1.3.4.3  11-Nov-2002  nathanw Catch up to -current
 1.3.4.2  17-Sep-2002  nathanw Catch up to -current.
 1.3.4.1  28-Sep-2001  nathanw file opms.c was added on branch nathanw_sa on 2002-09-17 21:13:15 +0000
 1.8.2.6  01-Apr-2005  skrll Sync with HEAD.
 1.8.2.5  24-Jan-2005  skrll Sync with HEAD.
 1.8.2.4  28-Nov-2004  skrll Adapt to branch
 1.8.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1  03-Aug-2004  skrll Sync with HEAD
 1.10.8.1  29-Apr-2005  kent sync with -current
 1.11.2.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.4.3  17-Mar-2008  yamt sync with head.
 1.12.4.2  03-Sep-2007  yamt sync with head.
 1.12.4.1  21-Jun-2006  yamt sync with head.
 1.14.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.14.10.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.14.8.1  24-May-2006  yamt sync with head.
 1.14.6.1  22-Apr-2006  simonb Sync with head.
 1.14.4.1  09-Sep-2006  rpaulo sync with head
 1.15.14.1  12-Mar-2007  rmind Sync with HEAD.
 1.16.40.2  29-Jun-2008  mjf Sync with HEAD.
 1.16.40.1  03-Apr-2008  mjf Sync with HEAD.
 1.16.36.1  24-Mar-2008  keiichi sync with head.
 1.16.20.1  23-Mar-2008  matt sync with HEAD
 1.17.8.1  18-Jun-2008  simonb Sync with head.
 1.17.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.4.1  04-May-2009  yamt sync with head.
 1.17.2.1  17-Jun-2008  yamt sync with head.
 1.19.16.1  18-May-2014  rmind sync with head
 1.19.12.2  03-Dec-2017  jdolecek update from HEAD
 1.19.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20.2.1  10-Aug-2014  tls Rebase.
 1.21.18.1  27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.21.8.1  19-Jul-2016  pgoyette Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it. This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@
 1.22.4.1  10-Jun-2019  christos Sync with HEAD
 1.22.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.23.12.1  03-Jan-2021  thorpej Sync w/ HEAD.

RSS XML Feed