Home | History | Annotate | Download | only in apm
History log of /src/sys/dev/hpc/apm/apmdev.c
RevisionDateAuthorComments
 1.34  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.33  19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.32  21-Jul-2018  maya branches: 1.32.14;
Remove unused variable.
 1.31  25-Oct-2017  maya branches: 1.31.2; 1.31.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.30  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.29  16-Mar-2014  dholland branches: 1.29.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.28  09-Nov-2013  christos fixed unused variable warning
 1.27  03-Oct-2012  christos branches: 1.27.2;
remove diagnostic printfs to make this compile again.
 1.26  30-Sep-2012  dsl Remove code from dev/apm/apm.c for setting global variables to parameterise
the i386 bios apm code (now removed).
Remove the same code from the clone dev/hpc/apm/apmdev.c
Remove some not-used options from dev/apm/files.apm and the commented out
lines in ALL and GENERIC.
Maybe the APM_V10_ONLY and APM_NO_V12 could also be shot, but they are
further entwined in the code.
 1.25  17-Jul-2011  joerg branches: 1.25.2; 1.25.12;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.24  23-Nov-2009  rmind Remove some unecessary includes sys/user.h header.
 1.23  03-Apr-2009  uwe Use dev/apm/files.apm for APM options in opt_apm.h.

Now both apm and apmdev files.apm can be included so you can switch
from apmdev0 to apm0 at hpcapm0 in your kernel config easily.
 1.22  03-Apr-2009  uwe Switch apmdev to use apm(4) structures from dev/apm/apmvar.h.
Add batteryid argument to aa_get_powstat method implementations.
 1.21  03-Apr-2009  uwe Further reduce diffs to dev/apm/apm.c.

Bring over remaining bits of logic not picked up in the first round.
Main semantic difference between the two that ramins is now basically
powerhooks vs. pmf.

Cosmetics to reduce diff noise: split apmattach into apmdevattach and
apm_attach, where the latter matches its counterpart in the real
apm.c. Change local macros names from APMDEV* to APM*

Now that apmdev.c is demonstrably congruent to apm.c it should be
easier to switch hpc* and zaurus ports to apm.c from apmdev.c.
apmdev.c is one of the only two remaining drivers that call
dopowerhooks(9), the other one being arch/arm/xscale/pxa2x0_apm.c.

Ideally I would prefer for them to be interchangeable to smooth the
transition (in pmf world order *all* devices must have pmf hooks
registered), but they are attached differently - apmdev is separate
from its backend device (like hpcapm), while apm.c backends are
attachment glue, not separate devices.
 1.20  30-Mar-2009  uwe Split device_t and softc, use aprint_*, rename/reformat stuff to
minimize diffs to dev/apm/apm.c (even at the cost of uglification).

Tested on Jornada 690 (hpcsh).
 1.19  12-Jun-2008  rafal branches: 1.19.4; 1.19.10;
device_private_lookup()-ification so that hpcarm (at jeast Jornada 72x)
kernels build.
 1.18  28-Apr-2008  martin branches: 1.18.2; 1.18.4;
Remove clause 3 and 4 from TNF licenses
 1.17  06-Apr-2008  cegger branches: 1.17.2; 1.17.4;
use aprint_*_dev and device_xname
 1.16  01-Mar-2008  rmind 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.15  14-Dec-2007  uwe branches: 1.15.2; 1.15.6;
Complete lockmgr->mutex conversion started in 1.12. Mutex needs to be
inited with mutex_init. Since mutex ops return void, drop (void) cast
from APM_(UN)LOCK.
 1.14  05-Dec-2007  pooka branches: 1.14.4;
Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
 1.13  05-Dec-2007  ad lockmgr -> mutex
 1.12  10-Jul-2007  nonaka branches: 1.12.6; 1.12.8; 1.12.14; 1.12.16;
Fix compile failure occured kthread API changes.
 1.11  09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.10  04-Mar-2007  christos branches: 1.10.2; 1.10.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9  16-Nov-2006  christos branches: 1.9.4;
__unused removal on arguments; approved by core.
 1.8  12-Oct-2006  uwe -Wextra fixes
 1.7  09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.6  05-Sep-2006  gdamore branches: 1.6.2; 1.6.4;
Convert time.tv_sec to time_second.
 1.5  27-Feb-2006  cube branches: 1.5.2;
Add support for OAPM_IOC_GETPOWER. That will keep binary compatibility
when hpcarm switches to using hpcapm(4).
 1.4  11-Dec-2005  christos branches: 1.4.2; 1.4.4; 1.4.6;
merge ktrace-lwp.
 1.3  31-May-2005  uwe branches: 1.3.2;
Constify.
 1.2  27-Feb-2005  perry nuke trailing whitespace
 1.1  03-Jul-2004  uch branches: 1.1.2; 1.1.6; 1.1.8;
hpcmips independent part are moved to sys/dev/hpc/
 1.1.8.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.6.1  29-Apr-2005  kent sync with -current
 1.1.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.5  24-Jan-2005  skrll Adapt to branch.
 1.1.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2  03-Aug-2004  skrll Sync with HEAD
 1.1.2.1  03-Jul-2004  skrll file apmdev.c was added on branch ktrace-lwp on 2004-08-03 10:46:05 +0000
 1.3.2.6  17-Mar-2008  yamt sync with head.
 1.3.2.5  21-Jan-2008  yamt sync with head
 1.3.2.4  07-Dec-2007  yamt sync with head
 1.3.2.3  03-Sep-2007  yamt sync with head.
 1.3.2.2  30-Dec-2006  yamt sync with head.
 1.3.2.1  21-Jun-2006  yamt sync with head.
 1.4.6.1  22-Apr-2006  simonb Sync with head.
 1.4.4.1  09-Sep-2006  rpaulo sync with head
 1.4.2.1  01-Mar-2006  yamt sync with head.
 1.5.2.1  14-Sep-2006  yamt sync with head.
 1.6.4.2  10-Dec-2006  yamt sync with head.
 1.6.4.1  22-Oct-2006  yamt sync with head
 1.6.2.1  18-Nov-2006  ad Sync with head.
 1.9.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.10.4.1  11-Jul-2007  mjf Sync with head.
 1.10.2.2  15-Jul-2007  ad Sync with head.
 1.10.2.1  13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.12.16.2  26-Dec-2007  ad Sync with head.
 1.12.16.1  08-Dec-2007  ad Sync with head.
 1.12.14.2  27-Dec-2007  mjf Sync with HEAD.
 1.12.14.1  08-Dec-2007  mjf Sync with HEAD.
 1.12.8.2  23-Mar-2008  matt sync with HEAD
 1.12.8.1  09-Jan-2008  matt sync with HEAD
 1.12.6.1  09-Dec-2007  jmcneill Sync with HEAD.
 1.14.4.1  02-Jan-2008  bouyer Sync with HEAD
 1.15.6.3  29-Jun-2008  mjf Sync with HEAD.
 1.15.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.15.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.15.2.1  24-Mar-2008  keiichi sync with head.
 1.17.4.3  11-Mar-2010  yamt sync with head
 1.17.4.2  04-May-2009  yamt sync with head.
 1.17.4.1  16-May-2008  yamt sync with head.
 1.17.2.2  17-Jun-2008  yamt sync with head.
 1.17.2.1  18-May-2008  yamt sync with head.
 1.18.4.1  18-Jun-2008  simonb Sync with head.
 1.18.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.4.1  28-Apr-2009  skrll Sync with HEAD.
 1.25.12.3  03-Dec-2017  jdolecek update from HEAD
 1.25.12.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.2  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.25.2.1  30-Oct-2012  yamt sync with head
 1.27.2.1  18-May-2014  rmind sync with head
 1.29.2.1  10-Aug-2014  tls Rebase.
 1.31.4.1  10-Jun-2019  christos Sync with HEAD
 1.31.2.1  28-Jul-2018  pgoyette Sync with HEAD
 1.32.14.1  03-Jan-2021  thorpej Sync w/ HEAD.

RSS XML Feed